Database Mirroring Step By Step: Step 1deepakdba.com/.../Step-By-Step-Database-Mirroring.pdf ·...

15
Database Mirroring Step By Step: Step 1 Create Mirror DB in the source database (called as Principal database), for which we are going to start mirroring.

Transcript of Database Mirroring Step By Step: Step 1deepakdba.com/.../Step-By-Step-Database-Mirroring.pdf ·...

Page 1: Database Mirroring Step By Step: Step 1deepakdba.com/.../Step-By-Step-Database-Mirroring.pdf · Click on Start Mirroring to start the mirroring from Principal database to Mirror database.

Database Mirroring Step By Step:

Step 1

Create Mirror DB in the source database (called as Principal database), for which we are

going to start mirroring.

Page 2: Database Mirroring Step By Step: Step 1deepakdba.com/.../Step-By-Step-Database-Mirroring.pdf · Click on Start Mirroring to start the mirroring from Principal database to Mirror database.

Step 2

Create a backup of the Mirror DB in the source SQL Server (Principal database) & restore it

in the destination server with the same name. Make sure to restore the database with

NORECOVERY. The destination server Mirror DB is called as Mirror database.

Page 3: Database Mirroring Step By Step: Step 1deepakdba.com/.../Step-By-Step-Database-Mirroring.pdf · Click on Start Mirroring to start the mirroring from Principal database to Mirror database.
Page 4: Database Mirroring Step By Step: Step 1deepakdba.com/.../Step-By-Step-Database-Mirroring.pdf · Click on Start Mirroring to start the mirroring from Principal database to Mirror database.
Page 5: Database Mirroring Step By Step: Step 1deepakdba.com/.../Step-By-Step-Database-Mirroring.pdf · Click on Start Mirroring to start the mirroring from Principal database to Mirror database.
Page 6: Database Mirroring Step By Step: Step 1deepakdba.com/.../Step-By-Step-Database-Mirroring.pdf · Click on Start Mirroring to start the mirroring from Principal database to Mirror database.

Step 3

As shown in the below screen, right click on the database, select properties & select Mirroring.

Select Configure Security to configure mirroring for the required database.

Follow the screen shots as given below.

Page 7: Database Mirroring Step By Step: Step 1deepakdba.com/.../Step-By-Step-Database-Mirroring.pdf · Click on Start Mirroring to start the mirroring from Principal database to Mirror database.

Note that here I do not have a Witness server, & hence select “NO” for include Witness server

option.

Page 8: Database Mirroring Step By Step: Step 1deepakdba.com/.../Step-By-Step-Database-Mirroring.pdf · Click on Start Mirroring to start the mirroring from Principal database to Mirror database.
Page 9: Database Mirroring Step By Step: Step 1deepakdba.com/.../Step-By-Step-Database-Mirroring.pdf · Click on Start Mirroring to start the mirroring from Principal database to Mirror database.

Step 4

Select the Mirror Server Instance as shown below & click connect. Here we have to specify the

destination, i.e. Mirror database server’s credentials to connect.

Step 5

Leave service accounts for both Principal & Mirror blank, follow the remaining screen shots.

Page 10: Database Mirroring Step By Step: Step 1deepakdba.com/.../Step-By-Step-Database-Mirroring.pdf · Click on Start Mirroring to start the mirroring from Principal database to Mirror database.
Page 11: Database Mirroring Step By Step: Step 1deepakdba.com/.../Step-By-Step-Database-Mirroring.pdf · Click on Start Mirroring to start the mirroring from Principal database to Mirror database.

Step 6

Click on Start Mirroring to start the mirroring from Principal database to Mirror database.

Step 7

As you can see in the below screen shot, the status is, the databases are fully Synchronized.

Page 12: Database Mirroring Step By Step: Step 1deepakdba.com/.../Step-By-Step-Database-Mirroring.pdf · Click on Start Mirroring to start the mirroring from Principal database to Mirror database.

Step 8

The Mirror DB in the source server is now marked as Principal, Synchronized.

Step 9

The Mirror DB in the destination server is now marked as Mirror, Synchronized (Restoring)

Page 13: Database Mirroring Step By Step: Step 1deepakdba.com/.../Step-By-Step-Database-Mirroring.pdf · Click on Start Mirroring to start the mirroring from Principal database to Mirror database.

Step 10

You can do manual failover as shown below, by selecting Failover option.

Page 14: Database Mirroring Step By Step: Step 1deepakdba.com/.../Step-By-Step-Database-Mirroring.pdf · Click on Start Mirroring to start the mirroring from Principal database to Mirror database.

Step 11

The Principal database is now changed to Mirror & the Mirror is changed to Principal as shown

in the below screen shots.

Page 15: Database Mirroring Step By Step: Step 1deepakdba.com/.../Step-By-Step-Database-Mirroring.pdf · Click on Start Mirroring to start the mirroring from Principal database to Mirror database.

End of the Document