Link to home
Create AccountLog in
Avatar of Camillia
CamilliaFlag for United States of America

asked on

Help: database in Suspect mode

This is SQL 2000

I detached and reattached  3 databases to another drive. I was detaching and reattching one more database when we lost the drive.

Good thing is that I didnt delete the original ldf and mdf files (we might lose some data but better than losing the entire database)...

Now, the 3 databases that point to the lost drive are in "suspect" mode. Can I just attach them pointing to the backup ldf/mdf OR I need to delete them and attach??
SOLUTION
Avatar of Ian Pattison
Ian Pattison
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Camillia

ASKER


We're waiting to see if we can get the drive back, then i can try it..
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
arnold - 18 steps, really? I'm not a DBA and we dont have one either...

2. Move de-attached database file to any safe location;
3. Delete a suspect database using SQL Server Enterprise Manager console;

Why step 2? is it because if I delete the suspect database, it will delete the files?

With data one can never be too careful.
I did not author the article. I think one has to check a box to have the underlying files deleted.  The problem if you do not move the files, when you create the database of the same name, the old files will likely be overwritten or you will get an error/notice that a data/transaction log file of the same name already exists.
i moved the files, deleted the suspect, reattached. worked fine.