Friday, March 9, 2012

Help needed - URGENT!

Hi all,

I need help urgent :
I did a very stupid mistake and haven't backed up my database.
I had a hardware problem and when the database server came up again I saw that my most important database is in suspected mode.
I tried detaching it with no success , so I copied the mdf file to another dirctory and then deleted the database from the server, thinking I would be able to use sp_attach_single_file_db. However, when I try to do that I am getting an error about the log file as follows:
Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'smmdb'. CREATE DATABASE is aborted.
Device activation error. The physical file name 'D:\MSSQL7\data\smmdb_log.LDF' may be incorrect.

note : I am using SQL 2000 SP3 , although the name of directory is shows otherwise.

Do I have any chance to do something (and save my job..)?>> I did a very stupid mistake and haven't backed up my database.
lol.
Treat it as a valuable learning experience.
You shouldn't lose your job as it's your bosses fault for not putting someone who knows about database development in charge of you.

Try creating a new database the same size, stop the server, replace the mdf with your dubious one.
This should come up suspect.

In sysdatabases set the starus of the database to 32768 (emergency mode) - you will have to allow updates to system tables.

restart the server and you may be able to access it and retrieve data.

In future take backups and do test restores.
If you don't test the backups then you still can't say you have a backup strategy.

No comments:

Post a Comment