剖析SQLSERVER2005的页面结构--表修改的内部处理篇

php中文网
发布: 2016-06-07 15:51:46
原创
1290人浏览过

------------------------------------------------------------------ -- Author : HappyFlyStone -- Date : 2009-12-01 22 : 00 : 00 -- Version: Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86) -- Apr 14 2006 01:12:25 -- Copyright (c) 1988

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

-- Author : HappyFlyStone

-- Date   : 2009-12-01 220000

-- 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 table altertb(id int identity(1,1),col char(100),int_col int)

go

insert into altertb

select REPLICATE('a',5),1 union all

select REPLICATE('b',5),2

go

alter table altertb

alter column col char(200) --

go

alter table altertb

alter column int_col tinyint –- 两个alter column 可同时执行

go

insert into altertb select 'cccc',3 –-观察新增加记录页面情况

go

dbcc ind(testcsdn,altertb,-1)--237

dbcc traceon(3604)

dbcc page(testcsdn,1,237,1)

 

drop table altertb

/*

DATA:

Slot 0, Offset 0x60, Length 115, DumpStyle BYTE

Record Type = PRIMARY_RECORD         Record Attributes =  NULL_BITMAP

Memory Dump @0x4343C060

00000000:   10007000 01000000 61616161 61202020 †..p.....aaaaa  

00000010:   20202020 20202020 20202020 20202020 †                  

00000020:   20202020 20202020 20202020 20202020 †                    

00000030:   20202020 20202020 20202020 20202020 †                   

00000040:   20202020 20202020 20202020 20202020 †                  

00000050:   20202020 20202020 20202020 20202020 †                    

00000060:   20202020 20202020 20202020 01000000 †            ....   

00000070:   0300f8†††††††††††††††††††††††††††††††...  

 

alter table altertb alter column col char(200) --

Getfloorplan
Getfloorplan

创建 2D、3D 平面图和 360° 虚拟游览,普通房间变成梦想之家

Getfloorplan 148
查看详情 Getfloorplan

go

alter table altertb alter column int_col tinyint --

go

 

Slot 0, Offset 0x146, Length 315, DumpStyle BYTE

Record Type = PRIMARY_RECORD         Record Attributes =  NULL_BITMAP

Memory Dump @0x438DC146

00000000:   10003801 01000000 61616161 61202020 †..8.....aaaaa

00000010:   20202020 20202020 20202020 20202020 †               

00000020:   20202020 20202020 20202020 20202020 †                 

00000030:   20202020 20202020 20202020 20202020 †                 

00000040:   20202020 20202020 20202020 20202020 †                 

00000050:   20202020 20202020 20202020 20202020 †                 

00000060:   20202020 20202020 20202020 01000000 †            ....

00000070:   61616161 61202020 20202020 20202020 †aaaaa            

00000080:   20202020 20202020 20202020 20202020 †                  

00000090:   20202020 20202020 20202020 20202020 †                 

......                    

00000120:   20202020 20202020 20202020 20202020 †                 

00000130:   20202020 20202020 0400f0†††††††††††††        ...

 

            

insert into altertb select 'cccc',3

go

 

Slot 2, Offset 0x3bc, Length 315, DumpStyle BYTE

Record Type = PRIMARY_RECORD         Record Attributes =  NULL_BITMAP

Memory Dump @0x4343C3BC

00000000:   10003801 03000000 00000000 00ac0100 †..8.............

00000010:   0001001a 000300f8 16171900 0001e08d †................

00000020:   05000000 0000ac01 00000100 1b000300 †................ 

00000030:   f8161819 00000104 43040000 000000ac †........C.......

00000040:   01000001 001c0003 00f81619 19000001 †................ 

00000050:   20300500 00000000 ac010000 01001d00 † 0.............. 

00000060:   0300f816 1a190000 0144a705 03000000 †.........D......   

00000070:   63636363 20202020 20202020 20202020 †cccc                

00000080:   20202020 20202020 20202020 20202020 †                 

......   

00000120:   20202020 20202020 20202020 20202020 †                 

00000130:   20202020 20202020 0400f2†††††††††††††        ...

*/

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号