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 2005 Forums
 SQL Server Administration (2005)
 New database from existing mdf and ldf files

Author  Topic 

kumarich1
Yak Posting Veteran

99 Posts

Posted - 2009-04-07 : 12:36:05
I am trying to create new database from existing mdf and ldf files. Is it possible.

Thanks

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-04-07 : 13:59:26
Have a look at the CREATE DATABASE ... FOR ATTACH syntax in BOL

You could also use sp_attach_db - but that's been deprecated in 2005. So best lookup the above.
Go to Top of Page

savior faire
Posting Yak Master

194 Posts

Posted - 2009-04-07 : 14:55:29
Also, if you right click the Databases folder, you'll see "Attach" as a selection. I believe that is were that task is...

Talk sense to a fool and he calls you foolish.
Go to Top of Page
   

- Advertisement -