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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-05-02 : 07:56:24
|
| Manish writes "Hello Friends ,My SQL Server 2000 machine got infected with virus and had to be re-formatted .I have backup of the database as MDF and LDF files.Since the prior settings were done by someone else , how do I restore the backup.Kindly Advice.ThanksManish" |
|
|
Wanderer
Master Smack Fu Yak Hacker
1168 Posts |
Posted - 2003-05-02 : 09:00:11
|
| Do you know what version of SQL server 2000 (service packs etc.)?Keep a backup copy of the mdf and ldfRe-install SQL 2K and relevant service packs.Sp_attach_db DATABASENAME,'path to .mdf','path to .ldf'hopefully that should come up ...*#* *#* *#* *#* Chaos, Disorder and Panic ... my work is done here! |
 |
|
|
KnooKie
Aged Yak Warrior
623 Posts |
Posted - 2003-05-02 : 09:00:20
|
| Probably the easiest thing to do is read up on sp_attach_db and sp_attach_single_file_dbUnless you need info in it - You won't need the ldf file as it will be created automatically when you attach the mdf file====Paul |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-05-02 : 14:50:42
|
| Well hopefully the MSSQLSERVER service was stopped or the database was detached when the backup of the MDF and LDF files occurred, otherwise those files aren't of any use at all. The files have to be released from SQL Server before they can be moved/copied/backed up, etc...If these files can't be attached, then hopefully you have another backup file, most likely with a .BAK extension.Tara |
 |
|
|
|
|
|