SQLTeam.com | Weblogs | Forums

Mirroring


#1

Trying to create mirroring please how do i go about


#2

What version of SQL are you on? I have just done this on SQL Server 2014, so I can probably help if you are on the same??


#3

Thank you for replying, i am on 2014 version.
i need to understand how mirroring works.


#4

Are you going to set it up with a witness server, or without? What stage are you at? Do you have the servers ready to go? The database(s)? Is it new databases, or are you migrating existing databases to the new version?


#5

New Databases


#6

In order to set up the mirroring, the fastest way is to create the database on one of the servers. Take a FULL backup of that database to file, and then take a transaction log backup. Copy both of those to the second server. Restore the database using both files, making sure to set the Recovery State (on the options tab) to RESTORE WITH NORECOVERY. Once the restore completes, go back to the first server, and right click on the database. Goto Tasks - Mirror, and then follow the steps. Once you click Finish at the end of the wizard, you get the option to 'Start Mirroring'. Assuming all has gone well, the database will then appear as [DbName] (Principal, Synchronized) on the primary server, and [DbName] (Mirror, Synchronized / Restoring...). Hope this helps.


#7

okay thank you will try it and ill come back to you later thank you very much


#8

I understand mirroring is easier to setup, but do note that it already marked as deprecated, meaning it might not be supported in the next 2-3 versions of SQL.In SQL 2016, there is a new option call "basic availability groups" which is target to replace mirroring for Standard edition.

But for now, I guess there is still mirroring until everything got settled.