February 10, 2009 at 11:44 am
Is there a way to move mdf and log file to another drive when the database is in use.
I am trying to gain some space on the drive by moving db files to a different drive by making a copy of that file on another drive and once copied i want to attach database to the file on new drive.
thanks
February 10, 2009 at 11:46 am
No, you can't move the file while the DB is online. You can add another file to the filegroup, and then shrink the data out of the existing one using the Emptyfile option, and move the data to the new file and then drop the older file, but this is very IO heavy, will likely cause performance problems, and generally not recommended as a best practice.
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply