SQL 2008 R2 数据库镜像操作

镜像操作请参考:http://blog.csdn.net/dba_huangzj/article/details/35995083

应用程序数据库连接字符串(带见证服务器即自动故障转移):

DBHelper DBHelparKQ = new DBHelper("Data Source=主体;Failover Partner=镜像;Initial Catalog=数据库;User ID=帐号;Password=密码");

_conn.ConnectionString ="Data Source=192.168.1.2;Failover Partner=192.168.1.3;Initial Catalog=DB_Test;User ID=sa;Password=Aa123456";

 

主体与镜像手动切换指令

use master;
alter database DB_Test set partner failover;

  

posted on 2014-09-12 18:41  冬夜冷雨  阅读(210)  评论(0编辑  收藏  举报

导航