34,590
社区成员
发帖
与我相关
我的任务
分享
create table testtb(id int identity(1,1),col char(985))
go
insert into testtb
select REPLICATE('a',5) union all
select REPLICATE('b',5) union all
select REPLICATE('c',5) union all
select REPLICATE('d',5) union all
select REPLICATE('e',5) union all
select REPLICATE('f',5) union all
select REPLICATE('g',5) union all
select REPLICATE('h',5) union all
select REPLICATE('i',985) union all
select REPLICATE('j',985)
go
alter table testtb
alter column col char(1000) --
go
dbcc ind(testcsdn,testtb,-1)--220 221 232
dbcc traceon(3604)
dbcc page(testcsdn,1,220,1)
/*
DATA:
Slot 0, Offset 0x60, Length 9, DumpStyle BYTE
Record Type = FORWARDING_STUB Record Attributes =
Memory Dump @0x4431C060
0000000: 04dd0000 00010002 00†††††††††††††††††.........
Slot 1, Offset 0x69, Length 1996, DumpStyle BYTE
Record Type = PRIMARY_RECORD Record Attributes = NULL_BITMAP
Memory Dump @0x4431C069
......
Slot 2, Offset 0x835, Length 9, DumpStyle BYTE
Record Type = FORWARDING_STUB Record Attributes =
Memory Dump @0x4431C835
......
000007C0: 20202020 20202020 200300f8 †††††††††† ...
DBCC 执行完毕。如果DBCC 输出了错误信息,请与系统管理员联系。
*/
dbcc page(testcsdn,1,221,1)
/*
PAGE: (1:221)
DATA:
Slot 0, Offset 0x1014, Length 1996, DumpStyle BYTE
Record Type = PRIMARY_RECORD Record Attributes = NULL_BITMAP
Memory Dump @0x3432D014
00000000: 1000c907 09000000 69696969 69696969 †.......iiiiiiii
......
......
Slot 2, Offset 0x60, Length 2010, DumpStyle BYTE
Record Type = FORWARDED_RECORD Record Attributes = NULL_BITMAP VARIABLE_COLUMNS
Memory Dump @0x3432C060
00000000: 3200c907 01000000 61616161 61202020 †.......aaaaa
*/
---------------------------------------------------------------------
-- Author : HappyFlyStone
-- Date : 2009-11-30
-- Version: Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86)
-- Apr 14 2006 01:12:25
-- Copyright (c) 1988-2005 Microsoft Corporation
-- Enterprise Edition on Windows NT 5.2 (Build 3790: SP2)
-- 转载注明出处及相关信息
---------------------------------------------------------------------
CREATE PROC sp_us_FPSinfo
@FORWARDING_STUB BINARY(8)
AS
SELECT
CAST(
CONVERT(INT,SUBSTRING(@FORWARDING_STUB,6,1)) * POWER(2,8)
+ CONVERT(INT,SUBSTRING(@FORWARDING_STUB,5,1))
AS VARCHAR)+' : ' --File_num
+CAST(
(CONVERT(INT,SUBSTRING(@FORWARDING_STUB,4,1)) * POWER(2,24))
+ (CONVERT(INT,SUBSTRING(@FORWARDING_STUB,3,1)) * POWER(2,16))
+ (CONVERT(INT,SUBSTRING(@FORWARDING_STUB,2,1)) * POWER(2,8 ))
+ (CONVERT(INT,SUBSTRING(@FORWARDING_STUB,1,1))) AS VARCHAR)
+' : ' --Page_id
+CAST(CAST(SUBSTRING(@FORWARDING_STUB,8,1) * POWER(2,8 ) +
+ SUBSTRING(@FORWARDING_STUB,7,1) AS INT ) AS VARCHAR)
AS 'FILE_NUM:PAGE_ID:SLOT_ID'
GO
EXEC sp_us_FPSinfo 0xDD00000001000200 --
DROP PROC sp_us_FPSinfo
/*
FILE_NUM:PAGE_ID:SLOT
--------------------------
1 : 221 : 2
(1 行受影响)
*/