91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

SQL Server數據庫鏡像搭建(無見證無域控)

發布時間:2020-07-01 10:56:46 來源:網絡 閱讀:3005 作者:易語隨風去 欄目:關系型數據庫

1. 環境配置
服務器1:sqlmirror01
IP:192.168.10.176
服務器2:sqlmirror02
IP:192.168.10.177
操作系統:Windows 2012 R2
安裝 .Net Framework 3.5/4.0
關閉服務器防火墻或設置白名單
數據庫版本:SQL Server 2014
2. 創建主密鑰(非必需)
use master
go
create master key encryption by password='zaq12WSX'
go
3. 創建證書
sqlmirror01執行
use master
go
create certificate sqlmirror01_cert with subject='sqlmirror01 certificate',expiry_date='2099-1-1'
go
sqlmirror02執行
use master
go
create certificate sqlmirror02_cert with subject='sqlmirror02 certificate',expiry_date='2099-1-1'
go
4. 創建鏡像端點
sqlmirror01執行
use master
go
create endpoint Endpoint_Mirroring
state=started
as tcp ( listener_port = 5022,listener_ip = all )
for database_mirroring ( authentication = certificate sqlmirror01_cert, encryption = required algorithm aes, role = all )
go
sqlmirror02執行
use master
go
create endpoint Endpoint_Mirroring
state=started
as tcp ( listener_port = 5022,listener_ip = all )
for database_mirroring ( authentication = certificate sqlmirror02_cert, encryption = required algorithm aes, role = all )
go
5. 備份證書
sqlmirror01執行
use master
go
backup certificate sqlmirror01_cert to file = 'C:\Certificate_files\sqlmirror01_cert.cer'
go
sqlmirror02執行
use master
go
backup certificate sqlmirror02_cert to file = 'C:\Certificate_files\sqlmirror02_cert.cer'
go
6. 拷貝證書
將sqlmirror01_cert.cer拷貝至sqlmirror02的C:\Certificate_files\
將sqlmirror02_cert.cer拷貝至sqlmirror01的C:\Certificate_files\
7. 創建登錄名
sqlmirror01執行
use master
go
create login sqlmirror02_login with password='abc@123456'
go
sqlmirror02執行
use master
go
create login sqlmirror01_login with password='abc@123456'
go
8. 創建使用該登錄名的用戶
sqlmirror01執行
use master
go
create user sqlmirror02_user for login sqlmirror02_login
go
sqlmirror02執行
use master
go
create user sqlmirror01_user for login sqlmirror01_login
go
9. 證書與用戶關聯
sqlmirror01執行
use master
go
create certificate sqlmirror02_cert
authorization sqlmirror02_user
from file='c:\Certificate_files\sqlmirror02_cert.cer'
go
sqlmirror02執行
use master
go
create certificate sqlmirror01_cert
authorization sqlmirror01_user
from file='c:\Certificate_files\sqlmirror01_cert.cer'
go
10. 授予對遠程鏡像端點的登錄名的 CONNECT 權限
sqlmirror01執行
use master
go
GRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO [sqlmirror02_login];
go
sqlmirror02執行
use master
go
GRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO [sqlmirror01_login];
go
11. 配置鏡像伙伴
sqlmirror01執行
創建數據庫
CREATE DATABASE [Mirror_test_1]
ON PRIMARY
( NAME = N'Mirror_test_1', FILENAME = N'C:\dbdata\Mirror_test_1.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N'Mirror_test_1_log', FILENAME = N'C:\dbdata\Mirror_test_1_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
備份數據庫
backup database Mirror_test_1 to disk='C:\backup\Mirror_test_1.bak' with compression,checksum
將備份拷貝至sqlmirror02
sqlmirror02執行
restore database Mirror_test_1 from disk='C:\backup\Mirror_test_1.bak' with norecovery
連接鏡像
sqlmirror02執行
use master
go
ALTER DATABASE Mirror_test_1 SET PARTNER = 'TCP://sqlmirror01:5022';
go
sqlmirror01執行
use master
go
ALTER DATABASE Mirror_test_1 SET PARTNER = 'TCP://sqlmirror02:5022';
go
SQL Server數據庫鏡像搭建(無見證無域控)
SQL Server數據庫鏡像搭建(無見證無域控)
更改為高性能模式
鏡像主體sqlmirror01執行
use master
go
ALTER DATABASE Mirror_test_1 SET PARTNER SAFETY OFF
go
SQL Server數據庫鏡像搭建(無見證無域控)

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

张家口市| 南汇区| 通江县| 旬邑县| 泾阳县| 淮北市| 右玉县| 淄博市| 绥中县| 思南县| 京山县| 桓仁| 苏州市| 安康市| 沂水县| 东安县| 长阳| 大名县| 沁水县| 广宗县| 方山县| 丹阳市| 嘉兴市| 当涂县| 延吉市| 铜川市| 遂溪县| 砀山县| 杭锦旗| 康定县| 淮北市| 扎兰屯市| 广南县| 鹤壁市| 社会| 三门峡市| 阿克苏市| 会泽县| 桓台县| 中山市| 湾仔区|