C:Documents and Settingsadministrator>db2 "create table test_log(col int, col2 char(10)
,col3 timestamp,col4 varchar(100),col5 varchar(100),col6 varchar(100),col7 varch
ar(100),col8 varchar(100))"
C:Documents and Settingsadministrator>db2 -td@ -vf proc_testlog.sql
create procedure proc_testlog(v1 int)
begin
declare time int default 0;
while (time < v1)
do
insert into test_log values(1,'testlog',current timestamp,'testlogtestlogte
stlogtestlogtestlogtestlogtestlogtestlogtestlogtestlogtestlogtestlogtestlogtestl
og','testlogtestlogtestlogtestlogtestlogtestlogtestlogtestlogtestlogtestlogtestl
ogtestlogtestlogtestlog','testlogtestlogtestlogtestlogtestlogtestlogtestlogtestl
ogtestlogtestlogtestlogtestlogtestlogtestlog','testlogtestlogtestlogtestlogtestl
ogtestlogtestlogtestlogtestlogtestlogtestlogtestlogtestlogtestlog','testlogtestl
ogtestlogtestlogtestlogtestlogtestlogtestlogtestlogtestlogtestlogtestlogtestlogt
estlog');
set time = time + 1;
end while;
end
C:Documents and Settingsadministrator>db2pd -db sample -transactions
Database Partition 0 -- Database SAMPLE -- Active -- Up 0 days 00:29:20
Transactions:
Address AppHandl [nod-index] TranHdl Locks State Tflag Tflag2
Firstlsn Lastlsn LogSpace SpaceReserved TID
AxRegCnt GXID
0x7FC21A80 7 [000-00007] 2 7 WRITE 0x00000000 0x00000
000 0x000027718800 0x000027718800 110 700 0x000000004F13
1 0
C:Documents and Settingsadministrator>db2pd -db sample -transactions
Database Partition 0 -- Database SAMPLE -- Active -- Up 0 days 00:45:55
Transactions:
Address AppHandl [nod-index] TranHdl Locks State Tflag Tflag2
Firstlsn Lastlsn LogSpace SpaceReserved TID
AxRegCnt GXID
0x7FC21A80 7 [000-00007] 2 8 WRITE 0x00000000 0x00000
000 0x000028E385B8 0x000028E38806 154 1334 0x000000004F57
1 0
C:Documents and Settingsadministrator>db2pd -db sample -transactions
Database Partition 0 -- Database SAMPLE -- Active -- Up 0 days 00:02:27
Transactions:
Address AppHandl [nod-index] TranHdl Locks State Tflag Tflag2
Firstlsn Lastlsn LogSpace SpaceReserved TID
AxRegCnt GXID
…..
0x7FC21A80 7 [000-00007] 2 10 WRITE 0x00000000 0x00000
000 0x00003D86000C 0x000048C4FCD0 14014572 201955470 0x000000004F91
1 0
…..
C:Documents and Settingsadministrator>db2pd -db sample -applications
Database Partition 0 -- Database SAMPLE -- Active -- Up 0 days 00:02:36
Applications:
Address AppHandl [nod-index] NumAgents CoorEDUID Status C-
AnchID C-StmtUID L-AnchID L-StmtUID Appid
WorkloadID WorkloadOccID
…..
0x7AED8080 7 [000-00007] 1 1572 UOW-Waiting 0
0 185 1 *LOCAL.DB2.081111100729
1 1
…..
db2pd -db sample -dynamic
…..
Dynamic SQL Statements:
Address AnchID StmtUID NumEnv NumVar NumRef NumExe Text
0x7EA7D540 185 1 1 1 1 1 CALL proc_testlog(?)
…
C:Documents and Settingsadministrator>db2pd -db sample -transactions
Database Partition 0 -- Database SAMPLE -- Active -- Up 0 days 00:10:12
Transactions:
Address AppHandl [nod-index] TranHdl Locks State Tflag Tflag2
Firstlsn Lastlsn LogSpace SpaceReserved TID
AxRegCnt GXID
0x7FC21A80 12 [000-00012] 2 7 READ 0x00000000 0x00000
000 0x000000000000 0x000000000000 0 0 0x0000000053A9
1 0
0x7FC22780 13 [000-00013] 3 0 READ 0x00000000 0x00000
000 0x000000000000 0x000000000000 0 0 0x00000000538F
1 0
0x7FC23480 14 [000-00014] 4 0 READ 0x00000000 0x00000
000 0x000000000000 0x000000000000 0 0 0x0000000053BE
1 0
0x7FC24180 15 [000-00015] 5 0 READ 0x00000000 0x00000
000 0x000000000000 0x000000000000 0 0 0x000000005391
1 0
0x7FC24E80 16 [000-00016] 6 0 READ 0x00000000 0x00000
000 0x000000000000 0x000000000000 0 0 0x000000005394
1 0
0x7FC25B80 17 [000-00017] 7 4 WRITE 0x00000000 0x00000
000 0x0000538A93B7 0x0000538A9455 184 408 0x00000000539A
C:Documents and Settingsadministrator>db2pd -db sample -logs
Database Partition 0 -- Database SAMPLE -- Active -- Up 0 days 00:12:34
Logs:
Current Log Number 4
Pages Written 9498
Method 1 Archive Status n/a
Method 1 Next Log to Archive n/a
Method 1 First Failure n/a
Method 2 Archive Status n/a
Method 2 Next Log to Archive n/a
Method 2 First Failure n/a
Address StartLSN State Size Pages Filename
0x7FBECBD4 0x0000537F0000 0x00000000 10000 10000 S0000000.LOG
0x7FBECC74 0x000055F00000 0x00000000 10000 10000 S0000001.LOG
0x7FBECD14 0x000058610000 0x00000000 10000 10000 S0000002.LOG
0x7EABB2F4 0x00005AD20000 0x00000000 10000 10000 S0000003.LOG
0x7EABB394 0x00005D430000 0x00000000 10000 10000 S0000004.LOG