블로그 이미지
010-9967-0955 보미아빠

카테고리

보미아빠, 석이 (500)
밥벌이 (16)
싸이클 (1)
일상 (1)
Total
Today
Yesterday

달력

« » 2024.5
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

공지사항

최근에 올라온 글

lock 의 이해

카테고리 없음 / 2013. 3. 4. 23:38

http://support.microsoft.com/kb/224453

 

 

begin tran a1111

이라고 적고 시작하면 나중에 로그 깔때 편함~

 


--tran의 최초 시작자 짐작
select transaction_id, *  from sys.dm_tran_active_transactions where transaction_type <> 2
--1593679

--정보확인
--select * from sys.dm_tran_locks where request_owner_id = 1593679

--로그레코드 확인
select database_transaction_begin_lsn, * from sys.dm_tran_database_transactions where transaction_id = 1593679
729000000293200001

729 0000002932 00001 =10진수
8char 8char 4char 로 변환 binary
'000002D9:00000B74:0001'

729 0000002944 00007
000002D9:00000b80:0007

729 0000002944 00011
000002D9:00000b80:000b
rowlog contents 0 = 이전값
rowlog contents 1 = 이후값

0x0101000C0000782E501500000102000402030004
0x3000140001000000E10CF400EA9D00002A000000050000020028003700446F6E2774205061

select top 10 * from fn_dblog(null, null) where [Current LSN] >= '000002D9:00000B74:0001'
description 에 transaction 이름 나옴 a1111;0x010500000000000515000000c64261d7fedf1e8e80857abae8030000

 

select * from sys.dm_tran_database_transactions where transaction_id =
1580558

database_transaction_begin_lsn

729000000293200001

2d9:00000B74:0001

729
0000002932
00001

select * from dbo.dm_tran_session_transactions_20130305_064712

 

So 0000009d:0000021e:0001 becomes '157' + '0000000542' + '00001' = '157000000054200001'.

select top 10 * from fn_dblog(null, null) where [Current LSN] >= '000002D9:00000B74:0001'
0x0101000C0000782E501500000102000402030004

 

Posted by 보미아빠
, |

최근에 달린 댓글

최근에 받은 트랙백

글 보관함