Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
in
Page 1 of 20
SQLServer.in
Welcome to the blog site of SQLServer.in Home About
Search
Step 1
Create MirrorDB in the source database (called as Principal database), for which we are going to start mirroring.
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 2 of 20
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 3 of 20
Step 2
Create a backup of the MirrorDB 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 MirrorDB is called as Mirror database.
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 4 of 20
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 5 of 20
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 6 of 20
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.
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 7 of 20
Note that here I do not have a Witness server, & hence select NO for include Witness server option.
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 8 of 20
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 9 of 20
Step 4 Select the Mirror Server Instance as shown below & click connect. Here we have to specify the destination, i.e. Mirror database servers credentials to connect.
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 10 of 20
Step 5 Leave service accounts for both Principal & Mirror blank, follow the remaining screen shots.
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 11 of 20
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 12 of 20
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.
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 13 of 20
Step 8 The MirrorDB in the source server is now marked as Principal, Synchronized.
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 14 of 20
Step 9 The MirrorDB in the destination server is now marked as Mirror, Synchronized (Restoring)
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 15 of 20
Step 10 You can do manual failover as shown below, by selecting Failover option.
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 16 of 20
Step 11 The Principal database is now changed to Mirror & the Mirror is changed to Principal as shown in the below screen shots.
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 17 of 20
Mirroring is a simple process & if failed we can easily reset it up, by restoring the latest backup of the source in the destination & reconfigure Mirroring.
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 18 of 20
2 Comments so far
1. by ArunKumar, on November 22 2010 @ 11:21 am Tkz for your wonderful share.
Leave a comment
Name: (Required) eMail: (Required) Website: Comment:
Post Comment!
Categories
Administration Administration Queries Database Migration Index Memory Mirroring SQL Clustering Design RDBMS Concepts Development ADO.NET Programming SQL Useful Queries Errors & Solution Miscellaneous
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 19 of 20
Archives
May 2011(1) April 2010(3) March 2010(1) January 2010(1) November 2009(18)
Recent Comments
trived on Database Mirroring step by step ArunKumar on Database Mirroring step by step Tweets that mention VAS continued... | SQLServer.in -- Topsy.com on VAS continued Robert Shumake on DBCC InputBuffer details for all spids for all databases TSwain on DBCC InputBuffer details for all spids for all databases
Recent Posts
SQL SERVER Fix : Error : 17892 Logon failed for login due to trigger execution. Changed database context to master Find the number of CPUs through SQL query How to find system uptime VAS continued Virtual Memory/ VAS
Cloud OTags
Programming SQL - Useful Queries sql versions SQL SERVER Query to find number Rows SQLServerAgent cannot start script to find block SQL Clustering Miscellaneous Normalization SQL 2008 Clustering Virtual Memory change sql service account Index ADO.NET system uptime simulate block purge msdb data service account Row Count Of all tables Query to find number Rows DBCC failed Virtual Address Space blocking query Memory Enterprise Manager Conection Pooling Logon failed trigger execution Fill Factor RDBMS Concepts Pad Index Database Migration Mirroring find no of cpu VAS sql server versions simulate deadlock
Administration Queries
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011
Page 20 of 20
About Author
Krishna is a Senior Database Administrator, having handson experience of 6 years. Areas of expertise includes database engine, Business Intelligence & performance tunning. A regular SQL blogger on his own website, msdn forums, sqlteam.com & believe in sharing his experience with other technology enthusiasts.
Resources
Resources 1 Resources 2 Resources 3 Resources 4 Resources 5
Meta
Log in Valid XHTML XFN WordPress
http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/
29/Jun/2011