Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

How to repair the table Expand / Collapse
Author
Message
Posted Friday, July 27, 2012 7:51 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, June 27, 2013 2:16 AM
Points: 16, Visits: 108
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...
Post #1336517
Posted Friday, July 27, 2012 8:04 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, April 17, 2014 8:58 AM
Points: 5,077, Visits: 8,918
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
Post #1336530
Posted Friday, July 27, 2012 8:26 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, June 27, 2013 2:16 AM
Points: 16, Visits: 108
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)
Post #1336544
Posted Friday, July 27, 2012 8:36 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 3:13 AM
Points: 1,215, Visits: 2,787
backup log not backup database!


Post #1336550
Posted Friday, July 27, 2012 8:40 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 3:13 AM
Points: 1,215, Visits: 2,787
BACKUP LOG database_name TO <backup_device> [WITH { CONTINUE_AFTER_ERROR | NO_TRUNCATE }




Post #1336554
Posted Friday, July 27, 2012 9:29 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, June 27, 2013 2:16 AM
Points: 16, Visits: 108
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.
Post #1336587
Posted Friday, July 27, 2012 9:39 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 12:11 PM
Points: 22,509, Visits: 30,228
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)



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)
Post #1336600
Posted Friday, July 27, 2012 9:48 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, June 27, 2013 2:16 AM
Points: 16, Visits: 108
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.
Post #1336606
Posted Friday, July 27, 2012 9:51 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 3:13 AM
Points: 1,215, Visits: 2,787
which mssql version?


Post #1336609
Posted Friday, July 27, 2012 9:58 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, June 27, 2013 2:16 AM
Points: 16, Visits: 108
mssql2000
Post #1336612
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse