Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 SQL SERVER and Database FROM C DRIVE TO E DRIVE

Author  Topic 

sridharsridhar
Starting Member

21 Posts

Posted - 2013-07-22 : 07:43:09
I had installed SQL 2008 in C DRIVE and created few databases and given location in C drive only now i want to change the path to E drive .

can you suggest me the steps i need to do


Thanks,

sridhar

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-07-22 : 07:54:03
You need to detach the databases after making them in single user mode. Then move the physical files (mdf,ndfs if any and ldf) to new location E:\ and then reattach them.
You can either use UI in SSMS for attaching and detaching or use system procedures sp_attach_db and sp_detach_db

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-07-22 : 08:48:59
For your case, I wouldn't recommend the detach and attach approach. Follow the procedure outlined in these two MSDN articles, depending on whether you are trying to move system databases or user databases:

http://msdn.microsoft.com/en-us/library/ms345408.aspx
http://msdn.microsoft.com/en-us/library/ms345483.aspx

Also, some info in this thread: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=186964
Go to Top of Page

sridharsridhar
Starting Member

21 Posts

Posted - 2013-07-22 : 09:31:09
Thanks for all your help i will work on this and let you know if i face any issues

sridhar
Go to Top of Page
   

- Advertisement -