Groups | Blog | Home
all groups > sql server odbc > march 2005 >

sql server odbc : HELP(!): Possible corrupted DB



Vycka
3/29/2005 6:42:56 PM
Hello,

The problem accured with the database that contains critical data, so it is
very important to me to solve it as quickly as possible.

So the problem is that I cannot attach my database to the SQL server.
How all this began? At first I decided to back up my database. But by
mistake in stead of backuping I started restoring my database. After a few
seconds I realized that I was doing wrong operation, so I pressed STOP. The
restoring process seemed to be stopped, but unfortunately I couldn't do
anything with the database. Each time I tried I got an error "...restoring
is in progress..." or smth. Than I noticed that the status of the database
(in the enterprise manager) changed. The color of the database changed from
yellow to gray and the DB name became [database name] (loading). After that
I decided to detach my database and re-attach it. Detaching completed
succesffuly, but now I cann't attach it. Each time when I try to attach I
got an error:

"Error 9004: An error occured while processing the log for database
'[database name]'".
(On the top of the message window: "Microsoft SQL-DMO (ODBC
SQLState:HY000)")

Attempts to attach database file without log ends with the same error.
What is wrong with my database? Is there any possibility to recover my
database? What actions should I take?

I appreciate any information.

By the way I use Enterprise manager for all operations.

Vycka

P.S. MS SQL Server 2000 (SP3), OS Win 2003

Sue Hoegemeier
3/29/2005 7:10:54 PM
When you start a restore, you start overwriting the existing
data in the database. Stopping the restore in the middle of
the process will just leave the database a mess. So at that
point, you probably corrupted your database. Detaching a
corrupt database won't solve anything and you won't be able
to attach it. If you did, you'd still be attaching a
database in an inconsistent state. I think all you can do at
this point is restore from your last good backup. You could
try contacting Microsoft product support but I don't think
there is much they can do for you in this situation.

-Sue

On Tue, 29 Mar 2005 18:42:56 +0300, "Vycka"
[quoted text, click to view]
Lefty
3/30/2005 12:40:23 PM

[quoted text, click to view]
try this one

sp_attach_single_file_db

look it up in sql books online - it will create a new log file whilst
attaching

best regards

lefty


AddThis Social Bookmark Button