在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 &nbs