ASA Database Administration Guide
Database Administration Utilities
dbinit [ options ] new-database-file
| Option | Description |
|---|---|
| @data | Read options from the specified environment variable or configuration file. |
| -b | Blank padding of strings for comparisons and fetching. |
| -c | Case sensitivity for all string comparisons. |
| -cp | Case sensitivity of passwords. |
| -e | Encrypt the database using simple encryption. |
| -ea algorithm | Specify which strong encryption algorithm to encrypt your database with: you can choose AES or AES_FIPS. |
| -ek key | Specify encryption key for strong encryption. |
| -ep | Prompt for encryption key for strong encryption. |
| -i | Do not install Sybase jConnect support. |
| -ja | Install default runtime Java classes. |
| -jdk version | Install entries for the named version of the Java Development Kit. |
| -k | Omit Watcom SQL compatibility views SYS.SYSCOLUMNS and SYS.SYSINDEXES. |
| -l | List the recommended collation sequences. |
| -m file-name | Use a transaction log mirror (default is no mirror). |
| -n | No transaction log. |
| -o filename | Log output messages to a file. |
| -p page-size | Set page size. |
| -q | Quiet mode—do not print messages. |
| -s | Use checksums when writing pages to disk. |
| -t log-name | Transaction log filename (default is the database name with .log extension). |
| -z col-seq | Collation sequence used for comparisons. |
For example, the database test.db can be created with 4096 byte pages as follows:
dbinit -p 4096 test.db
@data
Use this option to read in options from the specified environment variable or configuration file. If both exist with the same name, the environment variable is used.
For more information about configuration files, see Using configuration files.
If you want to protect passwords or other information in the configuration file, you can use the File Hiding utility to obfuscate the contents of the configuration file.
For more information, see Hiding the contents of files using the dbfhide command-line utility.
Blank padding (-b)
Ignore trailing blanks for comparison purposes and pad strings that are fetched into character arrays. For example, the two strings
'Smith' 'Smith '
would be treated as equal in a database created with blank-padding.
This option is provided for compatibility with the ISO/ANSI SQL standard, which is to ignore trailing blanks in comparisons. The default is that blanks are significant for comparisons.
Case sensitivity for all string comparisons (-c)
For databases created with this option, all values are considered to be case sensitive in comparisons and string operations. Identifiers in the database are case insensitive, even in case sensitive databases.
This option is provided for compatibility with the ISO/ANSI SQL standard. The default is that all comparisons are case insensitive.
Case sensitivity for passwords (-cp)
By default, the case sensitivity of passwords is the same as the case sensitivity of the database. However, if you specify the -cp option, then passwords are case sensitive, regardless of the database case sensitivity. To specify that passwords are case insensitive, specify -cp-.
User ID and passwordAll databases are created with at least one user ID, DBA, with password SQL. Extended characters used in passwords are case sensitive regardless of the database sensitivity setting. User IDs, like other identifiers, are case insensitive even in case sensitive databases. |
Encrypt the database using simple encryption (-e)
Simple encryption makes it more difficult for someone to decipher the data in your database using a disk utility to look at the file. File compaction utilities cannot compress encrypted database files as much as unencrypted ones.
This simple encryption is equivalent to obfuscation and is intended only to keep data hidden in the event of casual direct access of the database file. For greater security, you can use strong encryption by supplying the -ea and -ek options.
Specify encryption algorithm (-ea)
This option allows you to choose a strong encryption algorithm to encrypt your new database. You can choose either AES (the default) or AES_FIPS for the FIPS-approved algorithm. AES_FIPS uses a separate library and is not compatible with AES. AES_FIPS is only available on all supported 32-bit Windows platforms. Algorithm names are case insensitive. If you specify the -ea option, you must also specify -ep or -ek.
For more information, see Strong encryption.
Separately licensable option requiredStrong database encryption using AES_FIPS requires that you obtain the separately-licensable SQL Anywhere Studio security option and is subject to export regulations.To order this component, see Separately-licensable components. |
Specify encryption key (-ek)
This option allows you to create a strongly encrypted database by specifying an encryption key directly in the command. The algorithm used to encrypt the database is AES or AES_FIPS as specified by the -ea option. If you specify the -ek option without specifying -ea, the AES algorithm is used.
| Caution Protect your key! Be sure to store a copy of your key in a safe location. A lost key will result in a completely inaccessible database, from which there is no recovery. |
The following are invalid for database encryption keys:
keys that begin with white space or single or double quotes
keys that end with white space
keys that contain semicolons
For more information, see Strong encryption.
Prompt for encryption key (-ep)
This option allows you to specify that you want to create a strongly encrypted database by inputting the encryption key in a dialog box. This provides an extra measure of security by never allowing the encryption key to be seen in clear text.
You must input the encryption key twice to confirm that it was entered correctly. If the keys don't match, the initialization fails.
For more information, see Strong encryption.
Do not install Sybase jConnect support (-i)
If you want to use the Sybase jConnect JDBC driver to access system catalog information, you need to install jConnect support. Use this option if you want to exclude the jConnect system objects. You can still use JDBC, as long as you do not access system information. If you want, you can add Sybase jConnect support at a later time using Sybase Central or the ALTER DATABASE statement.
For more information, see Installing jConnect system objects into a database.
Install runtime Java classes (-ja)
If you want to use Java in your database, you must install the runtime Java classes. Specifying -ja installs version 1.3 of the JDK into the database.
For example, the following command creates a database that supports JDK 1.3 applications in the database.
dbinit -ja java2.db
The runtime classes add several megabytes to the size of a database, so if you do not intend to use Java classes, you can omit the -ja option to avoid installing them.
You can add the runtime Java classes at a later time using the Upgrade Database wizard, or the ALTER DATABASE statement.
For more information, see Java-enabling a database and ALTER DATABASE statement.
Install support for the named version of the JDK (-jdk)
If you want to install a version of Java other than 1.3 into your database, use the -jdk option followed by the version number. Currently, the only other version of Java supported is 1.1.8.
For example, the following command creates a database that supports JDK 1.1.8 applications in the database.
dbinit -jdk 1.1.8 java2.db
The runtime classes add several megabytes to the size of a database, so if you do not intend to use Java classes, you can omit the -jdk option to avoid installing them.
The -jdk option implies the -ja option.
You can add the runtime Java classes at a later time using the Upgrade Database wizard, or the ALTER DATABASE statement.
For more information, see Java-enabling a database and ALTER DATABASE statement.
Omit Watcom SQL compatibility views (-k)
By default, database creation generates the views SYS.SYSCOLUMNS and SYS.SYSINDEXES for compatibility with system tables that were available in Watcom SQL (versions 4 and earlier of this software). These views will conflict with the Sybase Adaptive Server Enterprise compatibility views dbo.syscolumns and dbo.sysindexes.
List the available collation sequences (-l)
When you specify this option, dbinit lists the recommended collation sequences and then stops. No database is created. A list of available collation sequences is automatically presented in the Sybase Central Create Database wizard.
Use a transaction log mirror (-m)
A transaction log mirror is an identical copy of a transaction log, usually maintained on a separate device, for greater protection of your data. By default, Adaptive Server Anywhere does not use a mirrored transaction log.
Do not use a transaction log (-n)
Creating a database without a transaction log saves disk space. The transaction log is required for data replication and provides extra security for database information in case of media failure or system failure. Databases that do not use transaction logs typically run slower than databases that use transaction logs.
Log output messages to file (-o)
Write output messages to the named file.
Page size (-p)
The page size for a database can be (in bytes) 1024, 2048, 4096, 8192, 16384, or 32768, with 2048 being the default. Any other value for the size will be changed to the next larger size.
Large databases usually benefit from a larger page size. For example, the number of I/O operations required to scan a table is generally lower, as a whole page is read in at a time. Also, the number of levels in an index may be reduced as more entries can be stored on each page.
However, there are additional memory requirements for large page sizes. Also, the maximum number of rows stored on a page is 255, so that tables with small rows will not fill each page. For example, with 8 kb pages the average row size must be at least 32 bytes to fully use each page. For most applications, 16 kb or 32 kb page sizes are not recommended. You should not use page sizes of 16 kb or 32 kb in production systems unless you can be sure that a large database server cache is always available, and only after you have investigated the tradeoffs of memory and disk space with its performance characteristics.
Operate quietly (-q)
Do not display output messages.
Use checksums (-s)
Checksums are used to determine whether a database page has been modified on disk. When you create a database with checksums enabled, a checksum is calculated for each page just before it is written to disk. The next time the page is read from disk, the page's checksum is recalculated and compared to the checksum stored on the page. If the checksums are different, then the page has been modified or corrupted on disk.
Set the transaction log filename (-t)
The transaction log is a file where the database server logs all changes, made by all users, no matter what application is being used. The transaction log plays a key role in backup and recovery (see The transaction log), and in data replication. If the filename has no path, it is placed in the same directory as the database file. If you run dbinit without specifying -t or -n, a transaction log is created with the same filename as the database file, but with extension .log.
Collation sequence (-z)
The collation sequence is used for all string comparisons in the database.
If -z is not specified, Adaptive Server Anywhere chooses a default collation based on operating system language and character set settings.
For more information, see Choosing collations.
In order to change the collation that an existing database uses, it is necessary to unload the database, create a new database using the appropriate collation, and then reload the database. It may be necessary to translate the data as well.
If you want to create a custom collation, use the Collation utility to create a file containing the collation. Once you have modified the collation and inserted it into the appropriate scripts, you use the Initialization utility to create the database and specify the new collation.
You must change the collation label in the custom collation file. Otherwise, the Initialization utility prevents the insertion of the new collation, since it conflicts with an existing collation.
For more information on custom collation sequences, see International Languages and Character Sets.
For information on the Collation utility, see The Collation utility.
SQL Anywhere Studio 9.0.2
Copyright © 1989–2004 Sybase, Inc. Portions copyright © 2001–2004 iAnywhere Solutions, Inc. All rights reserved.