SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


moving files on log shipping secondary


moving files on log shipping secondary

Author
Message
tcronin 95651
tcronin 95651
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3146 Visits: 654
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?
anthony.green
anthony.green
SSC Guru
SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)

Group: General Forum Members
Points: 63388 Visits: 8598
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.



How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger


suryahaminata
suryahaminata
SSC Rookie
SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)

Group: General Forum Members
Points: 41 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.

Regards
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search