Mirroring between two Ms-sql servers for Migrating server from one Datacenter to other Datacenter I have a query about microsoft sql server. I'm looking for migrating ms sql server from one vendor to another vendor(Datacenter). I'm looking to have a mirror configuration between servers since my database is close to 40GB and would take days for copying from old to new, So once the database is synchronized, i would be taking down the old server and connect my app with new server.

My concern is if i take backup and restore it in the new server and start mirroring, Would the data will be mirrored where transactions happened between taking backup of the server and starting mirroring?

Thanks,
Swaroop.
This is perfectly viable (and is how I moved several databases before). The outline of the process is this:


Make sure the source database is in full recovery mode
Configure the source to no NO_TRUNCATE transaction log backup (so the log is preserved)
Full Backup the source. Preferably use backup compression
Take your full backup (on a USB stick if it takes to long to copy over the network) to 
the target
Restore full backup on target
Take a log backup of the source
Move (using your fastest method as in 4) the log backup to the target an apply it there
Configure mirroring in async mode (source and target can now mirror)
Start regular transaction log backups again on the primary
Wait for mirror to catch up (use the mirror admin tools to monitor)
Set mirror to sync mode
Move the app pointer and manually fail over the mirror


A thing you have to be careful about is that you have enough space to hold the transaction log while the move is happening. But a 40GB database is tiny, so I assume you wont have a lot of tlog traffic on it.

Another thing to watch out for is that you have the same security set up on the target as on the source. If not, you may end up with orphaned users when you swing over the server. This is less of an issue if you only use Windows logins.

Getting this right takes a bit of practise. I would advise to test it out on a development system first to make sure you have all the steps scripted nicely.