July 27, 2012 at 7:51 am
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...
July 27, 2012 at 8:04 am
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
July 27, 2012 at 8:26 am
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)
July 27, 2012 at 8:36 am
backup log not backup database!
July 27, 2012 at 8:40 am
BACKUP LOG database_name TO <backup_device> [WITH { CONTINUE_AFTER_ERROR | NO_TRUNCATE }
July 27, 2012 at 9:29 am
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.
July 27, 2012 at 9:39 am
Try:
BACKUP LOG database_name TO <backup_device> WITH NO_RECOVERY
Based on what I read here:
July 27, 2012 at 9:48 am
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.
July 27, 2012 at 9:51 am
which mssql version?
July 27, 2012 at 9:58 am
mssql2000
July 27, 2012 at 10:05 am
use backup log with no_truncate
July 27, 2012 at 10:08 am
sorry -- backup log dbname to disk with no_truncate,norecovery
July 27, 2012 at 10:10 am
"NORECOVERY", no underscore.
July 27, 2012 at 10:29 am
backup log PMSdb
to disk='D:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\PMSdb_Log.bak'
with NO_TRUNCATE,NORECOVERY
Msg 3031, Level 16, State 1, Line 1
Option 'no_truncate' conflicts with option(s) 'norecovery'. Remove the conflicting option and reissue the statement.
backup log PMSdb
to disk='D:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\PMSdb_Log.bak'
with NORECOVERY
Msg 3101, Level 16, State 2, Line 1
Exclusive access could not be obtained because the database is in use.
Msg 3013, Level 16, State 1, Line 1
BACKUP LOG is terminating abnormally.
July 27, 2012 at 11:09 am
Scott D. Jacobson (7/27/2012)
"NORECOVERY", no underscore.
Nice catch, mistake in my typing. I should have just done a cut and paste.
Viewing 15 posts - 1 through 15 (of 29 total)
You must be logged in to reply to this topic. Login to reply