Sql-server – move data and full text search files to another drive and change the drive letter

sql serversql-server-2005

My server's G: drive is rapidly running out of space. It mainly contains data files (*.mdf) for both system and user databases. The FullText Catalogs also exist on that drive.

IT added a much lager E: drive.

I would like to:

  • shutdown SQL Server
  • copy everything from G:\ to E:\
  • change the G:\ drive to X:\
  • change the E:\ drive to G:\
  • reboot

Will that cause any problems with SQL Server? At the end of the process all of the files will be on the G:\ drive; just not on the original G:\ drive.

Best Answer

I just did something like this with my system databases for a SAN migration and it didn't seem to have any negative impact. Having said that, I tested it in a dev/test environment. Do you have an opportunity to test this in a dev/test environment?

Also, there's not much of a need to reboot. Just stop the services, do the move, and start the services.

One final consideration is that you copy the files appropriately. Managing NTFS permissions issues can be a real pain so use something like XCOPY (which is what I used) or RoboCopy to ensure that you preserve the integrity of those permissions.