Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving database to new path in the same server SQL 2005

Status
Not open for further replies.

Ronel17

Technical User
Dec 31, 2004
60
US
Hi All,
I'm new to SQL. In a fresh insatllation I'm trying to move the database to an another drive and the logs to a separate drive. Help please.
Ron
 
Just as a test what happens if you try to move it to the root of E:. If that fails try the root of F:\.

- Paul [batman]
- If at first you don't succeed, find out if the loser gets anything.
 
So you can't move the tempdb at all?
How have you logged into SQL?

- Paul [batman]
- If at first you don't succeed, find out if the loser gets anything.
 
Paul,
I use this:

ALTER DATABASE tempdb MODIFY FILE ( NAME = templog , FILENAME = 'E:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\templog.ldf' )

It's working.

Ron
 
So you only changed the case of 'MODIFY FILE'?

Well, I'll have to remember that one.

- Paul [batman]
- If at first you don't succeed, find out if the loser gets anything.
 
All right thank you very much for the help.
Ron
 
Hey Paul,
Another question.
I need to restore my data from an SQL2000 to a new box 2005.
Do I need to restore my system data or just my userdata?

Thanks

Ron
 
just your user data. If you want your scheduled jobs restore the msdb database as well.


- Paul [batman]
- If at first you don't succeed, find out if the loser gets anything.
 
You might want to migtrate your user accounts too. If you don't you will have to run sp_change_users_login to sync up the user SIDS in the database with the server.

There is an faq on how to do that in the faq section of this forum.

- Paul [batman]
- If at first you don't succeed, find out if the loser gets anything.
 
Ok Thanks. I'm restoring the data now, I'll let you know. Thanks again for your help.

Ron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top