Contents Index Creating a database using the dbinit command-line utility The Interactive SQL utility

ASA Database Administration Guide
  Database Administration Utilities
    The Initialization utility
      Creating a database using the dbinit command-line utility

Initialization utility options

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.

For related information, see ANSINULL option [compatibility].

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.

User ID and password  
All databases are created with at least one user ID, DBA, with password SQL. If you create a case-sensitive database, all passwords are case sensitive. 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 which strong encryption algorithm to encrypt your database with. You can choose either AES or MDSR. Algorithm names are case insensitive. If you specify the -ea option, you must also specify either -ep or -ek.

Specify encryption key (-ek)    This option allows you to create a strongly encrypted database by specifying an encryption key directly in the command. If you specify the -ek option without specifying an algorithm (-ea option), the algorithm used is AES.

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. If you specify the -ep option without specifying an algorithm (-ea option), the algorithm used is AES.

You must input the encryption key twice to confirm that it was entered correctly. If the keys don't match, the initialization fails.

Do not install Sybase jConnect support (-i)    If you wish to use the Sybase jConnect JDBC driver to access system catalog information, you need to install jConnect support. Use this option if you wish 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.

For more information, see Installing jConnect system objects into a database.

Do not install runtime Java classes (-j)    If you do not intend to use Java classes, you can specify either no Java option, or the -j option to avoid including these classes in the database.

You can add Sybase runtime Java classes later using the Upgrade Database wizard, or the ALTER DATABASE statement.

For more information, see Java-enabling a database.

Install runtime Java classes (-ja)    If you wish 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.

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.

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 unless the -c case sensitivity option is used.

List the available collating sequences (-l)    dbinit lists the recommended collating sequences and then stops. No database is created. A list of available collating 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. This option is available only when you run this utility from the command prompt.

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 system 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.

Collating sequence (-z)    The collation sequence is used for all string comparisons in the database.

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 collating sequences, see International Languages and Character Sets. For information on the Collation utility, see The Collation utility.

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 -z is not specified, the default collation is used. Normal ASCII (binary) ordering is used for the lower 128 characters, subject to the case sensitivity setting (-c). For the upper 128 characters (also called the extended characters), any character that is an accented form of a letter in the lower 128 are sorted to the same position as the unaccented form. The determination of whether or not an extended character is an accented letter is based upon code page 850 (multilingual code page).

For a list of the available collating sequence labels, see Understanding collations.


Contents Index Creating a database using the dbinit command-line utility The Interactive SQL utility