赛迪网 > IT技术 数据库 > Sybase
  IT资讯搜索
 
IT产品搜索
[程序开发][网管世界][网络安全][数据库技术]
[操作系统][嘉宾聊天·在线访谈][活动集锦]
[精彩专题][Symantec专区][订阅IT技术周刊]
[开发论坛][网管论坛][安全论坛][数据库论坛]
[操作系统论坛][Sybase专区][IBM dW技术专区]
[病毒求助][病毒与漏洞播报][文档·源码下载]

Sybase复制:基于整库复制(warm standby) (2)

发布时间:2008.02.27 04:53     来源:赛迪网    作者:Alizze

◆5. 在复制服务器中执行

isql -Usa -P -S<rep_servername>; 
1>; create logical connection to HRB_HB.maindb 
2>; go

◆6. 在rs_init中增加主库到复制中,选择 add a database to the replication system

6.1>; Replication Server Information

6.1.1>; 输入复制服务器名字HRB_REP

6.2>; Database Information

6.2.1>; SQL Server Name: 输入主数据库服务器名HRB_HB

6.2.2>; SA password : 输入sa口令

6.2.3>; Database name: 输入主库名maindb

6.2.4>; Will database be replicated : 选择Yes

6.2.5>; Is this a Physical Connection for Existing Logical Connection: 选择Yes

6.2.6>; Logical DB Setup

6.2.6.1>; Is this an Active Connection or Standby Connection: 选择active

6.2.6.2>; Logical DS Name : 输入主服务器名HRB_HB

6.2.6.3>; Logical DB Name : 输入主数据库名maindb

6.3>; 如果所有选项全部为complete状态,添加数据库

◆7. 在主数据库服务器中执行

isql -Usa -P<password>; -SHRB_HB 
1>; use maindb 
2>; go 
1>; sp_reptostandby maindb,"ALL" 
2>; go 
1>; grant role sa_role to maindb_maint 
2>; go

在备份数据库服务器中执行:

isql -Usa -P<password>; -SHRB_HB_REP 
1>; use master 
2>; go 
1>; sp_addlogin maindb_maint,maindb_maint_ps,@defdb="maindb" 
2>; go 
1>; use maindb 
2>; go 
1>; sp_adduser maindb_maint 
2>; go 
1>; grant role sa_role to maindb_maint 
2>; go

◆8. 同步主库HRB_HB和备份库HRB_HB_REP的login和role、权限等,要保证两台机器的login id一致

◆9. 在rs_init中增加备份库到复制中,选择 add a database to the replication system

9.1>; Replication Server Information

9.1.1>; 输入复制服务器名字HRB_REP

9.2>; Database Information

9.2.1>; SQL Server Name: 输入备份数据库服务器名HRB_HB_REP

9.2.2>; SA password : 输入sa口令

9.2.3>; Database name: 输入主库名maindb

9.2.4>; Will database be replicated : 选择Yes

9.2.5>; Is this a Physical Connection for Existing Logical Connection: 选择Yes

9.2.6>; Logical DB Setup

9.2.6.1>; Is this an Active Connection or Standby Connection: 输入standby

9.2.6.2>; Logical DS Name : 输入主服务器名HRB_HB

9.2.6.3>; Logical DB Name : 输入主数据库名maindb

9.2.6.4>; Active DS Name : 输入主服务器名HRB_HB

9.2.6.5>; Active DB Name : 输入主数据库名maindb

9.2.6.6>; Active Db sa password : 输入主数据库sa口令

9.3>; 如果所有选项全部为complete状态,添加数据库

◆10. 从主库dump到备份库load&online

◆11. 在复制服务器中恢复连接

isql -Usa -P -SHRB_REP 
1>; resume connection to HRB_HB.maindb 
2>; go 
1>; resume connection to HRB_HB_REP.maindb 
2>; go

◆12. 最后修改备份库HRB_HB_REP的参数与主库HRB_HB一致,锁的数量最好大于主库。

(责任编辑:卢兆林)

<<上一页 1 2


[ 发表评论 ] 字体[  ] [ 打印 ] [ 进入博客 ] [ 进入论坛 ]  [ 推荐给朋友 ]
  相关文章
  客户需求反馈表
* 姓  名:
更多资料  了解方案  认识厂商
* 单位名称:
* 联系电话:
* 电子邮件:
  赛迪推荐  
  手机·资费 ·新品·导购·评测·手机资费·宽带
手机搜索  诺基亚 N73 MOTO Z6
  IT产品 ·笔记本·台式机·服务器·打印·投影
IT产品搜索 
  IT技术 ·开发·网管·安全·数据库·操作系统
  信息化 ·热点·专题·访谈·周刊·方案案例
· 电子商务盈利新招:垂直化渠道管理新趋势
· 互联网加速蜕变 运营商进军搅动市场格局
· 08 IT技术风起云涌 专访 ITIL落地难在哪
· 视频加密保护解决方案 文档安全解决方案
  IT博客 ·曾剑秋·项立刚·Java学习·网管
  IT技术论坛 ·开发·网管·安全·数据库·系统