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)
 Help! How do i import my saved mdf files into databases?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-07 : 11:02:01
Stuart writes "hi there,

Our old nt server that had sql server 2000 running crashed. I managed to copy the database files from the machine (ldf & mdf files).

How do i re import these into sql server 2000? I have tried simply copying the files into the Data folder but after that when i try to start the service it stops by itself.

Is there a special method for re-importing the database files?"

Kevin Snow
Posting Yak Master

149 Posts

Posted - 2002-05-07 : 11:22:45
It sounds like you need to read up on the sp_attach_db stored procedure in Transact SQL Help.

You may need to create a database with the same name, detach it, then replace it with the file you saved from the crashed server (The help file suggests you should only reattach databases that have been detashed using the sp_detach_db command, but obviously you are trying to get around that).
Afterward, you'll need to patch together security logins at the least.

Be sure you don't create a new database over your only copy of the crashed database.
Go to Top of Page
   

- Advertisement -