Database Configuration Parameters (dbprefs.xml)

The file dbprefs.xml contains a number of parameters used to control and configure the working of the DataCaster database engine.

These configuration parameters use the Java preferences facility, and permanently store the preferences once they are entered in dbprefs.xml. Removing the entry from dbprefs will not reset the value to the default value. You can reset values only by changing the value to an emptty string "" in either the dbprefs.xml file or using the SetPreferences tool.

Top-level Parameters

  • When a user requests a connection to a database, and the database does not exist, what happens is controlled by db.auto_create. If set to true, a database is created automatically. Otherwise, the connection fails with an error message. For example,
    entry key="db.auto_create" value="true" 

  • Authorization is supported via files or an authorization database. By default a file in the conf dir is created to store authentication data. However, using the auth.store parameters, an authentication database can be used instead of a file to store user nmes and passwords. For example,
    entry key="auth.store_type" value="database" 
    entry key="auth.store_db" value="myauthdb"

  • A secondary data directory can be specified for an alternate data store on say another disk, though support for a secondary store is not available yet. For example,
    entry key="secondary.data.dir" value="C:/applibase/data" 

  • Note The conf.dir and data.dir parameters can be changed in dbprefs.xml. However, conf.dir is what is used to find dbprefs.xml, and it makes little sense to set it in dbprefs.xml, unless changing it for subsequent use. Use the SetPreferences tool instead to change conf.dir. The data directory used to store the database files can be changed here, and is specified by the data.dir parameter. For example,
    entry key="data.dir" value="/applibase/data" 

Log Configuration

The following entries can be used to control log files created by DataCaster.

  • The size of any log file can be set using max_log_length. Additional numbered log files are created when this limit is exceeded. For example,
    entry key="max_log_length" value="100000" 

  • The maximum number of log files for a given log type can be set with max_log_files. Once these logs are created, new logs result in older logs being deleted. For example,
    entry key="max_log_files" value="10" 

  • Use system.out to send all standard output messages to a log file. Use an absolute or relative path, which is relative to the data directory. For example,
    entry key="system.out" value="datacaster.out" 

  • Use system.err to send all standard error messages to a log file. Use an absolute or relative path, which is relative to the data directory. For example,
    entry key="system.err" value="datacaster.errs" 

  • Use system.stacktrace to send write stack traces for internal exceptions to a log file. Use an absolute or relative path, which is relative to the data directory. For example,
    entry key="system.stacktrace" value="datacaster.errs" 

  • Specify the audit.file parameterto specify the file for statement audits, which are sent to the file if statement audits are turned on. Use an absolute or relative path, which is relative to the data directory. For example,
    entry key="audit.file" value="statement_audit.log" 

  • For example,
    entry key="db.connection.print" value="true" 

Database Archives

  • Use this preference parameter to set the archive directory. db.archive_dir is the directory path where you want to store the archives. It is recommended that this be on a different drive from the one where data is stored so that there is lesser chance of archive getting corrupted along with data. If the value is left blank, then the default directory called 'archives' is created under the user's home directory. For example,
    entry key="db.archive_dir" value="/temp/archives" 

  • db.archive_start_time is the time of day when the dump is scheduled for. This should be in HH:mm format.

  • db.archive_interval is the interval between successive dumps. This is also specified in HH:mm format. You can even specify a large interval say 168:00 that dumps once every week.

  • db.enable_archive is used to start or stop the timer that does the periodic dump.
If its value is set to true, then the timer is scheduled to do a dump periodically starting at the time specified in db.archive_start_time with an interval specified in db.archive_interval.

Transactions

  • For example,
    entry key="transaction.timeout" value="600" 
  • For example,
    entry key="db.do_recovery_table_check" value="false" 

