SQLServer 复制和数据库镜像 详细配置部署
SQLServer 复制和数据库镜像 详细配置部署
https://blog.csdn.net/kk185800961/article/details/46369577
SQL Server扫盲系列--镜像篇
https://blog.csdn.net/dba_huangzj/article/details/35995083 ALTER DATABASE (Transact-SQL) Database Mirroring
https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-database-mirroring?view=sql-server-2017
USE [master]
95.GO
96.--主体执行:设置为高安全模式(同步)
97.ALTER DATABASE [MyDB] SET SAFETY FULL
98.
99.--主体执行:设置为高性能模式(异步)
100.ALTER DATABASE [MyDB] SET SAFETY OFF
101.
102.--主体执行:主体与镜像切换
103.ALTER DATABASE [MyDB] SET PARTNER FAILOVER;
104.
105.
106.ALTER DATABASE [MyDB] SET PARTNER RESUME; --恢复镜像
107.ALTER DATABASE [MyDB] SET PARTNER FAILOVER; --切换主备
108.ALTER DATABASE [MyDB] SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS; --强制恢复镜像
109.ALTER DATABASE [MyDB] SET ONLINE; --在线数据库
110.
111.
112.select * from sys.certificates
113.select * from sys.endpoints
114.select * from sys.database_mirroring_endpoints
115.select * from sys.database_mirroring
116.select * from sys.database_mirroring_witnesses