Select the product you need help with
信息: 说明的 DBCC 页命令文章编号: 83065 - 查看本文应用于的产品 本页概要下面的信息是一个细化上数据库一致性检查器 (DBCC) 命令 (来自 Sybase 内部课程"SQL Server 诊断手册") 的 Sybase 的说明。 本文讨论的 DBCC 页的使用,说明如何使用它的原因。 更多信息
NAME: DBCC PAGE
FUNCTION:
Prints out the contents of a SQL Server page.
SYNTAX:
dbcc page( {dbid|dbname}, pagenum [,print option] [,cache] [,logical] )
PARAMETERS:
Dbid or dbname - Enter either the dbid or the name of the database
in question.
Pagenum - Enter the page number of the SQL Server page that is to
be examined.
Print option - (Optional) Print option can be either 0, 1, or 2.
0 - (Default) This option causes DBCC PAGE to print
out only the page header information.
1 - This option causes DBCC PAGE to print out the
page header information, each row of information
from the page, and the page's offset table. Each
of the rows printed out will be separated from
each other.
2 - This option is the same as option 1, except it
prints the page rows as a single block of
information rather than separating the
individual rows. The offset and header will also
be displayed.
Cache - (Optional) This parameter allows either a 1 or a 0 to be
entered.
0 - This option causes DBCC PAGE to retrieve the page
number from disk rather than checking to see if it is
in cache.
1 - (Default) This option takes the page from cache if it
is in cache rather than getting it from disk only.
Logical - (Optional) This parameter is for use if the page number
that is to be retrieved is a virtual page rather then a
logical page. It can be either 0 or 1.
0 - If the page is to be a virtual page number.
1 - (Default) If the page is the logical page number.
如何使用4.2 版DBCC PAGE 用来获取 SQL Server 页面结构中包含的数据。如果使用的 DBCC 页,并希望该信息返回给前端使用请记住必须设置跟踪标志。必须执行 DBCC TRACEON(3604) 命令。如果信息而是发送到该错误日志,然后使用 DBCC TRACEON 标志 3605 而然后 3604。通常可以包含在页所属的对象除了做其他事情外,页标头、 上一页面鼠标指针和下一页指针中获得最有用的信息。也可以通过更改打印选项参数显示行和偏移的表。行显示在反向二进制文件从它们在实际页上的存储方式。可能的行长度错误可以被发现使用这种方法以及偏移表问题。 显示的所有行也都可手动从数据库提取数据,如果无法由 SQL 服务器中检索特定页,数据是非常关键。 示例下面是 DBCC 页使用的一个示例。返回的页面具有页面页眉、 行,和偏移量表。此页来自 master 数据库,页第一所属对象号为 1,它是系统对象。这是在页与出现在磁盘上。dbcc page(1,1,1) 页: 从磁盘读取页面。 BUFFER:
Buffer header for buffer 0x16674c16
page=0x28e77780 bdnew=0x0 bdold=0x0 bhash=0x0 bnew=0x0
bold=0x0 bvirtpg=0x5 bdbid=1 bpinproc=0 bkeep=0 bspid=0
bstat=0x0000 bstat2=0x0000 bpageno=0
页面页眉: 页 0x28e77780 的的页面页眉 pageno = 1 nextpg = 6 prevpg = 0 objid = 1 的时间戳 = 0001 08ae93d2 nextrno = 13 level = 0 indid = 0 freeoff = 1058 minlen = 64 页状态位: 0x100、 0x1, DATA: Offset 32 - 28e777a0: 01000100 01000000 00007100 00000000 00000000 ..........q......... 28e777b4: 00000000 00000000 00000000 00000000 00000000 .................... 28e777c8: 00000000 00000000 00000000 00000000 00000000 .................... 28e777dc: 53200000 4f007379 736f626a 65637473 024c42 S ..O.sysobjects.LB. Offset 111 - 28e777ef: 01010100 02000000 00005100 00000000 00000000 ..........Q......... 28e77803: 00000000 00000000 00000000 00000000 00000000 .................... 28e77817: 00000000 00000000 00000000 00000000 00000000 .................... 28e7782b: 53200000 4f007379 73696e64 65786573 024c42 S ..O.sysindexes.LB. Offset 190 - 28e7783e: 01020100 03000000 00005100 00000000 00000000 ..........Q......... 28e77852: 00000000 00000000 00000000 00000000 00000000 .................... 28e77866: 00000000 00000000 00000000 00000000 00000000 .................... 28e7787a: 53200000 4f007379 73636f6c 756d6e73 024c42 S ..O.syscolumns.LB. Offset 269 - 28e7788d: 01030100 04000000 00007100 00000000 00000000 ..........q......... 28e778a1: 00000000 00000000 00000000 00000000 00000000 .................... 28e778b5: 00000000 00000000 00000000 00000000 00000000 .................... 28e778c9: 53200000 4d007379 73747970 6573024a 42 S ..M.systypes.JB. Offset 346 - 28e778da: 01040100 05000000 00005100 00000000 00000000 ..........Q......... 28e778ee: 00000000 00000000 00000000 00000000 00000000 .................... 28e77902: 00000000 00000000 00000000 00000000 00000000 .................... 28e77916: 53200000 52007379 7370726f 63656475 72657302 S ..R.sysprocedures. 28e7792a: 4f42 OB. Offset 428 - 28e7792c: 01050100 06000000 00005100 00000000 00000000 ..........Q......... 28e77940: 00000000 00000000 00000000 00000000 00000000 .................... 28e77954: 00000000 00000000 00000000 00000000 00000000 .................... 28e77968: 53200000 50007379 73636f6d 6d656e74 73024d42 S ..P.syscomments.MB 28e7797c: . Offset 508 - 28e7797c: 01060100 07000000 00000100 00000000 00000000 .................... 28e77990: 00000000 00000000 00000000 00000000 00000000 .................... 28e779a4: 00000000 00000000 00000000 00000000 00000000 .................... 28e779b8: 53200000 50007379 73736567 6d656e74 73024d42 S ..P.syssegments.MB 28e779cc: . Offset 588 - 28e779cc: 01070100 08000000 00000100 00000000 00000000 .................... 28e779e0: 00000000 00000000 00000000 00000000 00000000 .................... 28e779f4: 00000000 00000000 00000000 00000000 00000000 .................... 28e77a08: 53200000 4c007379 736c6f67 73024942 S ..L.syslogs.IB. Offset 664 - 28e77a18: 01080100 09000000 00005100 00000000 00000000 ..........Q......... 28e77a2c: 00000000 00000000 00000000 00000000 00000000 .................... 28e77a40: 00000000 00000000 00000000 00000000 00000000 .................... 28e77a54: 53200000 50007379 7370726f 74656374 73024d42 S ..P.sysprotects.MB 28e77a68: . Offset 744 - 28e77a68: 01090100 0a000000 00007100 00000000 00000000 ..........q......... 28e77a7c: 00000000 00000000 00000000 00000000 00000000 .................... 28e77a90: 00000000 00000000 00000000 00000000 00000000 .................... 28e77aa4: 53200000 4d007379 73757365 7273024a 42 S ..M.sysusers.JB. Offset 821 - 28e77ab5: 010a0100 0b000000 00005100 00000000 00000000 ..........Q......... 28e77ac9: 00000000 00000000 00000000 00000000 00000000 .................... 28e77add: 00000000 00000000 00000000 00000000 00000000 .................... 28e77af1: 53200000 52007379 73616c74 65726e61 74657302 S ..R.sysalternates. 28e77b05: 4f42 OB. Offset 903 - 28e77b07: 010b0100 0c000000 00005100 00000000 00000000 ..........Q......... 28e77b1b: 00000000 00000000 00000000 00000000 00000000 .................... 28e77b2f: 00000000 00000000 00000000 00000000 00000000 .................... 28e77b43: 53200000 4f007379 73646570 656e6473 024c42 S ..O.sysdepends.LB. Offset 982 - 28e77b56: 010c0100 0d000000 00005100 00000000 00000000 ..........Q......... 28e77b6a: 00000000 00000000 00000000 00000000 00000000 .................... 28e77b7e: 00000000 00000000 00000000 00000000 00000000 .................... 28e77b92: 53200000 4c007379 736b6579 73024942 S ..L.syskeys.IB. OFFSET TABLE: Row - Offset 12 (0xc) - 982 (0x3d6), 11 (0xb) - 903 (0x387), 10 (0xa) - 821 (0x335), 9 (0x9) - 744 (0x2e8), 8 (0x8) - 664 (0x298), 7 (0x7) - 588 (0x24c), 6 (0x6) - 508 (0x1fc), 5 (0x5) - 428 (0x1ac), 4 (0x4) - 346 (0x15a), 3 (0x3) - 269 (0x10d), 2 (0x2) - 190 (0xbe), 1 (0x1) - 111 (0x6f), 0 (0x0) - 32 (0x20), 属性文章编号: 83065 - 最后修改: 2005年2月14日 - 修订: 3.1
机器翻译 注意:这篇文章是由无人工介入的微软自动的机器翻译软件翻译完成。微软很高兴能同时提供给您由人工翻译的和由机器翻译的文章, 以使您能使用您的语言访问所有的知识库文章。然而由机器翻译的文章并不总是完美的。它可能存在词汇,语法或文法的问题,就像是一个外国人在说中文时总是可能犯这样的错误。虽然我们经常升级机器翻译软件以提高翻译质量,但是我们不保证机器翻译的正确度,也不对由于内容的误译或者客户对它的错误使用所引起的任何直接的, 或间接的可能的问题负责。 点击这里察看该文章的英文版: 83065
(http://support.microsoft.com/kb/83065/en-us/
)
Microsoft和/或其各供应商对于为任何目的而在本服务器上发布的文件及有关图形所含信息的适用性,不作任何声明。 所有该等文件及有关图形均"依样"提供,而不带任何性质的保证。Microsoft和/或其各供应商特此声明,对所有与该等信息有关的保证和条件不负任何责任,该等保证和条件包括关于适销性、符合特定用途、所有权和非侵权的所有默示保证和条件。在任何情况下,在由于使用或运行本服务器上的信息所引起的或与该等使用或运行有关的诉讼中,Microsoft和/或其各供应商就因丧失使用、数据或利润所导致的任何特别的、间接的、衍生性的损害或任何因使用而丧失所导致的之损害、数据或利润不负任何责任。 | 文章翻译 |





回到顶端








