April 23, 2011 at 2:42 am
I don't have backup of the Database but I have .mdf and .ldf files. I want to restore the database in another server .
April 23, 2011 at 10:57 am
look up sp_attach_db
---------------------------------------------------------------------
April 23, 2011 at 11:00 am
Or, since sp_attach_db is deprecated on SQL 2005, CREATE DATABASE ... FOR ATTACH
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 25, 2011 at 3:56 am
you can use SSMS SQL Server Management studio to attach a database also by right on the Databases and then click ATTACH and then select files
Regards,
Syed Jahanzaib Bin Hassan
MCTS | MCITP | OCA | OCP | OCE | SCJP | IBMCDBA
My Blog
Regards,
Syed Jahanzaib Bin Hassan
BSCS | MCTS | MCITP | OCA | OCP | OCE | SCJP | IBMCDBA
My Blog
www.aureus-salah.com
May 9, 2011 at 3:24 pm
Attach is the best option, Use SSMS or T-SQL.
May 11, 2011 at 8:32 am
yes that pretty much what i do, dettach the DB , move the MDF, NDF and ldf files, then re-attach to the new location. i tend to script it when moving a few databases.
May 11, 2011 at 8:39 am
arun.sirpal (5/11/2011)
yes that pretty much what i do, dettach the DB , move the MDF, NDF and ldf files, then re-attach to the new location. i tend to script it when moving a few databases.
The only issue with that plan is that you can lose the db in the process (even if onle 1 byte is lost, the whole db is (possibly) gone).
It's much safer to copy then attach. Once everything is fine, delete the uneeded copy.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply