Monday, March 12, 2012

Install an mdf file

Can anyone give me the command line text to install an mdf file? I have a file called contacts.mdf from a Microsoft book and need to install it to MSDE in order to complete the examples in the book.

Thanks in advance.NOt sure if this will work in MSDE, but try sp_attach_db

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_ae-az_52oy.asp

Actually, it looks like it will work. Look at step 2 here:

http://support.microsoft.com/kb/q231923/|||Thanks, Chrisrock. I finally got it to work using sp_attach_db.

No comments:

Post a Comment