all groups > sql server replication > april 2005 >
You're in the

sql server replication

group:

Recover Database from MDF/LDF Files


Recover Database from MDF/LDF Files Jake Lee
4/27/2005 9:26:49 PM
sql server replication:
Hi,

I have only a pair of mdf/ldf files for a database, and want to recover =
to a new instance of SQL Server 2000. Please advise the procedure to =
perform this. Thanks a lot,

Re: Recover Database from MDF/LDF Files Paul Ibison
4/28/2005 12:00:00 AM
Jake,

you need to reattach the database. The syntax for this is as follows:

EXEC sp_attach_db @dbname =3D 'pubs',=20
@filename1 =3D 'c:\Program Files\Microsoft SQL =
Server\MSSQL\Data\pubs.mdf',=20
@filename2 =3D 'c:\Program Files\Microsoft SQL =
Server\MSSQL\Data\pubs_log.ldf'

HTH,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
Re: Recover Database from MDF/LDF Files Peter
7/12/2005 3:31:02 PM
Paul, I need to do the same thing but I'm using SQL Server Management Studio
from the June CTP of SQL Server 2005. My MDF and LDF files were created in
SQL Server 2000 MSDE. Can you tell me how execute the reattachment from the
Management Studio interface?

I'd be very grateful for any help. Thanks.

--
Peter


[quoted text, click to view]
Re: Recover Database from MDF/LDF Files Peter
7/13/2005 7:58:16 AM
Thanks anyway Paul

--
Peter


[quoted text, click to view]
Re: Recover Database from MDF/LDF Files Paul Ibison
7/13/2005 10:08:06 AM
Peter,
sorry but my VMWare has timed out, so I don't currently have access to the
CTP. Probably best to post up in the beta newsgroups.
Cheers,
Paul Ibison

AddThis Social Bookmark Button