Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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


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