Collection Contents Previous Next PDF

ASA Programming Guide

The Database Tools Interface

DBTools structures

an_unload_db structure


Function 

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 *         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         dbo_avail : 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 *         dbo_username;
const char *         subscriber_username;
const char *         publisher_address_type;
const char *         publisher_address;
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         view_iterations_present : 1;
a_bit_short      use_internal_reload   : 1;

unsigned short      view_iterations;
char            escape_char;
char *         reload_connectparms;
char *         reload_db_filename;
a_bit_field         output_connections: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         syntax_version_7:1;
a_bit_field         remove_java:1;
unsigned short     reload_page_size;
} 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=c:\asa\asademo.db"
The database server would be started by the connection string START parameter. The following is an example.
"START=d:\asa90\win32\dbeng9.exe"
A full example connection string including the START parameter:
"userid=dba;password=sql;dbf=d:\asa90\asademo.db;start=d:\asa90\win32\dbeng9.exe"
For the full range of connection string options, 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 connectparams for details.
temp_dir directory for unloading data files
reload_filename dbunload -r option, something like "reload.sql"
errorrtn optional user callback
msgrtn optional user callback
statusrtn optional user callback
confirmrtn optional user callback
unload_type UNLOAD_xxx (shown above)
verbose VB_xxx (shown above)
unordered dbunload -u sets TRUE
no_confirm dbunload -y sets TRUE
use_internal_unload dbunload -i? sets TRUE
dbo_avail Obsolete
extract TRUE if dbxtract, otherwise FALSE
table_list_provided dbunload -e <list> or -i sets TRUE
exclude_tables 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
dbo_username The dbo_username functionality has been dropped as of 6.0 // you can leave it set to NULL
subscriber_username argument to dbxtract
publisher_address_type (unused)
publisher_address (unused)
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/mlxtract sets TRUE
debug (internal use)
table_list selective table list
escape_char_present -p sets TRUE and // escape_char must be set
view_iterations_present (unused)
use_internal_reload usually set TRUE // -ix/-xx sets FALSE // -ii/-xi sets TRUE
view_iterations (unused)
escape_char used when escape_char_present is TRUE
reload_connectparms userid,password,database for reload database
reload_db_filename filename of reload database to create
output_connections (internal use)
unload_interrupted (internal use)
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 filename for the reload database
encryption_key -ek sets string
encryption_algorithm -ea sets, "aes" or "aes_fips"
syntax_version_7 mlxtract -s7 sets TRUE
remove_java -jr sets TRUE
reload_page_size dbunload -ap sets value

The members correspond to features accessible from the dbunload and dbxtract, and mlxtract command-line utilities.

See the dbtools.h header file for additional comments.

See also 

DBUnload function

a_name structure

dbunload type enumeration

For more information on callback functions, see Using callback functions.


Collection Contents Previous Next PDF