Holds information needed for the dbremote utility using the DBTools library.
typedef struct a_remote_sql
Member name | Type | Description |
---|---|---|
apply |
a_bit_field |
Normally set TRUE. When not set, messages are scanned but not applied. Corresponds to dbremote -a option. |
argv |
char ** |
Pointer to a parsed command line (a vector of pointers to strings). If not NULL, then DBRemoteSQL will call a message routine to display each command line argument except those prefixed with -c, -cq, or -ek. |
batch |
a_bit_field |
When set TRUE, force exit after applying message and scanning log (this is the same as at least one user having 'always' send time). When cleared, allow run mode to be determined by remote users send times. |
confirmrtn |
MSG_CALLBACK |
Address of a confirmation request callback routine or NULL. |
connectparms |
char * |
Parameters needed to connect to the database. They take the form of connection strings, such as the following: "UID=DBA;PWD=sql;DBF=demo.db". The database server would be started by the connection string START parameter. For example: "START=c:\SQLAny12\bin32\dbeng12.exe". A full example connection string including the START parameter: "UID=DBA;PWD=sql;DBF=demo.db;START=c:\SQLAny12\bin32\dbeng12.exe". |
debug |
a_bit_field |
When set TRUE, debug output is included. |
debug_dump_size |
a_sql_uint32 |
Reserved for internal use and must set to 0. |
debug_page_offsets |
a_bit_field |
Reserved for internal use and must set to FALSE. |
default_window_title |
char * |
A pointer to the default window title string. |
deleted |
a_bit_field |
Normally set TRUE. When not set, messages are not deleted after they are applied. Corresponds to dbremote -p option. |
encryption_key |
char * |
Pointer to an encryption key. Corresponds to the dbremote -ek option. |
errorrtn |
MSG_CALLBACK |
Address of an error message callback routine or NULL. |
frequency |
a_sql_uint32 |
Set the polling frequency for incoming messages. This value should be set to the max( 1, receive_delay/60 ). See receive_delay below. |
full_q_scan |
a_bit_field |
Reserved for internal use and must set to FALSE. |
include_scan_range |
char * |
Reserved for internal use and must set to NULL. |
latest_backup |
a_bit_field |
When set TRUE, only logs that are backed up are processed. Don't send operations from a live log. Corresponds to the dbremote -u option. |
link_debug |
a_bit_field |
When set TRUE, debugging will be turned on for links. |
locale |
char * |
Reserved for internal use and must set to NULL. |
log_file_name |
const char * |
Pointer to the name of the DBRemoteSQL output log to which the message callbacks print their output. If send is TRUE, the error log is sent to the consolidated (unless this pointer is NULL). |
log_size |
a_sql_uint32 |
DBRemoteSQL renames and restarts the online transaction log when the size of the online transaction log is greater than this value. Corresponds to the dbremote -x option. |
logrtn |
MSG_CALLBACK |
Pointer to a function that prints the given message to a log file. These messages do not need to be seen by the user. |
max_length |
a_sql_uint32 |
Set to the maximum length (in bytes) a message can have. This affects sending and receiving. The recommended value is 50000. Corresponds to the dbremote -l option. |
memory |
a_sql_uint32 |
Set to the maximum size (in bytes) of memory buffers to use while building messages to send. The recommended value is at least 2 * 1024 * 1024. Corresponds to the dbremote -m option. |
mirror_logs |
char * |
Pointer to the name of the directory containing offline mirror transaction logs. Corresponds to the dbremote -ml option. |
more |
a_bit_field |
This should be set to TRUE. |
msgqueuertn |
MSG_QUEUE_CALLBACK |
Function called by DBRemoteSQL when it wants to sleep. The parameter specifies the sleep period in milliseconds. The function should return the following, as defined in dllapi.h.
|
msgrtn |
MSG_CALLBACK |
Address of an information message callback routine or NULL. |
no_user_interaction |
a_bit_field |
When set TRUE, no user interaction is requested. |
operations |
a_sql_uint32 |
This value is used when applying messages. Commits are ignored until DBRemoteSQL has at least this number of operations(inserts, deletes, updates) that are uncommitted. Corresponds to the dbremote -g option. |
patience_retry |
a_sql_uint32 |
Set this to the number of polls for incoming messages that DBRemoteSQL should wait before assuming that a message it is expecting is lost. For example, if patience_retry is 3 then DBRemoteSQL tries up to three times to receive the missing message. Afterward, it sends a resend request. The recommended value is 1. Corresponds to the dbremote -rp option. |
progress_index_rtn |
SET_PROGRESS_CALLBACK |
Pointer to a function that updates the state of the progress bar. This function takes two unsigned integer arguments index and max. On the first call, the values are the minimum and maximum values (for example, 0, 100). On subsequent calls, the first argument is the current index value (for example, between 0 and 100) and the second argument is always 0. |
progress_msg_rtn |
MSG_CALLBACK |
Pointer to a function that displays a progress message. |
queueparms |
char * |
Reserved for internal use and must set to NULL. |
receive |
a_bit_field |
When set TRUE, messages are received. If receive and send are both FALSE then both are assumed TRUE. It is recommended to set receive and send FALSE. Corresponds to the dbremote -r option. |
receive_delay |
a_sql_uint32 |
Set this to the time (in seconds) to wait between polls for new incoming messages. The recommended value is 60. Corresponds to the dbremote -rd option. |
remote_output_file_name |
char * |
Pointer to the name of the DBRemoteSQL remote output file. Corresponds to the dbremote -ro or -rt option. |
rename_log |
a_bit_field |
When set TRUE, logs are renamed and restarted (DBRemoteSQL only). |
resend_urgency |
a_sql_uint32 |
Set the time (in seconds) that DBRemoteSQL waits after seeing that a user needs a rescan before performing a full scan of the log. Set to zero to allow DBRemoteSQL to choose a good value based on user send times and other information it has collected. Corresponds to the dbremote -ru option. |
scan_log |
a_bit_field |
Reserved for internal use and must set to FALSE. |
send |
a_bit_field |
When set TRUE, messages are sent. If receive and send are both FALSE then both are assumed TRUE. It is recommended to set receive and send FALSE. Corresponds to the dbremote -s option. |
send_delay |
a_sql_uint32 |
Set the time (in seconds) between scans of the log file for new operations to send. Set to zero to allow DBRemoteSQL to choose a good value based on user send times. Corresponds to the dbremote -sd option. |
set_window_title_rtn |
SET_WINDOW_TITLE_CALLBACK |
Pointer to a function that resets the title of the window (Windows only). The title could be "database_name (receiving, scanning, or sending) - default_window_title". |
threads |
a_sql_uint32 |
Set the number of worker threads that should be used to apply messages. This value must not exceed 50. Corresponds to the dbremote -w option. |
transaction_logs |
char * |
Should identify the directory with offline transaction logs (DBRemoteSQL only). Corresponds to the transaction_logs_directory argument of dbremote. |
triggers |
a_bit_field |
This should usually be cleared (FALSE) in most cases. When set TRUE, trigger actions are replicated. Care should be exercised. |
truncate_remote_output_file |
a_bit_field |
When set TRUE, the remote output file is truncated rather than appended to. Corresponds to the dbremote -rt option. |
unused |
a_bit_field |
Reserved for internal use and must set to FALSE. |
use_hex_offsets |
a_bit_field |
When set TRUE, log offsets are shown in hexadecimal notation; otherwise decimal notation is used. |
use_relative_offsets |
a_bit_field |
When set TRUE, log offsets are displayed as relative to the start of the current log file. When set FALSE, log offsets from the beginning of time are displayed. |
verbose |
a_bit_field |
When set, extra information is produced. Corresponds to the dbremote -v option. |
version |
unsigned short |
DBTools version number (DB_TOOLS_VERSION_NUMBER). |
warningrtn |
MSG_CALLBACK |
Pointer to a function that displays the given warning message. If NULL, the errorrtn function is called instead. |
The dbremote utility sets the following defaults before processing any command-line options:
version = DB_TOOLS_VERSION_NUMBER
argv = (argument vector passed to application)
deleted = TRUE
apply = TRUE
more = TRUE
link_debug = FALSE
max_length = 50000
memory = 2 * 1024 * 1024
frequency = 1
threads = 0
receive_delay = 60
send_delay = 0
log_size = 0
patience_retry = 1
resend_urgency = 0
log_file_name = (set from command line)
truncate_remote_output_file = FALSE
remote_output_file_name = NULL
no_user_interaction = TRUE (if user interface is not available)
errorrtn = (address of an appropriate routine)
msgrtn = (address of an appropriate routine)
confirmrtn = (address of an appropriate routine)
msgqueuertn = (address of an appropriate routine)
logrtn = (address of an appropriate routine)
warningrtn = (address of an appropriate routine)
set_window_title_rtn = (address of an appropriate routine)
progress_msg_rtn = (address of an appropriate routine)
progress_index_rtn = (address of an appropriate routine)
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |