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.

Syntax
typedef struct an_unload_db {
    unsigned short      version;
    const char *        connectparms;
    const char *        temp_dir;
    const char *        reload_filename;
    char *              reload_connectparms;
    char *              reload_db_filename;
    MSG_CALLBACK        errorrtn;
    MSG_CALLBACK        msgrtn;
    MSG_CALLBACK        statusrtn;
    MSG_CALLBACK        confirmrtn;
    char                unload_type;
    char                verbose;
    char                escape_char;
    char                unload_interrupted;
    a_bit_field         unordered               : 1;
    a_bit_field         no_confirm              : 1;
    a_bit_field         use_internal_unload     : 1;
    a_bit_field         refresh_mat_view        : 1;
    a_bit_field         table_list_provided     : 1;
    a_bit_field         exclude_tables          : 1;
    a_bit_field         preserve_ids            : 1;
    a_bit_field         replace_db              : 1;
    a_bit_short         escape_char_present     : 1;
    a_bit_short         use_internal_reload     : 1;
    a_bit_field         recompute               : 1;
    a_bit_field         make_auxiliary          : 1;
    a_bit_field         encrypted_tables        : 1;
    a_bit_field         remove_encrypted_tables : 1;
    a_bit_field         extract                 : 1;
    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         exclude_hooks           : 1;
    a_bit_field         startline_name          : 1;
    a_bit_field         debug                   : 1;
    a_bit_field         compress_output         : 1;
    a_bit_field         schema_reload           : 1;
    a_bit_field         genscript               : 1;
    a_bit_field         runscript               : 1;
    const char *        ms_filename;
    int                 ms_reserve;
    int                 ms_size;
    p_name              table_list;
    a_sysinfo           sysinfo;
    const char *        remote_dir;
    const char *        subscriber_username;
    unsigned short      isolation_level;
    const char *        site_name;
    const char *        template_name;
    char *              reload_db_logname;
    const char *        encryption_key;
    const char *        encryption_algorithm;
    unsigned short      reload_page_size;
    const char *        locale;
    const char *        startline;
    const char *        startline_old;
} an_unload_db;
Members
Members Description
version DBTools version number.
connectparms

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

"UID=DBA;PWD=sql;DBF=samples-dir\demo.db"

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

"START=d:\sqlany11\bin32\dbeng11.exe"

A full example connection string including the START parameter:

"UID=DBA;PWD=sql;DBF=samples-dir\demo.db;START=d:\sqlany11\bin32\dbeng11.exe"

For a list of connection parameters, see Connection parameters.

temp_dir Directory for unloading data files.
reload_filename The dbunload -r option, something like reload.sql.
reload_connectparms User ID, password, database for reload database.
reload_db_filename The file name of reload database to create.
errorrtn Callback 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.
escape_char Used when escape_char_present is TRUE.
unload_interrupted Set if unload interrupted.
unordered dbunload -u sets TRUE.
no_confirm dbunload -y sets TRUE.
use_internal_unload dbunload -i? sets TRUE. dbunload -x? sets FALSE.
refresh_mat_view dbunload -g sets TRUE.
table_list_provided dbunload -e list or -i sets TRUE.
exclude_tables

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

preserve_ids dbunload sets TRUE/-m sets FALSE.
replace_db dbunload -ar sets TRUE.
escape_char_present dbunload -p sets TRUE. Note that escape_char must be set.
use_internal_reload Usually set TRUE; -ix/-xx sets FALSE; -ii/-xi sets TRUE.
recompute dbunload -dc sets TRUE. Re-compute all computed columns.
make_auxiliary dbunload -k sets TRUE. Make auxiliary catalog (for use with diagnostic tracing).
encrypted_tables dbunload -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.
extract TRUE if dbxtract, otherwise FALSE.
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.
exclude_hooks dbxtract -hx sets TRUE.
startline_name (internal use)
debug (internal use)
compress_output dbunload -cp sets TRUE.
schema_reload (internal use)
genscript (internal use)
runscript (internal use)
ms_filename (internal use)
ms_reserve (internal use)
ms_size (internal use)
table_list Selective table list
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.
site_name For dbxtract: specify a site name.
template_name For dbxtract: specify a template name.
reload_db_logname Log file name for the reload database.
encryption_key -ek sets string.
encryption_algorithm -ea sets one of "AES", "AES256", "AES_FIPS", or "AES256_FIPS".
reload_page_size dbunload -ap sets value. Set page size of rebuilt database.
locale (internal use) locale (language and charset).
startline (internal use)
startline_old (internal use)

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

See the dbtools.h header file for additional comments.

See also