Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

SQL 2005

I want to move a log file to a different location. However, the database is the publisher for replication.

What is the easiest way to move the file without having to recreate the publication and/or subscribers. (it is a 300gb db)

share|improve this question

1 Answer 1

up vote 0 down vote accepted

There really isn't an easy way to do it.

The closest thing to an easy way would probably to be shut down everything that talk to the database, then backup the database, and restore using the WITH MOVE flag (and the KEEP_REPLICATION flag) to put the log file in its new location.

Or add a new log file to the database, then shrink the existing log file and cap its grows. In theory you should then be able to remove it. It'll probably be tricky to remove as you won't be able to remove it if there are any transactions pending replication in the log when you try.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.