Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Programming » Database Tools Interface » DBTools structures

a_change_log structure Next Page

a_create_db structure

Holds the information needed to create a database using the DBTools library.

typedef struct a_create_db {
    unsigned short      version;
    const char          *dbname;
    const char          *logname;
    const char          *startline;
    unsigned short      page_size;
    const char          *default_collation;
    const char          *encoding;
    MSG_CALLBACK        errorrtn;
    MSG_CALLBACK        msgrtn;
    short               _unused1;
    char                verbose;

    a_bit_field         blank_pad               : 2;
    a_bit_field         respect_case            : 1;
    a_bit_field         encrypt                 : 1;
    a_bit_field         _unused2                : 1;
    a_bit_field         _unused3                : 1;
    a_bit_field         _unused4                : 1;
    a_bit_field         avoid_view_collisions   : 1;
    short               _unused5;
    const char          *_unused6;
    const char          *_mirrorname;
    const char          *_unused7;
    a_bit_field         _unused8                : 1;
    a_bit_field         jconnect                : 1;
    const char          *data_store_type;
    const char          *encryption_key;
    const char          *encryption_algorithm;
    const char          *_unused9;
    a_bit_field         _unused10               : 1;
    a_bit_field         checksum                : 1;
    a_bit_field         encrypted_tables        : 1;
    char                accent_sensitivity;
    const char          *nchar_collation;
    char                *dba_uid;
    char                *dba_pwd;
    unsigned int        db_size;
    int                 db_size_unit;
} a_create_db;
Member Description
version DBTools version number.
dbname Database file name.
logname New transaction log name.

The command line used to start the database server. For example:


The default start line is used if this member is NULL

The following is the default START parameter:

"dbeng10 -gp page_size -c 10M"
page_size The page size of the database.
default_collation The collation for the database.
errorrtn Callback routine for handling an error message.
msgrtn Callback routine for handling an information message.
verbose See Verbosity enumeration.
blank_pad Must be one of NO_BLANK_PADDING or BLANK_PADDING. Treat blanks as significant in string comparisons and hold index information to reflect this. See Blank padding enumeration.
respect_case Make string comparisons case sensitive and hold index information to reflect this.
encrypt When set, generates the ENCRYPTED ON or, when encrypted_tables is also set, the ENCRYPTED TABLES ON clause.
avoid_view_collisions Omit the generation of Watcom SQL compatibility views SYS.SYSCOLUMNS and SYS.SYSINDEXES.
mirrorname Transaction log mirror name.
jconnect Include system procedures needed for jConnect.
data_store_type Reserved. Use NULL.
encryption_key The encryption key for the database file. Used with encrypt, it generates the KEY clause.
encryption_algorithm The encryption algorithm (AES or AES_FIPS). Used with encrypt and encryption_key, it generates the ALGORITHM clause.
checksum Set to 1 for ON or 0 for OFF. Generates one of CHECKSUM ON or CHECKSUM OFF clauses.
encrypted_tables Set to 1 for encrypted tables. Used with encrypt, generates the ENCRYPTED TABLE ON clause instead of the ENCRYPTED ON clause.
accent_sensitivity One of y, n, or f (yes, no, french). Generates one of the ACCENT RESPECT, ACCENT IGNORE or ACCENT FRENCH clauses.
nchar_collation If not NULL, use to generate the NCHAR COLLATION clause with specified string.
dba_uid When not NULL, generates the DBA USER xxx clause.
dba_pwd When not NULL, generates the DBA PASSWORD xxx clause.
db_size When not 0, generates the DATABASE SIZE clause.
db_size_unit Used with db_size, must be one of DBSP_UNIT_NONE, DBSP_UNIT_PAGES, DBSP_UNIT_BYTES, DBSP_UNIT_KILOBYTES, DBSP_UNIT_MEGABYTES, DBSP_UNIT_GIGABYTES, DBSP_UNIT_TERABYTES. When not DBSP_UNIT_NONE, it generates the corresponding keyword (for example, DATABASE SIZE 10 MB is generated when db_size is 10 and db_size_unit is DBSP_UNIT_MEGABYTES). See Database size unit enumeration.
See also