No pain, no gain.
分类: Sybase
2004-12-23 12:25:56
在sybase 的ASA与ASE数据库间通过SQL REMOTE传输数据经常会遇到传输日志点有误的现象.
一、通过翻译日志,并对照ASA、ASE的传输日志,确定正确的ASA发送点
1、在ASA中通过sa_setremoteuser存储过程,更改SYSREMOTEUSER表中的log_sent、confirm_sent字段,其它字段保留SYSREMOTEUSER表中的原值
2、如下为sa_setremoteuser函数及其参数:
sa_setremoteuser(p_user_id unsigned integer,p_log_sent numeric(20),p_confirm_sent numeric(20),p_send_count integer,p_resend_count integer,p_log_received numeric(20),p_confirm_received numeric(20),p_receive_count integer,p_rereceive_count integer)
3、sa_setremoteuser参数与表SYSREMOTEUSER字段值的对应关系
参数 字段
p_user_id user_id
p_log_sent log_sent
p_confirm_sent confirm_sent
p_send_count send_count
p_resend_count resend_count
p_log_received log_received
p_confirm_received confirm_received
p_receive_count receive_count
p_rereceive_count rereceive_count
4、ASA SYSREMOTEUSER表与ASE sr_remoteuser表的字段的对应关系,但两边的有些字段值并不会完全相等,例如:有可ASA中刚做数据传输,但ASE还没有做数据传输,此时ASA的log_sent可能大于ASE的log_received
ASA SYSREMOTEUSER ASE sr_remoteuser
log_sent log_received
confirm_sent confirm_received
send_count receive_count
resend_count rereceive_count
log_received log_sent
confirm_received confirm_sent
receive_count send_count
rereceive_count resend_count