Sunday, August 14, 2016

sql server - Migrate existing database to mirrored database on Azure



I have setup 3 Sql VM's on Azure for database mirroring as described in this link with the idea being that we move our current database, which is currently on a single VM outside of Azure. Everything works so far, except now I am stumped at how I move my current database over to the new environment? I initially tried to restore our current database to both the primary and mirror server and then enable mirroring, but got an error




Database "xxxxxx" is not configured for database mirroring





on the primary database. What are the steps involved in moving an existing database over to this configuration?


Answer



You'll get that error if you try to run the alter database [yourdb] set partner... statement at the primary first. You need to run that alter statement at the secondary and then run it at the primary. So, in the link that you pointed to, it seems that the last thing in step 10 hasn't been run yet.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...