Geeks With Blogs
My Place For SQL Lets Talk SQL
Few days back our client had ahardware crash and NO backups nothing as usual was there...
 
So finally RAID was rebuilt and all SQL Files provided ...
 
Finally we started Attaching these files..Somewhere we succeeeded and somewhere we faced small issuess...
 
Now we had a SQL Db which was throwing TORN PAGE Errors.. during Attching ..so I proceeded with followings teps..
1. Created a DB of same name...
2. Stopped the services
3. Copied the files on the actual and new DB files with same name
4. Started the services and as expected got the DB in Suspect MODE
5. Moved it to emergency mode to reset the statsu but it didnt reset it to Normal
6. tried to BCP out the data but got Login Error.
7. Tried from Query Analyser to Check Database Health
 
FIRST ERROR
 
=========================================
Server: Msg 8944, Level 16, State 4, Line 1
Table error: Object ID 1, index ID 0, page (1:540555), row 6. Test
(offsetNull >= BASEOFFSET) failed. Values are 0 and 4.
Server: Msg 8966, Level 16, State 1, Line 1
Could not read and latch page (1:540555) with latch type SH. sysobjects failed.
====================
 
8. So used  DBCC CHECKTABLE('Sysobjects') as sysobjects was the culprit,Received this Error
 
======================================================================
Server: Msg 605, Level 21, State 1, Line 1
Attempt to fetch logical page (1:904818) in database 'smw10w100w100w155'
belongs to object '1245663931', not to object 'sysobjects'.
Connection Broken
 
9. Moved the Db to single User and then tried to Repair  with
 
ALTER DATABASE smw10w100w100w155
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE
====================================================================
DBCC CHECKDB ('smw10w100w100w155', REPAIR_REBUILD )
DBCC CHECKDB ('smw10w100w100w155', REPAIR_ALLOW_DATA_LOSS )
 
BUt Following error still persisting
 
=======================
Server: Msg 8966, Level 16, State 1, Line 1
Could not read and latch page (1:540555) with latch type SH. sysobjects failed.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
==================
 
 
I ahve solved this issue long back but my Memory and Processor has worn out a bit so need your help ASAP....
 
 
 
 
 
 
 
 
 
 
 
DBCC INDEXDEFRAG (smw10w100w100w155, sysobjects,id)
EXEC sp_dboption 'smw10w100w100w155', 'Single user', 'true'
==============
ALTER DATABASE smw10w100w100w155
SET SINGLE_USER
====
ALTER DATABASE smw10w100w100w155
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE
====================================================================
DBCC CHECKDB ('smw10w100w100w155', REPAIR_REBUILD )
DBCC CHECKDB ('smw10w100w100w155', REPAIR_ALLOW_DATA_LOSS )
====================================================================
Server: Msg 8966, Level 16, State 1, Line 1
Could not read and latch page (1:540555) with latch type SH. sysobjects failed.
DBCC execution completed. I
if DBCC printed error messages, contact your system administrator.
====================================================================
sp_help sysobjects
select * from sysobjects
======================================================================
Server: Msg 605, Level 21, State 1, Line 1
Attempt to fetch logical page (1:904818) in database 'smw10w100w100w155'
belongs to object '1245663931', not to object 'sysobjects'.
Connection Broken
========DBCC CHECKTABLE('Sysobjects') After this I ran================
Server: Msg 8944, Level 16, State 4, Line 1
Table error: Object ID 1, index ID 0, page (1:540555), row 6. Test
(offsetNull >= BASEOFFSET) failed. Values are 0 and 4.
Server: Msg 8966, Level 16, State 1, Line 1
Could not read and latch page (1:540555) with latch type SH. sysobjects failed.
====================================================================

 
Posted on Wednesday, April 13, 2005 6:00 AM | Back to top


Comments on this post: SQL Torned my Pages and Memory

# re: SQL Torned my Pages and Memory
Requesting Gravatar...
Have you found a resolution to this yet? I have the same general problem. If you did fix it please post how you did so.

Thanks,

Zych
Left by Chris on Apr 22, 2005 7:52 AM

# re: SQL Torned my Pages and Memory
Requesting Gravatar...
nOt yet..I am myself dripping some Research on this...some got solved but no concrete remedy
Left by veer on Apr 24, 2005 10:17 PM

# re: SQL Torned my Pages and Memory
Requesting Gravatar...
I have too same problem
Left by graffiti on May 06, 2005 3:01 PM

# re: SQL Torned my Pages and Memory
Requesting Gravatar...
hi,
I have too same problem , are you ok?
can you help me? thanks.
mail:hingman@devlib.net
Left by hingman on Sep 11, 2005 6:08 AM

# re: SQL Torned my Pages and Memory
Requesting Gravatar...
Export all the data as much as possible. Rebuild your server and recreate all the databases. Import all the data back into the databases.
Left by anon on Nov 30, 2006 3:37 PM

Your comment:
 (will show your gravatar)


Copyright © Veer Ji Wangoo | Powered by: GeeksWithBlogs.net