Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to repair the table


How to repair the table

Author
Message
slizam
slizam
SSC Rookie
SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)

Group: General Forum Members
Points: 28 Visits: 111
when i running this...

DBCC CHECKDB('PMSdb') WITH NO_INFOMSGS

Server: Msg 8966, Level 16, State 1, Line 1
Could not read and latch page (1:399112) with latch type SH. sysindexes failed.

and

DBCC CHECKTABLE ('sysindexes') WITH NO_INFOMSGS

Server: Msg 8966, Level 16, State 1, Line 1
Could not read and latch page (1:399112) with latch type SH. sysindexes failed.
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID 1735289202, index ID 26996, page ID (1:399112). The PageId in the page header = (8224:538976288).
CHECKTABLE found 0 allocation errors and 1 consistency errors in table '(Object ID 1735289202)' (object ID 1735289202).
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKTABLE (PMSdb.dbo.sysindexes ).

what should i do after this? lets discuss it...
John Mitchell-245523
John Mitchell-245523
SSCrazy Eights
SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)

Group: General Forum Members
Points: 8897 Visits: 15487
Back up the tail of your transaction log.
Restore your database from the most recent good backup, with NORECOVERY.
Restore the transaction logs up to the point immediately before the corruption occurred.
Recover the database.
Investigate the cause of the corruption and check that all your firmware and drivers for RAID and so on are up to date.

John
slizam
slizam
SSC Rookie
SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)

Group: General Forum Members
Points: 28 Visits: 111
Back up the tail of your transaction log...

is it this one?

BACKUP DATABASE [PMSdb]
TO DISK = N'D:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\PMSdb.bak'
WITH NOFORMAT, NOINIT, NAME = N'PMSdb-Full Database Backup',
SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO

but the result is...

Msg 3033, Level 16, State 0, Line 1
BACKUP DATABASE cannot be used on a database opened in emergency mode.
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.

from table sysdatabases, PMSdb status is 4194328 not 32768 (emergency mode)
Hadrian
Hadrian
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1388 Visits: 3717
backup log not backup database!



Hadrian
Hadrian
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1388 Visits: 3717
BACKUP LOG database_name TO <backup_device> [WITH { CONTINUE_AFTER_ERROR | NO_TRUNCATE }



slizam
slizam
SSC Rookie
SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)

Group: General Forum Members
Points: 28 Visits: 111
No truncate...

backup log PMSdb
to disk='D:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\PMSdb_Log.bak'
with NO_TRUNCATE

Server: Msg 3033, Level 16, State 1, Line 1
BACKUP DATABASE cannot be used on a database opened in emergency mode.
Server: Msg 3013, Level 16, State 1, Line 1
BACKUP LOG is terminating abnormally.

continue after error...

backup log PMSdb
to disk='D:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\PMSdb_Log.bak'
with CONTINUE_AFTER_ERROR

Server: Msg 155, Level 15, State 1, Line 3
'CONTINUE_AFTER_ERROR' is not a recognized BACKUP option.
Lynn Pettis
Lynn Pettis
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26534 Visits: 38127
Try:

BACKUP LOG database_name TO <backup_device> WITH NO_RECOVERY

Based on what I read here:

http://msdn.microsoft.com/en-us/library/aa225964(v=sql.80)

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
slizam
slizam
SSC Rookie
SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)

Group: General Forum Members
Points: 28 Visits: 111
backup log PMSdb
to disk='D:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\PMSdb_Log.bak'
WITH NO_RECOVERY

Msg 155, Level 15, State 1, Line 3
'NO_RECOVERY' is not a recognized BACKUP option.
Hadrian
Hadrian
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1388 Visits: 3717
which mssql version?



slizam
slizam
SSC Rookie
SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)

Group: General Forum Members
Points: 28 Visits: 111
mssql2000
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search