How to move log files without detach?

  • Trying to get ready for a hardware move, one of the things I need to do is move all the log files to a different location on the new server. About 200 log files, all part of replicated databases. Can't detach without dropping replication (doable, but a lot of work!). I've tried updating sysfiles1, the update succeeds but when I stop/start the service, sysfiles1 remains unchanged. Alter database only works with tempdb for moving files. Looked at adding a second log file, then doing dbcc shrinkfile with emptyfile, still won't let you delete the primary (original) log file.

    So...anyone have ideas?

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Maybe you could move all the non primary log

    with the emptyfile command and then create a new primary log with the dbcc rebuild_log command. You must ensure that no commited transactions remain in the log.

    I've never tried it, but I can't think of anything else.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply