To move a user database you have to detach it. Right click on the db and select tasks-> detach.
Then copy the .mdf and .ldf files to the location you want.
Go back to SSMS right click on Databases and select attach.
Enter the path to your .mdf and .ldf files.
If you need to move your system databases post back and I'll give you instructions.
- Paul
- If at first you don't succeed, find out if the loser gets anything.
Since this is a fresh install. I uninstall SQL2005.
My new question is how do I install SQL 2005 and choose where to put my Data (E) log (F) Tempdb (F).
Hope you can help.
Thanks
You can't do that on the install. You can select the advanced option on the third or fourth screen to select your install path. But after the install you would have to move your databases.
- Paul
- If at first you don't succeed, find out if the loser gets anything.
Msg 5121, Level 16, State 1, Line 1
The path specified by "
E:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\tempdb.mdf" is not in a valid directory.
Msg 5121, Level 16, State 1, Line 1
The path specified by "
E:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\templog.ldf" is not in a valid directory.
Is E & F a MAPPED drive? If so, you can't use them.
BTW- For user databases, once your install is done, right click on the instance in Enterprise Manager, select properties. Go to the Database Settings tab and you can set where you want the data and log files to go when you create a new database.
Paul,
That was the first thing I checked.
Here is the path on the server where I want it:
E:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data
Now I have it in :
F:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data
And I use:
use master
go
Alter database tempdb modify file (name = tempdev, filename = '
E:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\tempdb.mdf')
go
Alter database tempdb modify file (name = templog, filename = '
E:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\templog.ldf')
Go
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.