Database Mirroring s

Published on June 2016 | Categories: Documents | Downloads: 59 | Comments: 0 | Views: 314
of 20
Download PDF   Embed   Report

Comments

Content

Database Mirroring step by step | SQLServer.in

Page 1 of 20

SQLServer.in
Welcome to the blog site of SQLServer.in • Home • About
Search

Database Mirroring step by step
Posted on 2009 under Mirroring | 2 Comments 25 Nov
Here is the detailed step by step implementation of Database Mirroring with screen shots. Note that I have shown here is a High Protection Mirroring scenario. Here we are setting up a synchronous operating mode.

 
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

Database Mirroring step by step | SQLServer.in

Page 2 of 20

   

http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/

29/Jun/2011

Database Mirroring step by step | SQLServer.in

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

Database Mirroring step by step | SQLServer.in

Page 4 of 20

 

http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/

29/Jun/2011

Database Mirroring step by step | SQLServer.in

Page 5 of 20

 

http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/

29/Jun/2011

Database Mirroring step by step | SQLServer.in

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

Database Mirroring step by step | SQLServer.in

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

Database Mirroring step by step | SQLServer.in

Page 8 of 20

 

http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/

29/Jun/2011

Database Mirroring step by step | SQLServer.in

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 server’s credentials to connect.

http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/

29/Jun/2011

Database Mirroring step by step | SQLServer.in

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

Database Mirroring step by step | SQLServer.in

Page 11 of 20

http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/

29/Jun/2011

Database Mirroring step by step | SQLServer.in

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

Database Mirroring step by step | SQLServer.in

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

Database Mirroring step by step | SQLServer.in

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

Database Mirroring step by step | SQLServer.in

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

Database Mirroring step by step | SQLServer.in

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

Database Mirroring step by step | SQLServer.in

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

Database Mirroring step by step | SQLServer.in

Page 18 of 20

2 Comments so far »
1. by ArunKumar, on November 22 2010 @ 11:21 am Tkz for your wonderful share….

2. by trived, on May 9 2011 @ 9:54 am good

Comment RSS · TrackBack URI

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

Database Mirroring step by step | SQLServer.in

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 CPU’s through SQL query ◦ How to find system uptime ◦ VAS continued… ◦ Virtual Memory/ VAS



Cloud O’Tags
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

Errors & Solution


Administration Queries

Free SQL Webcasts

 

http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/

29/Jun/2011

Database Mirroring step by step | SQLServer.in

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

© 2011 SQLServer.in Fast Loadz Theme by TemplatePanic

http://sqlserver.in/blog/index.php/archive/database-mirroring-step-by-step/

29/Jun/2011

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close