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 2005 Forums
 High Availability (2005)
 Attaching and deattaching database
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

SQL_MAZFS
Starting Member

Pakistan
9 Posts

Posted - 06/21/2013 :  02:55:42  Show Profile  Reply with Quote
can anybody tell me how to attach database file from other location in sql server 2005??????????

mazfs

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 06/21/2013 :  03:06:50  Show Profile  Reply with Quote
1.detach the databse first using sql management studio gui or sp_detach_db procedure
2.copy mdf,ldf files to new server location
3. attach it to new server using ssms gui or sp_attach_db proc

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

prett
Posting Yak Master

USA
195 Posts

Posted - 07/25/2013 :  00:29:19  Show Profile  Visit prett's Homepage  Reply with Quote
You can not detach a SQL server database if any of below points are true:

1. Database is being mirrored in the mirroring.
2. Database is suspect.
3. Database is a system database.
4. Database is replicated & published.
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.06 seconds. Powered By: Snitz Forums 2000