保存有关使用 DBTools 库转换事务日志所需的信息。
typedef struct a_translate_log { unsigned short version; const char * connectparms; const char * logname; const char * sqlname; const char * encryption_key; const char * logs_dir; p_name userlist; a_sql_uint32 since_time; MSG_CALLBACK confirmrtn; MSG_CALLBACK errorrtn; MSG_CALLBACK msgrtn; MSG_CALLBACK logrtn; MSG_CALLBACK statusrtn; char userlisttype; a_bit_field quiet : 1; a_bit_field remove_rollback : 1; a_bit_field ansi_sql : 1; a_bit_field since_checkpoint : 1; a_bit_field replace : 1; a_bit_field include_trigger_trans : 1; a_bit_field comment_trigger_trans : 1; a_bit_field debug : 1; a_bit_field debug_sql_remote : 1; a_bit_field debug_dump_hex : 1; a_bit_field debug_dump_char : 1; a_bit_field debug_page_offsets : 1; a_bit_field omit_comments : 1; a_bit_field use_hex_offsets : 1; a_bit_field use_relative_offsets : 1; a_bit_field include_audit : 1; a_bit_field chronological_order : 1; a_bit_field force_recovery : 1; a_bit_field include_subsets : 1; a_bit_field force_chaining : 1; a_bit_field generate_reciprocals : 1; a_bit_field match_mode : 1; a_bit_field show_undo : 1; a_bit_field extra_audit : 1; a_sql_uint32 debug_dump_size; a_sql_uint32 recovery_ops; a_sql_uint32 recovery_bytes; const char * include_source_sets; const char * include_destination_sets; const char * include_scan_range; const char * repserver_users; const char * include_tables; const char * include_publications; const char * queueparms; const char * match_pos; a_bit_field leave_output_on_error : 1; } a_translate_log; |
成员 | 说明 | ||||||
---|---|---|---|---|---|---|---|
version | DBTools 版本号。 | ||||||
connectparms |
连接到数据库所需的参数。它们采用如下所示的连接字符串形式:
数据库服务器将由连接字符串的 START 参数启动。例如:
一个包括 START 参数的完整连接字符串示例:
有关连接参数的列表,请参见连接参数。 |
||||||
logname | 事务日志文件的名称。如果为 NULL,则没有日志。 | ||||||
sqlname | SQL 输出文件的名称。如果为 NULL,则此名称将基于事务日志文件的名称(-n 设置该字符串)。 | ||||||
encryption_key | 指定数据库加密密钥(-ek 设置为字符串)。 | ||||||
logs_dir | 事务日志目录(-m dir 设置字符串);必须设置 sqlname 且 connect_parms 必须为 NULL。 | ||||||
userlist | 用户名的链接列表。相当于 -u 用户1,... 或 -x 用户1,...选择或忽略列出用户的事务。 | ||||||
since_time | 从给定时间(-j <时间> 设置该时间)之前最后一次检查点操作开始输出。从 0001 年 1 月 1 日以来的分钟数。 | ||||||
confirmrtn | 用于确认操作的回调例程。 | ||||||
errorrtn | 用于处理错误消息的回调例程。 | ||||||
msgrtn | 用于处理信息消息的回调例程。 | ||||||
logrtn | 只将消息写入日志文件的回调例程。 | ||||||
statusrtn | 用于处理状态消息的回调例程。 | ||||||
userlisttype | 除非您要包括或排除一组用户,否则设置为 DBTRAN_INCLUDE_ALL。DBTRAN_INCLUDE_SOME 对应 -u,DBTRAN_EXCLUDE_SOME 对应 -x。 | ||||||
quiet | 设置为 TRUE 可在不打印消息的情况下运行 (-y)。 | ||||||
remove_rollback | 通常设置为 TRUE;如果想在输出中包括回退事务,则设置为 FALSE(相当于 -a)。 | ||||||
ansi_sql | 如果想生成 ANSI 标准的 SQL 事务,则设置为 TRUE(相当于 -s)。 | ||||||
since_checkpoint | 如果想从最近的检查点开始输出,则设置为 TRUE(相当于 -f)。 | ||||||
replace | 替换现有的 SQL 文件而无需确认(相当于 -y)。 | ||||||
include_trigger_trans | 设置为 TRUE 可将触发器生成的事务包括在内(相当于 -g、-sr 或 -t)。 | ||||||
comment_trigger_trans | 设置为 TRUE 可将触发器生成的事务作为注释包括在内(相当于 -z)。 | ||||||
debug | 保留;设置为 FALSE。 | ||||||
debug_sql_remote | 保留,使用 FALSE。 | ||||||
debug_dump_hex | 保留,使用 FALSE。 | ||||||
debug_dump_char | 保留,使用 FALSE。 | ||||||
debug_page_offsets | 保留,使用 FALSE。 | ||||||
use_hex_offsets | 保留,使用 FALSE。 | ||||||
use_relative_offsets | 保留,使用 FALSE。 | ||||||
include_audit | 保留,使用 FALSE。 | ||||||
chronological_order | 保留,使用 FALSE。 | ||||||
force_recovery | 保留,使用 FALSE。 | ||||||
include_subsets | 保留,使用 FALSE。 | ||||||
force_chaining | 保留,使用 FALSE。 | ||||||
generate_reciprocals | 保留,使用 FALSE。 | ||||||
match_mode | 保留,使用 FALSE。 | ||||||
show_undo | 保留,使用 FALSE。 | ||||||
debug_dump_size | 保留,使用 0。 | ||||||
recovery_ops | 保留,使用 0。 | ||||||
recovery_bytes | 保留,使用 0。 | ||||||
include_source_sets | 保留,使用 NULL。 | ||||||
include_destination_sets | 保留,使用 NULL。 | ||||||
include_scan_range | 保留,使用 NULL。 | ||||||
repserver_users | 保留,使用 NULL。 | ||||||
include_tables | 保留,使用 NULL。 | ||||||
include_publications | 保留,使用 NULL。 | ||||||
queueparms | 保留,使用 NULL。 | ||||||
match_pos | 保留,使用 NULL。 | ||||||
leave_output_on_error | 如果要在检测到文件损坏时离开生成的 .SQL 文件,则设置为 TRUE(等效于 -k) |
这些成员与可从 dbtran 实用程序访问的功能相对应。
有关更多说明,请参见 dbtools.h 头文件。
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |