Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

moving files on log shipping secondary Expand / Collapse
Posted Wednesday, August 13, 2014 8:36 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, November 29, 2016 7:07 AM
Points: 240, Visits: 470
been a while and dont have true test enviornment, but I need to detach the database on one of my seconday receiving log shipping server and move a few of the index files around due to space issue. Wanted to make sure but this action would not break the log shipping change in place would it?
Post #1602773
Posted Thursday, August 14, 2014 1:34 AM



Group: General Forum Members
Last Login: Thursday, September 1, 2016 2:56 AM
Points: 5,969, Visits: 6,067
As the DB is in no recovery or standby mode you wont be able to alter the file locations without dropping the database.

The only way would be to drop the database, restore it to the new locations with norecovery, restore all the logs up to the latest log and then let it all just carry on.

Don't need to make any changed to the log shipping plan, let the backups, and copy jobs run as normal, may want to disable the restore job until you have finished then re-enable it again.

Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
When a question, really isn't a question - Jeff Smith
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1603140
Posted Saturday, August 23, 2014 9:49 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, December 17, 2015 1:31 AM
Points: 1, Visits: 58
Hi, if the secondary log shipping database is too large and take long time to restore and create log shipping again. maybe you can try:
1. Set the secondary to recovery mode (because on stand by mode, you cant exec alter database command)
2. Disable all log shipping job
3. Alter your database to modify path: "alter database
Yourlogshippingdb modify file (name = logicalname, filename = 'newpathofyoursecondarydblocation')
4. Stop sql server service on your secondary log shipping server
5. Move your physical file to new location
6. Start sql server service
7. Enable log shipping job
8. Verify your log shipping db

I've done this on my prod server and it works.

Post #1606721
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse