Sql-server – Move database to another drive in same server

sql server

I have installed MSSQL server 2008 in my server in C: drive and I want to move it to the D: drive completely. That means, database locations, installed location to move another drive with data. Is it possible to done this?

Note: Detach method is only for move database. but I want to move whole installation and DB files to another drive.

Best Answer

It is easy and well documented to move data files (including master, model, tempdb,...) to other locations in MS-SQL Server. There is no supported approach to move the instalation (SQL Server binaries) to another drive / folder. I think even with manual manipulation of registry entries the SQL Server wouldn't come up again.

You should consider uninstall and new installation.

  1. backup all databases including system databases as master, model ( SSISDB)
  2. uninstall SQL Server using SQL Server installation center
  3. uninstall SQL Server 2008 Browser component by using the Add or Remove Programs
  4. install SQL Server with same instance name using SQL Server installation center; select new locations for binaries and data
  5. restore backups

This article describes how to uninstall a stand-alone instance of Microsoft SQL Server 2008. When you follow the steps in this article, you also prepare the system so that you can reinstall SQL Server 2008