I need to move a database's log file to a different disk. Can I do this without shutting down? It's pretty clear that I can create a second log file on the new disk but, what do I have to do to delete the old log file? The documentation warns that files must be empty to be deleted but I can't find any information on how to empty and disable a log file.
Will a BACKUP LOG make the log file empty enough to be deleted? How do I make sure that new transactions are all written to the new log file?
You can't move the primary log file whilst the db is online, i.e. the one you create with the database.
You could add another and then shrink the original and set the auto grow to off, but thats not ideal.
Why can't you take the DB offline for 5 minutes?
|||Dang. I guess I'll have to take the database offline for 5 minutes. I was hoping to avoid that because even 5 minutes of downtime is going to take an hour of coordination, communication etc. This db is used during hospital admissions.
No comments:
Post a Comment