step 1. on witness server
CREATE ENDPOINT Endpoint_witness
STATE=STARTED
AS TCP (LISTENER_PORT=7022, LISTENER_IP=(10.2.1.80))
FOR DATABASE_MIRRORING (ROLE=WITNESS);
validate it was started
select name,type_desc,state_desc,port,is_dynamic_port,ip_address from sys.tcp_endpoints
Step 2 on witness server
CREATE LOGIN [Domain\ED_USER] FROM WINDOWS;
GRANT CONNECT ON ENDPOINT::Endpoint_witness TO [Domain\ED_USER];
Step 3: On principal partner server
CREATE LOGIN [Domain\ED_USER] FROM WINDOWS;
GRANT CONNECT ON ENDPOINT::Endpoint_master TO [Domain\ED_USER];
Step 4: On mirror partner server
CREATE LOGIN [Domain\ED_USER] FROM WINDOWS;
GRANT CONNECT ON ENDPOINT::Endpoint_mirror TO [Domain\ED_USER];
Step 5 on principal server
ALTER DATABASE db_name
SET WITNESS = 'TCP://sql-witness.ibm.com:7022';
重要提示:
由于使用AD认证,所有实例要用这个账号[Domain\ED_USER];来启动,否则会报连接不上的错误
阅读(1484) | 评论(0) | 转发(0) |