SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 SQL SERVER and Database FROM C DRIVE TO E DRIVE
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sridharsridhar
Starting Member

India
21 Posts

Posted - 07/22/2013 :  07:43:09  Show Profile  Reply with Quote
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

India
52325 Posts

Posted - 07/22/2013 :  07:54:03  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

3741 Posts

Posted - 07/22/2013 :  08:48:59  Show Profile  Reply with Quote
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

India
21 Posts

Posted - 07/22/2013 :  09:31:09  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000