SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 log shipping cutover and missed transactions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

influent
Constraint Violating Yak Guru

USA
361 Posts

Posted - 08/28/2012 :  17:44:43  Show Profile  Reply with Quote
I'm going to use log shipping as a quick way (i.e. very little downtime) to migrate my databases to a new server in a different location. Since I can't afford to lose any transactions, my plan is to make the databases read-only on the primary server, then take the last transaction log backup, then copy it to the secondary server and restore it there. Will making the primary databases read-only screw up my transaction logs in any way? Is there a better way to ensure that no data modifications occur on the primary that aren't captured in the t-log backups? (Assume that my apps are in a million places and use a million servers talking to SQL Server.)

chadmat
The Chadinator

USA
1953 Posts

Posted - 08/28/2012 :  17:47:32  Show Profile  Visit chadmat's Homepage  Reply with Quote
Why not use mirroring, and just switch roles and break the miroring session when you are ready to migrate?

-Chad
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
35007 Posts

Posted - 08/28/2012 :  17:56:17  Show Profile  Visit tkizer's Homepage  Reply with Quote
We use mirroring for this work.

If you want to use log shipping, skip the read-only step and instead disable all logins on primary, kill any spids still in there, then take the backup.

But I seriously would not bother with log shipping. We used log shipping on 2000 for this stuff, and oh boy mirroring saved us so much time and headache starting with 2005!

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

influent
Constraint Violating Yak Guru

USA
361 Posts

Posted - 08/28/2012 :  18:03:54  Show Profile  Reply with Quote
I should use mirroring even if the two servers are separated by 800 miles and 25 ms of latency?
Go to Top of Page

chadmat
The Chadinator

USA
1953 Posts

Posted - 08/28/2012 :  18:05:51  Show Profile  Visit chadmat's Homepage  Reply with Quote
Yep!

-Chad
Go to Top of Page

influent
Constraint Violating Yak Guru

USA
361 Posts

Posted - 08/28/2012 :  18:15:58  Show Profile  Reply with Quote
This page says I can run mirroring in high-performance mode, which I would do because I can't afford to let transactions get any slower.
http://msdn.microsoft.com/en-us/library/ms189852(v=sql.105).aspx

But it says there could be data loss, which I don't understand. Would there only be data loss if the principal went down and the mirror didn't receive the last transactions?
Go to Top of Page

chadmat
The Chadinator

USA
1953 Posts

Posted - 08/28/2012 :  18:19:16  Show Profile  Visit chadmat's Homepage  Reply with Quote
You should run it in high performance mode until you are ready to officially switch roles. Then switch to Sycronous Mode, and switch the roles.

The reference to data loss is because the Principal commits without receiving acknowledgement from the Mirror, so if the principal fails, there is no guarantee that the mirror is up to date. This is why you have to switch to syncrnous mode before you switch roles, so you make sure they are both in sync.

-Chad
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
35007 Posts

Posted - 08/28/2012 :  18:19:34  Show Profile  Visit tkizer's Homepage  Reply with Quote
Do you have Enterprise edition? We use async mirroring. You get the mirror site up-to-date right before the switcheroo. Before that, it's only a little behind. No data loss whatsoever.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

Edited by - tkizer on 08/28/2012 18:30:22
Go to Top of Page

influent
Constraint Violating Yak Guru

USA
361 Posts

Posted - 08/28/2012 :  18:19:56  Show Profile  Reply with Quote
Looks like Brian Egler recommends log shipping in the case of WAN's.
http://www.networkworld.com/community/node/56351
Go to Top of Page

influent
Constraint Violating Yak Guru

USA
361 Posts

Posted - 08/28/2012 :  18:20:38  Show Profile  Reply with Quote
I do have Enterprise.
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
35007 Posts

Posted - 08/28/2012 :  18:28:58  Show Profile  Visit tkizer's Homepage  Reply with Quote
Then async mirroring is perfect for this.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000