REPAIR_ALLOW_DATA_LOSS

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Michael Schidlo (anonymous_at_discussions.microsoft.com)
Date: 09/24/04


Date: Fri, 24 Sep 2004 04:58:01 -0700

Hallo,

in absoluter Verzweiflung wende ich mich an Euch, weil ich
glaube, dass hier einige Profis mitlesen, die mir
vielleicht helfen koennen.

Das Szenario:

Nach Festplattenausfall und teurer Wiederherstellung der
Daten, habe ich die Aufgabe die SAP-Datenbank wieder zum
laufen zu bekommen. Die DB besteht aus 3-Dateien + log (1x
mdf, 2x ndf + ldf) alles zusammen ca. 23 GB.

Die Erfahrungen:

Nach Studium unzaehliger Forenberichte sind mir immer
wieder drei Begriffe ins Auge gesprungen:

db neu erstellen und alte dateien "unterjubeln"

emergency mode

-> kann db mit set status von online in suspect modus
switchen.
leider ist die db in keinem dieser modi ansprechbar (some
files can't be activated)

dbcc checkdb

-> habe ich ausgefuehrt und wurde auf inconsistenzen
hingewiesen, die ich mit REPAIR_ALLOW_DATA_LOSS evtl.
reparieren kann.

single-user mode

-> ist voraussetzung fuer die Reparatur; bekom die db aber
leider nicht in den SU-Mode.

=> und so beisst sich die Katze in den Schwanz. Solange
ich nicht in den SU-Mode komme, kann ich auch keine
Reparaturen vornehmen, oder?

help:

kann mir jemand weiterhelfen die db zumindest dazu zu
bringen die checkdb befehle zu akzeptieren.

danke fuer eure hilfe
micha

P.S.: Hier noch die letzte Fehlermeldung nach SQL-Query:

1)

USE AE1
go
sp_dboption 'AE1', 'single_user', 'true'
go
DBCC CHECKDB ('AE1', REPAIR_ALLOW_DATA_LOSS)
go

-->

Server: Msg 945, Level 14, State 2, Line 1
Database 'AE1' cannot be opened because some of the files
could not be activated.
Server: Msg 5181, Level 16, State 1, Procedure
sp_dboption, Line 493
Could not restart database 'AE1'. Reverting back to old
status.
Server: Msg 15615, Level 16, State 1, Procedure
sp_dboption, Line 496
DBCC DBCONTROL error. Database was not made single user.
DBCC execution completed. If DBCC printed error messages,
contact your system administrator.
Server: Msg 945, Level 14, State 2, Line 1
Database 'AE1' cannot be opened because some of the files
could not be activated.

2) dbcc checkdb ('AE1') #im Emergency-Mode

Changed language setting to us_english.
Server: Msg 8966, Level 16, State 1, Line 1
Could not read and latch page (1:832219) with latch type
SH. sysobjects failed.
Server: Msg 8944, Level 16, State 1, Line 1
Table Corrupt: Object ID 1, index ID 0, page (1:832219),
row 12. Test (!(hdr->r_tagA & (VERSION_MASK |
RECTAG_RESV_A | RECTAG_RESV_B))) failed. Values are 113
and 193.
Server: Msg 8944, Level 16, State 1, Line 1
Table Corrupt: Object ID 1, index ID 0, page (1:832219),
row 12. Test (hdr->r_offsetNull >= BASEOFFSET) failed.
Values are 3 and 4.
DBCC results for 'AE1'.
CHECKDB found 0 allocation errors and 2 consistency errors
in table 'sysobjects' (object ID 1).
CHECKDB found 0 allocation errors and 2 consistency errors
in database 'AE1'.
repair_allow_data_loss is the minimum repair level for the
errors found by DBCC CHECKDB (AE1 ).
DBCC execution completed. If DBCC printed error messages,
contact your system administrator.



Relevant Pages

  • Re: Help-Corrupt table
    ... table corruption that DBCC repairs will not fix so you must restore from ... >clustered, hypothetical index. ... >>BTW CHECKTABLE and CHECKDB are different if you check ...
    (microsoft.public.sqlserver.server)
  • Re: DBCC error 913
    ... You don't need to run DBCC CHECKALLOC as well as DBCC CHECKDB - CHECKDB ... >> I assume that you use ALTER DATABASE to set in single user mode... ... >>> This is simple DBCC script I am running on the server every sunday. ...
    (microsoft.public.sqlserver.server)
  • =?Utf-8?Q?Re:_Konsistenzpr=C3=BCfung_fehlgeschl?= =?Utf-8?Q?agen?=
    ... Nun habe ich gleich die nächste Frage. ... for the errors found by DBCC CHECKDB (msdb). ... DBCC execution completed. ...
    (microsoft.public.de.sqlserver)
  • =?Utf-8?Q?Re:_Konsistenzpr=C3=BCfung_fehlgeschl?= =?Utf-8?Q?agen?=
    ... Wie rep ich die DB nun? ... CHECKDB found 0 allocation errors and 2 consistency errors in database 'msdb'. ... DBCC execution completed. ... Als SQL war bei der erstinstalltion die standrat SQL von dem SBS 2003 ...
    (microsoft.public.de.sqlserver)