Collection Contents Index The Information utility The Interactive SQL utility pdf/chap4.pdf

Reference Manual
   CHAPTER 4. Database Administration Utilities     

The Initialization utility


With the Initialization utility, you can initialize (create) a database. A number of database attributes are specified at initialization and cannot be changed later except by unloading, reinitializing, and rebuilding the entire database:

In addition, the choice of whether to use a transaction log and a transaction log mirror is made at initialization. This choice can be changed later using the transaction log utility.

You can access the Initialization utility in the following ways:

The personal server is required by the initialization utility and must be running during the initialization process.

Top of page  Creating a database in Sybase Central

  To create a database:
  1. Open the Database Utilities folder in the left panel.

  2. Double-click Create Database in the right panel. The Database Creation wizard is displayed.

  3. Follow the instructions in the wizard.

For Info     For full information on creating a database in Sybase Central, see the Sybase Central online Help.

Top of page  The DBINIT command-line utility

Syntax 

dbinit [switches] new-database-file

Windows 3.x
syntax 

dbinitw [switches] new-database-file

Switch

Description

-b

Blank padding of strings for comparisons

-c

Case sensitivity for all string comparisons

-e

Encrypt the database

-i

Do not install Sybase jConnect support

-j

Do not install Sybase runtime Java classes

-k

Omit Watcom SQL compatibility views SYS.SYSCOLUMNS and SYS.SYSINDEXES

-l

List the available collating sequences

-m file-name

Use a transaction log mirror (default is no mirror)

-n

No transaction log

-o filename

Output messages to file

-p page-size

Set page size

-q

Quiet mode—do not print messages

-t log-name

Transaction log filename (default is the database name with .log extension)

-z col-seq

Collation sequence used for comparisons

Description 

For example, the database test.db can be created with 1024 byte pages as follows:

dbinit -p 1024 test.db

For Info     For more information about the command-line switches, see Initialization utility options.

Top of page  Initialization utility options

Ignore trailing blanks (-b )     Trailing blanks are ignored for comparison purposes, and embedded SQL programs pad strings that are fetched into character arrays. For example, the two strings

'Smith'
'Smith   '

would be treated as equal in a database that ignores trailing blanks.

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.

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 database that requires case-sensitive comparisons, the DBA user ID and its password must be entered in upper case.

Encrypt the database (-e )     Encryption makes it more difficult for someone to decipher the data in your database by using a disk utility to look at the file. File compaction utilities cannot compress encrypted database files as much as unencrypted ones.

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.

Do not install Sybase runtime Java classes (-j)     If you wish to use Java in your database, you must install the Sybase runtime Java classes. By default, these classes are installed. The runtime classes add several megabytes to the size of a database, so if you do not intend to use Java classes, you can specify the -j switch to avoid installing them.

Omit Watcom SQL compatibility views (-k)     By default, the dbinit command-line utility 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 command-line switch is used.

List the available collating sequences (-l )     dbinit lists the available collating sequences and then stops. No database is created. The list of available collating sequences is automatically presented in Sybase Central and in the Interactive SQL Database Tools window.

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.

Output log messages to file (-o )     Redirect log messages to the named file.

Page size (-p )     The page size for a database can be 512, 1024, 2048 or 4096 bytes, with 1024 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.

Operate quietly (-q )     Do not display messages on a window. This option is available only from the command-line utility.

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 or collation filename (-z )     The collation sequence is used for all string comparisons in the database.

The database is created with all of the collations that are listed in SYS.SYSCOLLATION.

If you want to use a custom collation, use the Collation utility to extract the closest collation from the database. You can then modify the collation and add it to the file custom.sql in the scripts subdirectory of your installation directory. Finally, 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 will be a duplicate label.

For Info     For more information on custom collating sequences, see Database Collations and International Languages.

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, then reload the database.

If -z is specified and names a collation, that collation will be used by the database. If -z is specified but does not name a collation, it is assumed that the name is a filename, and the file will be opened and the collation will be parsed from the file. The specified collation will then be used by the database.

