If you have .mdf and .ldf files you can use attachdb method, from BOL:
EXEC sp_attach_db @dbname = N'pubs',
@filename1 = N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs.mdf',
@filename2 = N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs_log.ldf'
If it complains because the database was not previously detached you can
simply create a database with the same name, detach it and then attach the
files you need.
Julia
-----Original Message-----
From: Kaustubh Puranik [mailto:Kaustubh.[Email Address Removed] Tuesday, August 19, 2003 7:35 AM
To: LazyDBA.com Discussion
Subject: Restore Databse / Create Database
Hi All,
Sorry for bugging you all again and again... When the restore
option fails I
always get .MDF and .LDF file. Is there any way to create the
database using
.MDF and .LDF files?
I am not that much interesed in data recovery as every night we
refreshed
it. My main concern is to recover the table structure and the stopred
procedure. If I can able to restore the table structure and the stored
procedures with no data then its fine...
Thanks in advance..
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To unsubscribe, e-mail: mssqldba-[Email Address Removed] additional commands, e-mail: mssqldba-[Email Address Removed]MS Sql Server LazyDBA home page