Defines database settings. For more options, see SETDBSTATEITEM.
Syntax
SETDBSTATE ["appName"] ["dbName"] "desc" Y/N Y/N accessLevel
dataCacheSize Y/N Y/N Y/N currDb ccType 0/1 indexCacheSize
IndexPageSize Y/N;| Parameter | Description |
|---|---|
appName | Name of the application. Do not include if the application is already selected. |
dbName | Name of the database; required if appName is specified. |
desc | Text string describing the database. |
Y/N | Sets whether the database is loadable. |
Y/N | Sets autoload on or off. |
accessLevel | Default access level. Values: 0 - None. 1 - Read. 2 - Write. 3 - Calculate. 4 - Database Manager. |
dataCacheSize | Maximum amount of memory allocated for data cache. Default: 3145728 bytes. |
Y/N | Sets whether to aggregate missing values. |
Y/N | Sets whether to perform a Two-Pass calc. |
Y/N | Sets whether to create blocks on equations. |
currDb | Links a currency database. |
ccType | Specifies the default currency type member. |
0/1 | Sets the conversion method. Values: 0 - Division. 1 - Multiplication. |
indexCacheSize | Maximum amount of memory allocated for index cache. Default: 1048576 bytes. |
indexPageSize | Maximum amount allocated for index page. Index page size is now fixed at 8192 bytes regardless of this setting. |
Y/N | Enable (Y) or disable (N) data compression on disk. |
Notes
Using the semicolon statement terminator (;) is optional in ESSCMD scripts. However, it is good practice to use it to signal the end of the SETDBSTATE parameter list. This is especially important if you omit some of the parameters, accepting their default values. If not all parameters are present, and the ; is omitted, ESSCMD looks for the remaining values in the next line, leading to unpredictable results.
If you issue only the SETDBSTATE keyword in interactive mode, ESSCMD prompts you for the other values.
Load the required database before you run the SETDBSTATE command, then stop and restart the database for this command to take effect.
Example
The following example assumes that the application and database are already selected. Settings that you want to skip need to be represented using empty quotation marks as placeholders.
SETDBSTATE "Data has been updated" "Y" "Y" 4 "3000000"
"N" "Y" "N" "" "" 0 "1049000" "8192" "Y";
See Also