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 |
|
lfmn
Posting Yak Master
141 Posts |
Posted - 2001-12-07 : 11:30:01
|
| I have a potential client who approached me with the following problem. I'm not sure how this happened (they were a little vague), but they have a data file and log file for a database (from sql server 7), but no backup. Is there any way to restore the database with only those two items?cursors are like hammers - sometimes you have to use them, but watch your thumb! |
|
|
manishrawat
Starting Member
9 Posts |
Posted - 2001-12-07 : 11:51:19
|
| SQL 2000 has great feature of Attach database where you can specify the MDF file path and later Ldf filepath and it can retore database as it is.Check in Enterprise manager - Under server name - > Databases..Right click databases and look Attach database in All tasks |
 |
|
|
efelito
Constraint Violating Yak Guru
478 Posts |
Posted - 2001-12-07 : 11:51:59
|
| If the database and log file were detached from a server using sp_detach_db, or at least moved after the server was shutdown, then sp_attach_db should do the trick. Check BOL for syntax and more info.Jeff BanschbachConsultant, MCDBA |
 |
|
|
lfmn
Posting Yak Master
141 Posts |
Posted - 2001-12-07 : 12:55:10
|
| Thank you both for your help. I'll try that. I thought that you could only use sp_attach_db when you had previously use sp_detach_db on the file.cursors are like hammers - sometimes you have to use them, but watch your thumb! |
 |
|
|
|
|
|