본문 바로가기

운영/데이터베이스

테이블을 구성하는 Page 정보 확인하기

728x90

www.mssqltips.com/sqlservertip/1578/using-dbcc-page-to-examine-sql-server-table-and-index-data/

 

Using DBCC PAGE to Examine SQL Server Table and Index Data

I've read a lot of articles that talk about database pages and how they're used to store table data and index data. Is there some way I can actually look at this information?

www.mssqltips.com

MS SQL의 데이터 저장에 대한 기본 개념

MS SQL 물리적인 구성

hackersstudy.tistory.com/61

 

[ MSSQL ] Page와 Extend

Page : SQL Server의 기본 저장(I/O) 단위 Extent : 공간 관리의 기본 단위 위 그림과 같이 데이터베이스의 데이터파일(mdf,ndf)에 할당되는 디스크 공간은 Page로 나뉘어지며 Extent는 8개의 Page로 구성한다...

hackersstudy.tistory.com

 

DBCC TRACEON 구문을 이용하여 TRACE를 활성화 한다.

DBCC TRACEON(3604)

 

DBCC IND와 DBCC PAGE 구문을 이용하여 테이블의 Page 정보를 확인합니다.

DBCC IND
(
['database name'|database id], -- the database to use
table name, -- the table name to list results
index id, -- an index_id from sys.indexes; -1 shows all indexes and IAMs, -2 just show IAMs
)
DBCC PAGE
(
['database name'|database id], -- can be the actual name or id of the database
file number, -- the file number where the page is found
page number, -- the page number within the file
print option = [0|1|2|3] -- display option; each option provides differing levels of information
)

 

실제 사용되는 데이터베이스의 정보입니다.

 

특정 페이지에 대한 상세 정보입니다.

 

해당 테이블 & 인덱스에 대한 조각화 정보를 볼 수 있습니다.

감사합니다.

728x90