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_create_db structure Next Page

a_db_info structure

Holds the information needed to return dbinfo information using the DBTools library.

typedef struct a_db_info {
    unsigned short      version;
    MSG_CALLBACK        errorrtn;
    const char *        _unused0;
    unsigned short      dbbufsize;
    char *              dbnamebuffer;
    unsigned short      logbufsize;
    char *              lognamebuffer;
    unsigned short      _unused1;
    char *              _unused2;
    a_bit_field         quiet    : 1;
    a_bit_field         _unused3 : 1;
    a_sysinfo           sysinfo;
    a_sql_uint32        free_pages;
    a_bit_field         _unused4 : 1;

    const char *        connectparms;
    const char *        _unused5;
    MSG_CALLBACK        msgrtn;
    MSG_CALLBACK        statusrtn;
    a_bit_field         page_usage : 1;
    a_table_info *      totals;
    a_sql_uint32        file_size;
    a_sql_uint32        unused_pages;
    a_sql_uint32        other_pages;
    unsigned short      mirrorbufsize;
    char *              mirrornamebuffer;
    const char *        _unused6;
    char *              collationnamebuffer;
    unsigned short      collationnamebufsize;
    char *              _unused7;
    unsigned short      _unused8;
    a_bit_field         checksum : 1;
    a_bit_field         encrypted_tables : 1;
    a_sql_uint32        bit_map_pages;
} a_db_info;
Member Description
version DBTools version number.
errortrn Callback routine for handling an error message.
dbbufsize The length of the dbnamebuffer member.
dbnamebuffer Database file name.
logbufsize The length of the lognamebuffer member.
lognamebuffer Transaction log file name.
_unused1 (unused)
_unused2 (unused)
quiet Operate without confirming messages.
sysinfo Pointer to a_sysinfo structure.
free_pages Number of free pages.

Parameters needed to connect to the database. They take the form of connection strings, such as the following:


The database server would be started by the connection string START parameter. For example:


A full example connection string including the START parameter:


For a list of connection parameters, see Connection parameters.

msgrtn Callback routine for handling an information message.
statusrtn Callback routine for handling a status message.
page_usage 1 to report page usage statistics, otherwise 0.
totals Pointer to a_table_info structure.
file_size Size of database file.
unused_pages Number of unused free pages.
other_pages Number of pages that are not table pages, index pages, free pages, or bitmap pages.
mirrorbufsize The length of the mirrornamebuffer member.
mirrornamebuffer The transaction log mirror name.
collationnamebuffer The database collation name and label (the maximum size is 128+1).
collationnamebufsize The length of the collationnamebuffer member.
checksum Database page checksums enabled if 1, disabled if 0.
encrypted_tables Encrypted tables are supported if 1, disabled if 0.
bit_map_pages Number of bitmap pages in the database.
See also