Technical Tip: How to resolve the error 'tablesize check error - runtime error -999: invalid value - having space before or after the table name' in CLI script
Description
This article describes the error 'tablesize check error - runtime error -999: invalid value - having space before or after the table name' which can be triggered when running a CLI script on Policy Package or ADOM Database.
Scope
FortiManager v7.4.x, v7.6.x.
Solution
The script:
 

 
The error when running the script:

 
The script error details when selecting the magnifying lens:
 

 
When receiving the above error, this indicates that there is an issue in the script itself where extra spaces exist within double quotes '" "', and that is the root cause of the problem.
The issue in the above example is within the section of the user creation for the user named '"User A "', and the issue is in the extra space before the closing double quote '"'.
The script fails at line 7, which is the next statement for the first user creation.
If the issue exists for the user '"User B"', for instance, then the script will show an error at line 17, which is the next statement for the user '"User B"'.
By removing the extra spaces at the end of '"User A "' to be '"User A"', the script will run successfully as below:

