Chinaunix首页 | 论坛 | 博客
  • 博客访问: 138694
  • 博文数量: 31
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 0
  • 用 户 组: 普通用户
  • 注册时间: 2018-11-12 09:56
文章分类

全部博文(31)

文章存档

2014年(6)

2013年(9)

2008年(7)

2007年(7)

2006年(2)

分类: Sybase

2007-07-17 15:56:51

How to Find an Object Name from a Page Number

Some Adaptive Server error messages only specify a logical page number and do not indicate the table or index name to which the page belongs. This section describes how to determine to which object a particular database page belongs.

Suppose you encounter this error message:

Error 614, Severity 21, State 1. A row on page 121

was accessed that has an illegal length of 0 in database 'production'.

This error occurs when Adaptive Server accesses a data or index row whose length is smaller than the minimum row size or greater than the maximum row size. The error message provides the relevant page number and database name, but not the name of the affected table or index.

To determine which table or index is involved, follow these steps:

  1. Log into Adaptive Server as "sa".
  2. Enable trace flag 3604 to allow dbcc output to appear at your terminal:

3.          1> dbcc traceon(3604)

2> go

  1. Use dbcc page to display information about the page in question.

Here is the syntax:

   dbcc page (database_name, page_number)

The dbcc page command is not a supported feature and Sybase Technical Support cannot answer any questions regarding any values other than object ID and index ID.

To find information about page 121 (the index or table page indicated in the error message) in the salaries database, execute the following command:

1> dbcc page (salaries, 121)

2> go

Page found in cache default data cache.

BUFFER:

Buffer header for buffer 0x13d6800

page=0x13d7000 bdnew=0x0 bdold=0x0 bhash=0x0 bmass_next=0x0

bmass_prev=0x0 bvirtpg=0 bdbid=0 bkeep=0

        bmass_stat=0x0800 bbuf_stat=0x0000 bpageno=121

        bxls_pin = 0x00000000 bxls_next = 0x00000000b

        bxls_flushseq 0 bxls_pinseq 0

PAGE HEADER:

Page header for page 0x13d7000

pageno=121 nextpg=122 prevpg=120 objid=7 timestamp=0001 0000043f

nextrno=1 level=10 indid=0  freeoff=1 minlen=1

page status bits: 0x8000,0x8,

 

DBCC execution completed. If DBCC printed error messages, contact

a user with System Administrator (SA) role.

Warning!

Be sure to provide the correct page number.

  1. Translate the object ID (objid) into a table name. For example:

6.          1> use production

7.          2> go

8.          1> select object_name(7)

2> go

--------------

bad_table

  1. Translate the index ID (indid) into an index name, if applicable:

1> use database_name2> go

1> select name

2> from sysindexes

3> where id = objid

4> and indid = indid

5> go

Refer to the table below to determine the type of object to which the page belongs. The object type corresponds to its index ID value on the page:

Index ID

Meaning

0

Actual table data

1

Clustered index

2-250

Nonclustered indexes

255

Text/image page

Index ID 3, for example, corresponds to a nonclustered index. If the index ID is 0, the page does not belong to an index.

  1. Disable trace flag 3604:

11.     1> dbcc traceoff(3604)

2> go

 

阅读(3417) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~