Implementing Database Mirroring


Can anyone please tell me how to implement database mirroring step by step.

I have 2 servers
Server01 for production
Server02 for mirroring
Both server are configured the same.
   -- SQL 2005 64bit SP 2

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

1. Make sure all your Servers are running under the same account under Services
2. Go to your primary server's Microsoft SQL Management Studio.
3. Right click the database you wish to mirror and click backup (This is a two part step. Pay close attention).
4. Do a FULL backup of your database to any place. Wait for this to finish.
5. Do a Transaction log backup.
6. Go to your mirror server's Microsoft SQL Management Studio.
7. The database should not exist here yet. Right click Databases and click Restore Database...
8. Type the database name in the "To Database" text box.
9. Click From Device and get add your main bak file.
10. Check the Restore box and then click Options at the top left.
11. On the Recovery state set RESTORE WITH NORECOVERY (The second radio button).
12. Once that is done. Repeat the Recovery steps for the transaction file backup. (It also needs NORECOVERY on options).
13. Go back to the Primary Server's Management Studio and right click the database to be mirrored.
14. Select Tasks and then Mirroring.
15. Configure Security. Make sure Encrypt data is off on all of the server connections (Another issue I had during setup. My witness server had "Encrypt data sent through this endpoint" set to on and it broke. See the note below on how to remove Encrypt data if it is prepopulated and you can't uncheck it.
16. Leave the Security boxes blank.
17. Before strating mirroring make sure that server accounts on all servers have connect permission.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AnvieAuthor Commented:
Thanks for the complete process.

I followed everything you said and it works fine until I click start mirroring. i got this error:

TCP//ServerName.DomainSegment:POrt connot be reached or not exist. is there a way to find this domain segment information. like Select @@ServerName or select @@version?

AnvieAuthor Commented:
Thanks again!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.