Member_2_6478753
asked on
Move SQL Server 2005 database files to a new folder location
current path
Path:
C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER \MSSQL\DAT A
C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER \MSSQL\DAT A
i want to create new path in drive D
because i don't have space in C
Path:
C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER
C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER
i want to create new path in drive D
because i don't have space in C
detach your databases. move your files. atach the files on the new location.
http://support.microsoft.com/default.aspx?scid=kb;en-us;224071
http://support.microsoft.com/default.aspx?scid=kb;en-us;224071
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
First, can you tell us if they are user databases or system databases or all?
Just detach databases
and move mdf/ldf files to new location and attach them again.
and move mdf/ldf files to new location and attach them again.
Use the query below to move the database files
use Databasename
go
Alter database Databasename modify file (name = Databasenamefilename , filename = 'D:\Foldername\Databasenam
go
Alter database Databasename modify file (name = DatabasenameLogname , filename = 'D:\Foldername\Databasenam
go
You will need to replace the names accordingly for it to work.
Hope it helps.
Pthepebble