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

an_unload_db structure

Holds information needed to unload a database using the DBTools library or extract a remote database for SQL Remote. Those fields used by the dbxtract SQL Remote Extraction utility are indicated.

typedef struct an_unload_db {
    unsigned short      version;
    const char *        connectparms;
    const char *        startline;
    const char *        temp_dir;
    const char *        reload_filename;
    MSG_CALLBACK        errorrtn;
    MSG_CALLBACK        msgrtn;
    MSG_CALLBACK        statusrtn;
    MSG_CALLBACK        confirmrtn;
    char                unload_type;
    char                verbose;

    a_bit_field         unordered               : 1;
    a_bit_field         no_confirm              : 1;
    a_bit_field         use_internal_unload     : 1;
    a_bit_field         _unused1                : 1;
    a_bit_field         extract                 : 1;
    a_bit_field         table_list_provided     : 1;
    a_bit_field         exclude_tables          : 1;
    a_bit_field         more_flag_bits_present  : 1;
    a_sysinfo           sysinfo;

    const char *        remote_dir;
    const char *        _unused2;
    const char *        subscriber_username;
    const char *        _unused3;
    const char *        _unused4;
    unsigned short      isolation_level;
    a_bit_field         start_subscriptions     : 1;
    a_bit_field         exclude_foreign_keys    : 1;
    a_bit_field         exclude_procedures      : 1;
    a_bit_field         exclude_triggers        : 1;
    a_bit_field         exclude_views           : 1;
    a_bit_field         isolation_set           : 1;
    a_bit_field         include_where_subscribe : 1;
    a_bit_field         debug                   : 1;
    p_name              table_list;
    a_bit_short         escape_char_present     : 1;
    a_bit_short         _unused5                : 1;
    a_bit_short         use_internal_reload     : 1;
    unsigned short      _unused6;

    char                escape_char;
    char *              reload_connectparms;
    char *              reload_db_filename;
    a_bit_field         _unused7                : 1;
    char                unload_interrupted;
    a_bit_field         replace_db              : 1;
    const char *        locale;
    const char *        site_name;
    const char *        template_name;
    a_bit_field         preserve_ids            : 1;
    a_bit_field         exclude_hooks           : 1;
    char *              reload_db_logname;
    const char *        encryption_key;
    const char *        encryption_algorithm;
    a_bit_field         _unused8                : 1;
    a_bit_field         _unused9                : 1;
    unsigned short      reload_page_size;
    a_bit_field         recompute               : 1;
    a_bit_field         make_auxiliary          : 1;
    a_bit_field         encrypted_tables        : 1;
    a_bit_field         remove_encrypted_tables : 1;
} an_unload_db;
versionDBTools version number.

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.

startline Obsolete. The startline field is no longer used. The database server would be started by the connection string START parameter. Refer to connectparms for details.
temp_dir Directory for unloading data files.
reload_filenameThe dbunload -r option, something like "reload.sql".
errorrtnCallback routine for handling an error message.
msgrtn Callback routine for handling an information message.
statusrtn Callback routine for handling a status message.
confirmrtn Callback routine for confirming an action.
unload_type See dbunload type enumeration.
verbose See Verbosity enumeration.
unordered dbunload -u sets TRUE.
no_confirm dbunload -y sets TRUE.
use_internal_unload dbunload -i? sets TRUE.
extract TRUE if dbxtract, otherwise FALSE.
table_list_provided dbunload -e list or -i sets TRUE.

dbunload -e sets TRUE. dbunload -i (undocumented) sets FALSE.

more_flag_bits_present Usually set TRUE.
sysinfo (internal use)
remote_dir (like temp_dir) but for internal unloads // on server side.
subscriber_username Argument to dbxtract.
isolation_level dbxtract -l sets value.
start_subscriptions dbxtract TRUE by default, -b sets FALSE.
exclude_foreign_keys dbxtract -xf sets TRUE.
exclude_procedures dbxtract -xp sets TRUE.
exclude_triggers dbxtract -xt sets TRUE.
exclude_views dbxtract -xv sets TRUE.
isolation_set dbxtract -l sets TRUE.
include_where_subscribe dbxtract -f sets TRUE.
debug (internal use)
table_list Selective table list.
escape_char_present -p sets TRUE and escape_char must be set.
use_internal_reload Usually set TRUE; -ix/-xx sets FALSE; -ii/-xi sets TRUE.
escape_char Used when escape_char_present is TRUE.
reload_connectparms User ID, password, database for reload database.
reload_db_filename The file name of reload database to create.
unload_interrupted Set if unload interrupted.
replace_db dbunload -ar sets TRUE.
locale (internal use) locale (language and charset).
site_name For dbxtract: specify a site name.
template_name For dbxtract: specify a template name.
preserve_ids dbunload sets TRUE/-m sets FALSE .
exclude_hooks dbxtract -hx sets TRUE.
reload_db_logname Log file name for the reload database.
encryption_key -ek sets string.
encryption_algorithm -ea sets, "aes" or "aes_fips".
reload_page_size dbunload -ap sets value. Set page size of rebuilt database.
recomputedbunload -dc sets TRUE. Re-compute all computed columns.
make_auxiliarydbunload -k sets TRUE. Make auxiliary catalog (for use with diagnostic tracing).
encrypted_tablesdbunload -et sets TRUE. Enable encrypted tables in new database (used with -an or -ar).
remove_encrypted_tables dbunload -er sets TRUE. Remove encryption from encrypted tables.

The members correspond to features accessible from the dbunload and dbxtract utilities.

See the dbtools.h header file for additional comments.

See also