在域环境下建立镜像

有两个服务器db-admin-12(主体)和db-admin-10(镜像),db-admin-12上有数据库mirroring_sample,现在希望建立镜像.

建立镜像的前提条件:

  1. db-admin-12和db-admin-10服务器的启动账号为域账号
      1. db-admin-10的启动账号为domain1\sqlserver1
      2. db-admin-12的启动账号为domain1\sqlserver2
  2. mirroring_sample的为完全恢复模式
  3. db-admin-12和db-admin-10上SQLSERVER版本相同(version&edition)

 

在db-admin-12上执行

image

在上面的脚本中创建了endpoint,并授权db-admin-10的启动账号连接这个endpoint的权限. 然后备份要镜像的数据库(备份到一个有写权限的目录)

 

在db-admin-10上执行

image

在上面的脚本中创建了endpoint,并授权db-admin-12的启动账号连接这个endpoint的权限. 然后还原备份,指定partner(db-admin-12)的FQDN

 

返回在db-admin-12上执行

image

建立镜像.

 

在这一步中,可能遇到以下错误

The server network address "%.*ls" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational.

请确认两台机器可以ping通

双方端点没有被防火墙阻塞,并且可以telnet

双方启动账号有访问对方端点的权限(已经授权)

 

The mirror database, "%.*ls", has insufficient transaction log data to preserve the log backup chain of the principal database.  This may happen if a log backup from the principal database has not been taken or has not been restored on the mirror database.

请备份db-admin-12的log,还原到db-admin-10

 

http://files.cnblogs.com/stswordman/mirror.zip

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值