请教高手:Sybase RS如何创建表级复制
时间:2010-11-23
来源:互联网
我现在做的是test1库整库复制到test2库,再由test2库表级复制到test3库(test2库跟test3库在一台主机上)。
整库复制创建成功后,按照以下步骤创建表级复制:
1. 主点允许复制
use test2
go
sp_setreptable t_table ,true
go
2. 定义TXT定义
sp_setrepcol t_table, beizhu,replicate_if_changed
go
3.设置用户连接
use test2
go
sp_dropuser test2_maint
go
sp_addalias test2_maint ,dbo
go
grant role sa_role to test2_maint
go
use test3
go
sp_dropuser test3_maint
go
sp_addalias test3_maint ,dbo
go
grant role sa_role to test3_maint
go
4.出版 --RS执行
create publication "test3_aa"
with primary at B.test2
create replication definition "test3_1402"
with primary at B.test2
with all tables named "a"
( "a" char(10),
"b" char(10))
primary key("a")
send standby all columns
replicate all columns
create article "a"
for "test3_aa"
with primary at B.test2
with replication definition "test3_1402"
validate publication "test3_aa"
with primary at B.test2
5.订阅 --RS执行
create subscription sub_test3
for publication test3_aa
with primary at B.test2
with replicate at B.test3
subscribe to truncate table
以上步骤执行完之后测试,test3中a表数据并未复制到,错误日志为:
I. 2010/11/23 11:13:56. _SUB_RECOVERY_DAEMON: Retrying materialization for subscription <aa> for article <a> with replicate at <YKZ20101118BPJ.sbtest> for the 527 time
I. 2010/11/23 11:13:56. SQM stopping: 104:-2147483545 a.aa
I. 2010/11/23 11:13:56. SQM starting: 104:-2147483545 a.aa
E. 2010/11/23 11:13:56. ERROR #1028 SUB(aa) - seful\cm.c(3463)
Message from server: Message: 4002, State 1, Severity 14 -- 'Login failed.
'.
E. 2010/11/23 11:13:56. ERROR #1027 SUB(aa) - seful\cm.c(3463)
Open Client Client-Library error: Error: 67175468, Severity 4 -- 'ct_connect(): protocol specific layer: external error: The attempt to connect to the server failed.'.
E. 2010/11/23 11:13:56. ERROR #13045 SUB(aa) - seful\cm.c(3467)
Failed to connect to server 'YKZ20101118BPJ' as user 'sa'. See CT-Lib and/or server error messages for more information.
为什么会这样?请各位高手支招!谢谢了!
整库复制创建成功后,按照以下步骤创建表级复制:
1. 主点允许复制
use test2
go
sp_setreptable t_table ,true
go
2. 定义TXT定义
sp_setrepcol t_table, beizhu,replicate_if_changed
go
3.设置用户连接
use test2
go
sp_dropuser test2_maint
go
sp_addalias test2_maint ,dbo
go
grant role sa_role to test2_maint
go
use test3
go
sp_dropuser test3_maint
go
sp_addalias test3_maint ,dbo
go
grant role sa_role to test3_maint
go
4.出版 --RS执行
create publication "test3_aa"
with primary at B.test2
create replication definition "test3_1402"
with primary at B.test2
with all tables named "a"
( "a" char(10),
"b" char(10))
primary key("a")
send standby all columns
replicate all columns
create article "a"
for "test3_aa"
with primary at B.test2
with replication definition "test3_1402"
validate publication "test3_aa"
with primary at B.test2
5.订阅 --RS执行
create subscription sub_test3
for publication test3_aa
with primary at B.test2
with replicate at B.test3
subscribe to truncate table
以上步骤执行完之后测试,test3中a表数据并未复制到,错误日志为:
I. 2010/11/23 11:13:56. _SUB_RECOVERY_DAEMON: Retrying materialization for subscription <aa> for article <a> with replicate at <YKZ20101118BPJ.sbtest> for the 527 time
I. 2010/11/23 11:13:56. SQM stopping: 104:-2147483545 a.aa
I. 2010/11/23 11:13:56. SQM starting: 104:-2147483545 a.aa
E. 2010/11/23 11:13:56. ERROR #1028 SUB(aa) - seful\cm.c(3463)
Message from server: Message: 4002, State 1, Severity 14 -- 'Login failed.
'.
E. 2010/11/23 11:13:56. ERROR #1027 SUB(aa) - seful\cm.c(3463)
Open Client Client-Library error: Error: 67175468, Severity 4 -- 'ct_connect(): protocol specific layer: external error: The attempt to connect to the server failed.'.
E. 2010/11/23 11:13:56. ERROR #13045 SUB(aa) - seful\cm.c(3467)
Failed to connect to server 'YKZ20101118BPJ' as user 'sa'. See CT-Lib and/or server error messages for more information.
为什么会这样?请各位高手支招!谢谢了!
作者: 潇湘--雨 发布时间: 2010-11-23
你这个貌似是网络中断,你再来一次试试看!
作者: wfcjz 发布时间: 2010-11-23
但是我用admin who_is_down,没有down的。?????
作者: 潇湘--雨 发布时间: 2010-11-23
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28