Search for a damaged object by the number of the damaged page in MS SQL Server 2005
3r3r1616. 3r3-31. The other day, one of the MS SQL Server databases went to Suspect, there was an error message in the log: 3r3151. 3r3r1616. 3r33939. Msg 710? Level 2? State ? Line 14
3r3r1616. Database ID ? page (1: 386499), slot 0 for LOB data type node does not exist. This is usually caused by transactions that can be read uncommitted data on a data page. Run DBCC CHECKTABLE. 3r33939. 3r3151. 3r3r1616. The base was transferred to Emergency and attempted to perform DBCC CHECKDB, but execution stopped immediately: 3r3151. 3r3r1616. 3r33939. Msg 892? Level 1? State ? Line 13
3r3r1616. Check terminated. Failure was detected while collecting facts. Possibly tempdb out of space or a system table is inconsistent. Check previous errors. 3r3151. 3r3r1616. Msg 710? Level 2? State ? Line 13
3r3r1616. Database ID ? page (1: 386499), slot 0 for LOB data type node does not exist. This is usually caused by transactions that can be read uncommitted data on a data page. Run DBCC CHECKTABLE. 3r33939. 3r3151. 3r3r1616. DBCC PAGE (database_id, file_id, page_id, printopt):
3r3r1616.
3r3124. DBCC TRACEON (3604); 3r3r1616. DBCC PAGE (? ? 324234? 0)
DBCC TRACEOFF (3604); 3r3r1616.
either: 3r3151. 3r3r1616.
3r3124. DBCC PAGE (? ? 324234? 0) WITH TABLERESULTS.
3r3151. 3r3r1616. If you are lucky (or you are playing on a live base), as a result you will see the Metadаta: ObjectId field, and the actual object_id itself:
3r3r1616. 3r3r1616. 3r33939. Metadаta: = Unavailable in offline DB
3r3151. 3r3r1616. If metadata is not available, all is not lost, in this case, we need the m_objId field (AllocUnitId.idObj). If m_objId = 25? trouble close the article and look for something else (try scribing everything you can and drag the data, perform DBCC CHECKDB with “recovery” parameters blindly, etc.). 3r3151. 3r3r1616. The screenshot shows that I have m_objId = 993? i.e. can continue. 3r3151. 3r3r1616. Now you need to do some small calculations to calculate the Allocation Unit ID (for more details about Allocation Units, you can read 3r3144. Here
):
3r3r1616. 3r33939. Allocation Unit ID = m_objid * 65536 + (2 ^ 56)
3r3151. 3r3r1616. In our case:
3r3r1616. 3r33939. Allocation Unit ID = 9931 * 65536 + (2 ^ 56) = 72057594688765952
3r3151. 3r3r1616. So, knowing the Allocation Unit ID, you can see what we have in the system view 3r3153. sys.allocation_units
:
3r3r1616.
3r3124. SELECT * FROM sys.allocation_units
WHERE allocation_unit_id = 72057594688765952
3r3151. 3r3r1616. 3r3124. SELECT * FROM sys.partitions WHERE hobt_id = 72057594661437440
3r3151. 3r3r1616. 3r3118. 3r3151. 3r3r1616. And here already there is a correct object_id and index_id. Now you can see what we have in sys.objects and sys.indexes, and just execute:
3r3r1616.
3r3124. SELECT OBJECT_NAME (object_id)
3r3151. 3r3r1616. Fortunately, in a real situation, and here, the nonclustered index turned out to be affected, after restructuring of which everything returned to normal (in fact, it is not, but this is another story). 3r3151. 3r3r1616. 3r3151. 3r3r1616. References :
3r3r1616. How to use DBCC PAGE 3r3151. 3r3r1616. 3r3141. SQL Server Page Level Corruption
3r3151. 3r3r1616. 3r3145. What Are Allocation Units? 3r3154. 3r3151. 3r3r1616. 3r3149. Finding a table name from a page ID
3r3151. 3r3r1616. sys.allocation_units 3r3162. 3r3r1616. 3r3r1616. 3r3r1616.
! function (e) {function t (t, n) {if (! (n in e)) {for (var r, a = e.document, i = a.scripts, o = i.length; o-- ;) if (-1! == i[o].src.indexOf (t)) {r = i[o]; break} if (! r) {r = a.createElement ("script"), r.type = "text /jаvascript", r.async =! ? r.defer =! ? r.src = t, r.charset = "UTF-8"; var d = function () {var e = a.getElementsByTagName ("script")[0]; e.parentNode.insertBefore (r, e)}; "[object Opera]" == e.opera? a.addEventListener? a.addEventListener ("DOMContentLoaded", d,! 1): e.attachEvent ("onload", d ): d ()}}} t ("//mediator.mail.ru/script/2820404/"""_mediator") () (); 3r3-3160. 3r3r1616. 3r3162. 3r3r1616. 3r3r1616. 3r3r1616. 3r3r1616.
It may be interesting
weber
Author23-11-2018, 09:10
Publication DateMicrosoft SQL Server / Database Administration
Category- Comments: 0
- Views: 334
entegrasyon programları
entegrasyon programları
Corvus Health provides medical training services as well as recruiting high quality health workers for you or placing our own best team in your facility. Check Out: Health Workforce Recruitment
I.T HATCH offers a wide range of IT services including remote access setup, small business servers, data storage solutions, IT strategy services, and more. Check Out: IT strategy services