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 2000 Forums
 SQL Server Administration (2000)
 restoring data using only the .ldf and .mdf files

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-01-14 : 08:41:45
Harry writes "Is there any way to restore data using only the data and the log file (.ldf, .mdf)? I do not have any .bak file but I do have the other two.

Tahnk you."

mphelps
Starting Member

12 Posts

Posted - 2002-01-14 : 08:57:23
You can use the system stored procedure

Sp_attach_db

e.g 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'



quote:
I don't suffer from insanity, I enjoy every second of it.


Go to Top of Page
   

- Advertisement -