If -z is not specified, the default collation is used. Normal ASCII (binary) ordering is used for the lower 128 characters. 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).

The following table identifies the available collating sequence labels. All collating sequences except EBCDIC do not affect the normal ASCII character set (lower 128).

Collation name

Type

Description

internal

OEM

Based on Code page 850

437

OEM

Code page 437, ASCII, United States

850

OEM

Code page 850, ASCII, Multilingual

852

OEM

Code page 852, ASCII, Slavic/Latin II

860

OEM

Code page 860, ASCII, Portugal

863

OEM

Code page 863, ASCII, Canada-French

865

OEM

Code page 865, ASCII, Norway

EBCDIC

ANSI

EBCDIC

437EBCDIC

OEM

Code Page 437, EBCDIC

437LATIN1

OEM

Code Page 437, Latin 1

437ESP

OEM

Code Page 437, Spanish

437SVE

OEM

Code Page 437, Swedish/Finnish

819CYR

ANSI

Code Page 819, Cyrillic

819DAN

ANSI

Code Page 819, Danish

819ELL

ANSI

Code Page 819, Greek

819ESP

ANSI

Code Page 819, Spanish

819ISL

ANSI

Code Page 819, Icelandic

819LATIN1

ANSI

Code Page 819, Latin 1

819LATIN2

ANSI

Code Page 819, Latin 2

819NOR

ANSI

Code Page 819, Norwegian

819RUS

ANSI

Code Page 819, Russian

819SVE

ANSI

Code Page 819, Swedish/Finnish

819TRK

ANSI

Code Page 819, Turkish

850CYR

OEM

Code Page 850, Cyrillic

850DAN

OEM

Code Page 850, Danish

850ELL

OEM

Code Page 850, Greek

850ESP

OEM

Code Page 850, Spanish

850ISL

OEM

Code Page 850, Icelandic

850LATIN1

OEM

Code Page 850, Latin 1

850LATIN2

OEM

Code Page 850, Latin 2

850NOR

OEM

Code Page 850, Norwegian

850RUS

OEM

Code Page 850, Russian

850SVE

OEM

Code Page 850, Swedish/Finnish

850TRK

OEM

Code Page 850, Turkish

852LATIN2

OEM

Code Page 852, Latin 2

852CYR

OEM

Code Page 852, Cyrillic

855CYR

OEM

Code Page 855, Cyrillic

856HEB

OEM

Code Page 856, Hebrew

857TRK

OEM

Code Page 857, Turkish

860LATIN1

OEM

Code Page 860, Latin 1

861ISL

OEM

Code Page 861, Icelandic

862HEB

OEM

Code Page 862, Hebrew

863LATIN1

OEM

Code Page 863, Latin 1

865NOR

OEM

Code Page 865, Norwegian

866RUS

OEM

Code Page 866, Russian

869ELL

OEM

Code Page 869, Greek

920TRK

ANSI

Code page 920, Turkish

SJIS

ANSI

Japanese Shift-JIS Encoding

SJIS2

ANSI

Japanese Shift-JIS Encoding, Sybase Adaptive Server Enterprise-compatible

EUC_JAPAN

ANSI

Japanese EUC JIS X 0208-1990 and JIS X 0212-1990 Encoding

EUC_CHINA

ANSI

Chinese GB 2312-80 Encoding

EUC_TAIWAN

ANSI

Taiwanese Big 5 Encoding

EUC_KOREA

ANSI

Korean KS C 5601-1992 Encoding

UTF8

ANSI

UCS-4 Transformation Format

ISO_1

ANSI

ISO8859-1, Latin 1

ISO_BINENG

ANSI

Binary ordering, English ISO/ASCII 7-bit letter case mappings

WIN_LATIN1

ANSI

Windows Latin 1, similar to ISO_1, ISO8859-1, with extensions

WIN_LATIN5

ANSI

A superset of ISO 8859-9 with characters also in 80-9F

Top of page  


Collection Contents Index The Information utility The Interactive SQL utility pdf/chap4.pdf