免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1935 | 回复: 5
打印 上一主题 下一主题

创建复制服务器问题? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-11-27 19:18 |只看该作者 |倒序浏览
请问:1、我的replication 12.5 用RS_INIT配置 在replication server interfaces information处为什么不能配置?
2、 以下示例讲的都是单表复制,如果要多表复制怎么写?
在win2000上安装配置sybase复制服务器
一、安装前的准备工作
在两台服务器上,装好win2000,而且可以相互Ping通。试验环境:
计算机名        IP        ASE server name
Test1        192.168.0.10        Test1
Test2        192.168.0.11        Test2
在test1上安装好Sybase ASE及PC Client和 Replication Server,ASE Server name为test1并创建dbtest1数据库;在test2上安装好Sybase ASE及PC Client,ASE Server name为test2并创建dbtest2数据库。
二、安装复制服务器
1、启动Dsedit,Add Server:test2,TCP/IP:192.168.0.11,5000
2、启动Rs_init,选中Configure a Server product和Replication Server,然后选中Install a new Replication Server
3、在Replication Server Information中,参数为:
Replication Server Name: rep1
(注意:复制服务器命名不要用S开头,S是关键字)
Is this Replication Server the ID Server? Yes
Replication Server error log: c:\sybase\REP-12_5\install\rep1.log
Replication Server config file: c:\sybase\REP-12_5\install\rep1.cfg
在Replication Server Interfaces Information中,Add Service:
 
MASTER TCP Winsock TCP/IP test1,8888
QUERY TCP Winsock TCP/IP test1,8888
4、在Replication Server System Database中,参数为:
RSSD SQL Server name:test1,RSSD name:rep1_RSSD
Create RSSD:Yes
SA user:sa, SA Password:
5、在RSSD Device Information中,参数为:
RSSD device name:rssd_dev,Create the RSSD device:Yes
RSSD device physical name:c:\sybase\data\rssd_dev.dat
RSSD log device name:rssd_log,Create the RSSD log device:Yes
RSSD log device physical name:c:\sybase\data\rssd_log.dat
6、在Disk Partition中,参数为:
Disk Partiton path:c:\sybase\data\disk_dev.dat
Logical Identifier for Disk Partiton:disk_dev
以下是添加数据库到复制系统中:
7、选中Add a database to the replication system,在Replication Server information中,参数为:
Replication Server name:rep1
RS SA user:sa, RS SA password:
8、在Database information中,参数为:
SQL Server name:test1
SA user:sa,SA password:
Database name:dbtest1
Will the database be replicated:Yes
9、重复第7步。
10、在Database information中,参数为:
SQL Server name:test2
SA user:sa,SA password:
Database name:dbtest2
Will the database be replicated:No
至此,复制服务器的安装基本完成,通过如下的方法可以检测安装是否成功:
isql –Usa –P –Srep1
1>admin health
2>go
若输出结果中Status为HEALTHY则表示成功,否则便为失败,可以使用命令admin who及admin who_is_down以便查找原因,根据经验,失败大多数是由于大小写错误。
11、修改复制服务器的sa口令,执行如下命令:
alter user sa set password '12345678'
然后停止rep1 Server,再启动rep1 Server。
三、定义复制和订购
1、在test1的dbtest1中,执行如下命令:
isql –Usa –P –Stest1
1>use dbtest1
2>go
①、create table test(c1 int, c2 char()
②、sp_setreptable test, true
③、grant all on test to public
2、在test2的dbtest2中,执行如下命令:
isql –Usa –P –Stest2
1>use dbtest2
2>go
①、create table test(c1 int, c2 char()
②、grant all on test to public
3、定义复制:在rep1上执行如下命令:
isql –Usa –P –Srep1
1>create replication definition test_rep
2>with primary at test1.dbtest1
3>with all tables named 'test'
4>(c1 int,c2 char() primary key(c1)
isql –Usa –P –Stest1
1>use rep1_RSSD
2>go
1>rs_helprep
2>go
可以通过执行rs_helprep命令判断复制定义是否成功,失败大多是由于数据库的权限设置不当以及大小写错误和网络连接问题等。
4、订购:在rep1上执行如下命令:
isql –Usa –P –Srep1
1>create subscription test_sub for test_rep
2>with replicate at test2.dbtest2
四、测试复制服务器
1、在test1的dbtest1中,插入数据:
insert test values(8,'88888888')
2、在test2的dbtest2中,查询复制数据:
select * from test
一般情况下,只要前面的步骤都成功了,数据复制是不成问题的。

论坛徽章:
4
2015年亚洲杯之阿联酋
日期:2015-03-10 10:32:022015年亚洲杯之阿曼
日期:2015-03-10 14:53:222015亚冠之水原三星
日期:2015-07-18 15:40:262015亚冠之塔什干棉农
日期:2015-07-27 20:52:05
2 [报告]
发表于 2005-11-28 09:20 |只看该作者
entry of your RS server in interfaces file is needed in advance.I remember there is the dsedit utility provided in rs_init in version 12.6,but I'm not sure in version 12.5.

论坛徽章:
0
3 [报告]
发表于 2005-11-28 11:48 |只看该作者
多表复制怎么操作?

论坛徽章:
0
4 [报告]
发表于 2005-11-28 11:56 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
5 [报告]
发表于 2005-11-28 14:56 |只看该作者
把一个表的脚本导出来,然后把名字改一下不就行了。

论坛徽章:
0
6 [报告]
发表于 2005-12-08 10:53 |只看该作者

创建复制预订后,状态为qcomplete,如何解决,急啊

创建复制预订后,状态为qcomplete,如何解决,急啊

diagnose,比正常的多出四行,但都是正确的信息,
就是状态为defined/qcomplete和valid/qcomplete
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP