1.Verify SQL Server service account and configure SQL Server Login for Database Mirroring

(1)SQL Server service account

Principal Server SQL Server service account is local account name "SQLServer"

Mirroring Server SQL Server service account is local account name "SQLService"

(2)create a local account "SQLservice" on Principal Server

create a login for local account "SQLservice"

(3)create a local account "SQLServer" on Mirroring Server

create a login for local account "SQLServer"

 

2.Prepare Mirroring Database

3.Setup Database Mirroring

(1)在設定的"服務帳戶"的步驟,無須輸入任何帳戶,保留空白。

(2)設定成功後,不要啟動鏡像(Do not start Mirroring)。

(3)Grant Connect permission to Mirroring service account "SQLservice"

 GRANT CONNECT ON ENDPOINT::[DBM_Endpoint] TO [SQL2K8R2M1\SQLservice]
GO

 

(4)Grant Connect permission to Principal service account "SQLServer"

 GRANT CONNECT ON ENDPOINT::[DBM_Endpoint] TO [SQL2K8R2M2\SQLServer]
GO

 

(5)Start Mirroring

(6)click [Yes]

(7)finish