SQL Query Processing

  • DataCaster identifiers are case sensitive. Use this parameter to convert the database to a case insensitive database for SQL statements. All statements will be converted to UPPER case (except for literals in statements) before they are executed. This option does not apply to use of the API, where the proper case must be used at all times. For example,
    entry key="sql.case_insensitive" value="false" 

  • Use this option to makse autocommit teh default for SQL statements. For example,
    entry key="sql.autocommit" value="true" 

  • Use this option to turn on statement audits, which are printed to the statement audit log file configured in the logs section. For example,
    entry key="sql.statement.audit" value="true" 

  • Use this option to print the query and execution tree for a statement (which is printed to the output log, or standard output if no log is configured.) For example,
    entry key="sql.tree.print" value="false" 

  • Use this option to turn off SQL statement join order optimization. For example,
    entry key="sql.statement.optimize" value="false" 

  • Use this option to change the ordering of nulls. For example,
    entry key="types.nulls_ordered_high" value="false" 

Index Configuration

  • Use this option to set the primary key index type, which is the default used for primary key indexes that are created automatically for all tables with a primary key. BTree is the default. For example,
    entry key="primary_key_index_type" value="BTree" 

  • Use this option to set the maximum cache value for the number of pages in a transaction cache. For example,
    entry key="index.transaction_max_cache" value="100" 

  • Use this option to set the minimum cache value for the number of pages in a transaction cache. For example,
    entry key="index.transaction_min_cache" value="30" 

  • Use this option to set the maximum cache value for the number of pages in a BTree index cache. For example,
    entry key="index.btree_max_cache" value="1000" 

  • Use this option to set the minimum cache value for the number of pages in a BTree index cache. For example,
    entry key="index.btree_min_cache" value="100" 

  • Use this option to set the maximum cache value for the number of pages in a query index cache. For example,
    entry key="index.query_max_cache" value="50" 

  • Use this option to set the minimum cache value for the number of pages in a query index cache. For example,
    entry key="index.query_min_cache" value="5" 

  • This parameters determines the high-water mark for the commit queue in index pages. Beyond this size, transactions are held up until the checkpoint thread can save the commited pages to disk. For example,
    entry key="commit_queue_threshold" value="1000" 

  • Set this parameter to setup locking for a database table such that only one update transaction can get a lock on the table index at a time. This is useful in avoiding deadlocks when there is a high degree of contention on updates to a table. This parameter applies when using a table, and is not a session-level parameter. For example,
    entry key="insert_burst_optimized" value="false" 

Network Clients

  • Use this parameter to set the hostname used when connecting to remote DataCaster servers. The remote user on the server will be qualified by this server name. For example,
    entry key="localserver.name" value="myserver.applibase.com" 

Resource Control

The following parameters determine usage control default values for all users. By default no usage control is applied. A value of -1 turns off usage control for any given parameter.

  • This parameter determines the transaction monitoring interval, i.e. the interval when the server checks the allowed rate of transactions. It may be WEEK, DAY, HOUR, MINUTE, or SECOND. The default is DAY. For example,
    entry key="security.tx.monitor.interval" value="DAY" 

  • Use this parameter to determine the check interval used to control usage of index pages read. It may be WEEK, DAY, HOUR, MINUTE, or SECOND. The default is HOUR. For example,
    entry key="security.pages.monitor.interval" value="HOUR" 

  • Use this parameter to determine the check interval used to control usage of tuples read. It may be WEEK, DAY, HOUR, MINUTE, or SECOND. The default is HOUR. For example,
    entry key="security.tuples.monitor.interval" value="HOUR" 

  • Use this parameter to determine the check interval used to control usage of bytes transmitted. It may be WEEK, DAY, HOUR, MINUTE, or SECOND. The default is HOUR. For example,
    entry key="security.bytes.monitor.interval" value="MINUTE" 

  • Use this parameter to control number of transactions per day. For example,
    entry key="security.tx.daily.rate" value="-1" 

  • Use this parameter to control usage of index pages read. For example,
    entry key="security.pages.hourly.rate" value="-1" 

  • Use this parameter to control usage of tuples read. For example,
    entry key="security.tuples.minute.rate" value="-1" 

  • Use this parameter to control usage of bytes transmitted. For example,
    entry key="security.bytes.second.rate" value="-1" 

  • Use this parameter to set the database to be used to record uage. By default no usage control is performed. For example,
    entry key="security.usage.db" value="usagedb" 

Lucene Text Search

  • Max pending queue size. For example,
    entry key="lucene.max_search_queue" value="1000"