'SQL'에 해당되는 글 2건

  1. DirtyPage DMV
  2. 쥑이는 SCRIPT

DirtyPage DMV

Bufferpool 영역에서 dirty page 정보를 확인할 수 있는 DMV.

SET NOCOUNT ON;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;

-- http://www.sqlskills.com/BLOGS/PAUL/post/Inside-the-Storage-Engine-Whats-in-the-buffer-pool.aspx

select sysObj.name,
(CASE WHEN ([is_modified] = 1) THEN 'Dirty' ELSE 'Clean' END) AS 'Page State',
* 
from sys.dm_os_buffer_descriptors bufferDescriptors
INNER JOIN sys.allocation_units AllocUnits ON bufferDescriptors.allocation_unit_id = AllocUnits.allocation_unit_id
INNER JOIN sys.partitions Partitions ON AllocUnits.container_id = Partitions.hobt_id
INNER JOIN sys.objects sysObj ON Partitions.object_id = sysObj.object_id
WHERE bufferDescriptors.database_id = DB_ID()
AND sysObj.is_ms_shipped = 0		-- ##. 개체가 내부 SQL Server 구성 요소로 만들어집니다.
go	


'Transact-SQL' 카테고리의 다른 글

Suspect page 검사하기  (0) 2012.11.15
SQL Dump 파일 확인  (1) 2012.10.18
relog 사용 방법  (0) 2012.09.28
UPDLOCK  (0) 2012.09.20
group by 빨리 처리하기  (0) 2012.09.11

쥑이는 SCRIPT

DBA에게 필수!! 설치 이후 설정 및 기능 확인하는 경우가 많은데 이런 Script를 Amit Banerjee라는 분이 공유하셨네요. 이것을 응용해서 이런 저런거 만들어 놔야징.ㅋㅋ


■ SQL Feature Discovery Script

http://troubleshootingsql.com/2012/06/27/sql-feature-discovery-script/


■ Initial Data Collection Script

http://troubleshootingsql.com/2010/01/21/initial-data-collection-script/



'Transact-SQL' 카테고리의 다른 글

How to Recycle SQL Server error logs – 5 Types of logs  (1) 2012.09.03
ORIGINAL_LOGIN() 와 SUSER_SNAME() 차이  (0) 2012.07.30
sp_configure 마지막 변경일  (0) 2012.05.15
SQLServer365 A Script A Day  (0) 2012.05.12
최신 진단쿼리  (0) 2012.05.08