Distributed access to DB2 for z/OS MONITORING...

19
6/2/10 1 MONITORING & TROUBLESHOOTING Distributed access to DB2 for z/OS © [email protected] Cristian Molaro Belgium 2010 DISCLAIMER PLEASE BE AWARE THAT THE ACTUAL PROGRAMMING TECHNIQUES, ALGORITHMS AND ALL NUMERICAL PARAMETERS USED IN EXAMPLES GIVEN IN THIS PRESENTATION ARE SUBJECT TO CHANGE AT SOME FUTURE DATE EITHER BY A NEW VERSION OF DB2, A NEW RELEASE, A SMALL PROGRAMMING ENHANCEMENT (SPE) OR A PROGRAMMING TEMPORARY FIX (PTF). THE INFORMATION CONTAINED IN THIS PRESENTATION HAS NOT BEEN SUBMITTED TO ANY FORMAL REVIEW AND IS DISTRIBUTED ON AN AS ISBASIS WITHOUT ANY WARRANTY EITHER EXPRESS OR IMPLIED. THE USE OF THIS INFORMATION OR THE IMPLEMENTATION OF ANY OF THESE TECHNIQUES IS A CUSTOMER RESPONSIBILITY AND DEPENDS ON THE CUSTOMERS ABILITY TO EVALUATE AND INTEGRATE THEM INTO THE CUSTOMERS OPERATIONAL ENVIRONMENT. WHILE EACH ITEM MAY HAVE BEEN REVIEWED FOR ACCURACY IN A SPECIFIC SITUATION, THERE IS NO GUARANTEE THAT THE SAME OR SIMILAR RESULTS WILL BE OBTAINED ELSEWHERE. CUSTOMERS ATTEMPTING TO ADAPT THESE TECHNIQUES TO THEIR OWN ENVIRONMENTS DO SO AT THEIR OWN RISK. DB2 IS A TRADEMARK OF INTERNATIONAL BUSINESS MACHINE CORPORATION. THIS PRESENTATION USES MANY TERMS THAT ARE TRADEMARKS. WHEREVER WE ARE AWARE OF TRADEMARKS THE NAME HAS BEEN SPELLED IN CAPITALS. 1 [email protected]

Transcript of Distributed access to DB2 for z/OS MONITORING...

Page 1: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

1

MONITORING & TROUBLESHOOTING

Distributed access to DB2 for z/OS

© [email protected]

Cristian Molaro Belgium 2010

DISCLAIMER PLEASE BE AWARE THAT THE ACTUAL PROGRAMMING TECHNIQUES, ALGORITHMS AND ALL NUMERICAL PARAMETERS USED IN EXAMPLES GIVEN IN THIS PRESENTATION ARE SUBJECT TO CHANGE AT SOME FUTURE DATE EITHER BY A NEW VERSION OF DB2, A NEW RELEASE, A SMALL PROGRAMMING ENHANCEMENT (SPE) OR A PROGRAMMING TEMPORARY FIX (PTF).

THE INFORMATION CONTAINED IN THIS PRESENTATION HAS NOT BEEN SUBMITTED TO ANY FORMAL REVIEW AND IS DISTRIBUTED ON AN “AS IS” BASIS WITHOUT ANY WARRANTY EITHER EXPRESS OR IMPLIED. THE USE OF THIS INFORMATION OR THE IMPLEMENTATION OF ANY OF THESE TECHNIQUES IS A CUSTOMER RESPONSIBILITY AND DEPENDS ON THE CUSTOMER’S ABILITY TO EVALUATE AND INTEGRATE THEM INTO THE CUSTOMER’S OPERATIONAL ENVIRONMENT. WHILE EACH ITEM MAY HAVE BEEN REVIEWED FOR ACCURACY IN A SPECIFIC SITUATION, THERE IS NO GUARANTEE THAT THE SAME OR SIMILAR RESULTS WILL BE OBTAINED ELSEWHERE. CUSTOMERS ATTEMPTING TO ADAPT THESE TECHNIQUES TO THEIR OWN ENVIRONMENTS DO SO AT THEIR OWN RISK.

DB2 IS A TRADEMARK OF INTERNATIONAL BUSINESS MACHINE CORPORATION. THIS PRESENTATION USES MANY TERMS THAT ARE TRADEMARKS. WHEREVER WE ARE AWARE OF TRADEMARKS THE NAME HAS BEEN SPELLED IN CAPITALS.

1 [email protected]

Page 2: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

2

Agenda

!  DRDA CONFIGURATIONS !  METHODOLOGY !  END TO END MONITORING !  TOOLS AND TECHNIQUES !  COMMON PROBLEMS !  SUMMARY AND CONCLUSIONS

2 [email protected]

Application -

Application Server

DB2 for z/OS

Distributed access to DB2 for z/OS

!  DRDA configuration example

!  The infrastructure can be very complex!

3 [email protected]

Gateway DB2 for z/OS Application

Application

Application

Page 3: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

3

Keep it simple

!  Avoid complex configurations –  Difficult problem determination –  Performance slows down –  Problems may result from the various clients/servers being at

different levels

!  Use direct connections when no added value on using DB2 Connect Server

!  Linux on z and Hipersockets –  Probably today’s best option for a DB2 Connect server

4 [email protected]

z/OS

DB2

Linux on z

DB2 Connect

Hipersockets

z/OS

DB2

z/OS

DB2

Analyze it simple

!  DRDA configurations can be complex !  Divide the analysis into 3 basic components:

–  The client –  The network –  The server

5 © [email protected]

Application Requester

(AR)

Application Application Server (AS)

DBMS (DB2)

Config. Config.

Page 4: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

4

Problem determination

!  Typical DRDA problem areas –  Connectivity –  Network –  Performance degradation –  Data conversion issues –  Abends

!  Eliminate non distributed elements as a root cause –  Application issues? –  User error?

!  Narrow scope –  The client? –  The network? –  The server?

© [email protected] 6

Problem determination: Survey

!  Have you experience in: –  DB2 for LUW troubleshooting & monitoring? –  DB2 for z/OS troubleshooting & monitoring? –  Network troubleshooting & monitoring? –  DB2 for z/OS + LUW troubleshooting & monitoring? –  DB2 for z/OS + LUW + Network troubleshooting &

monitoring…?

!  The challenge? To combine multi-disciplinary expertise in monitoring and problem determination

7 © [email protected]

Page 5: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

5

End to End Monitoring

!  Basic requirement: to identify the Response Time components

!  Application RT = (4 – 1) !  Time in DB2 = (3 – 2) !  Network

–  (2 - 1) + (4 – 3) if clocks in synch –  ((4 – 1 ) – (2 – 3)) if clocks not in synch

•  Averages Request and Response Network times 8 © [email protected]

Application DB2

1 2

3 4

Request

Response

db2 ping

!  Tests the network response time of the underlying connectivity between a client and a database server

!  Can simulate ≠ packages sizes (bytes) for REQUEST and RESPONSE

!  Requires to be connected to the target database –  For testing if you can reach the server, use the ping and/or the traceroute OS commands

C:\..\SQLLIB\BIN>db2 ping proddb request 100 response 32000 10 times

Elapsed time: 4256 microseconds Elapsed time: 4507 microseconds Elapsed time: 4240 microseconds Elapsed time: 5034 microseconds Elapsed time: 3998 microseconds Elapsed time: 4009 microseconds Elapsed time: 4030 microseconds Elapsed time: 4071 microseconds Elapsed time: 4096 microseconds Elapsed time: 4053 microseconds

© [email protected] 9

Page 6: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

6

Network protocol analyzers

10 [email protected]

!  Network time can be a major component of the End to End RT

!  Network analyzers can provide valuable information for problem determination and performance analysis

!  Can be hardware or software based

!  Wireshark –  Freeware network analyzer –  Supports and format the DRDA

protocol packages –  http://www.wireshark.org/

Getting distributed detailed information

!  Use DIAGLEVEL=4 at client side –  db2 update dbm cfg using diaglevel 4 –  Capture all possible diagnostic information written by DB2

!  Other settings –  DFT_MON_STMT=ON Start/stop time statements ids –  DFT_MON_UOW=ON Start/end times, completion status –  DB2CONNECT_IN_APP_PROCESS=NO monitor clients

local to DB2 Connect Server

2010-04-19-20.27.23.067176-300 I37477C302 LEVEL: Info PID : 2464 TID : 1778351024 PROC : BIBusTKServerMain INSTANCE: db2rtci1 NODE : 000 FUNCTION: DB2 UDB, DRDA Application Requester, sqljrParseSrvlst, probe:10 MESSAGE : Sysplex Workload Balancing is enabled. … FUNCTION: DB2 UDB, DRDA Application Requester, sqljrDumpTransportPool, probe:0 DATA #1 : <preformatted> DbName=DDWGCOG , TotTpts=1, InUse=0, InWait=0, Caller=1 , Conn=0x62ab5b00 Host=192.168.70.104, Port=7120, TotTpts=1, InUse=0 Weight=66, ratio=0.519685 Host=192.168.70.105, Port=7120, TotTpts=0, InUse=0 Weight=61, ratio=0.480315

[email protected] 11

Page 7: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

7

Traces available on distributed components

!  Tip: Get experience on collecting and analyzing distributed component traces

!  Refer to DB2 9 for z/OS: Distributed Functions SG24-6952 for more details and examples

Client / Driver Available traces

What the trace contains?

IBM Data Server Driver for JDBC and SQLJ (type 4)

JCC Trace JCC trace contains both JCC driver trace and DRDA trace only when TRACE_ALL is specified

IBM Data Server Driver for ODBC and CLI

CLI trace, db2trc, db2drdat

CLI trace contains the driver trace. db2trc contains db2 client side buffers and DRDA buffers. (db2drdat available from 9.5 FPack 4)

All other Data Server Clients, DB2 Connect, DB2 ESE and so forth

CLI trace, db2trc, db2drdat

CLI trace + db2trc + db2drdat. db2drdat contains only DRDA buffers.

12 [email protected]

JDBC traces

!  Records all function calls made by the DB2 JDBC drivers to a log file

!  Very useful for problem determination !  Warning:

–  May produce a huge amount of information –  Be careful with overhead when enabling

them in a production environment

!  Refer to Redbook SG24-6952 for activation procedure examples

!  WAS 6.1 : Data sources > SNAME > WebSphere Application Server data source properties > Connection pools > Custom properties > traceLevel

[email protected] 13

Page 8: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

8

JDBC trace example

!  DB2 JDBC/JCC Driver Versions –  http://www-01.ibm.com/support/docview.wss?

rs=71&uid=swg21363866

[jcc] BEGIN TRACE_DRIVER_CONFIGURATION [jcc] Driver: IBM DB2 JDBC Universal Driver Architecture 3.57.82 [jcc] Compatible JRE versions: { 1.4, 1.5, 1.6 } ..... [jcc] Using global properties: [jcc] os.name = Windows XP, system [jcc] os.arch = x86, system [jcc] Dumping all system properties: { ....., [jcc] Dumping all file properties: { } [jcc] END TRACE_DRIVER_CONFIGURATION ..... [jcc] BEGIN TRACE_CONNECTS [jcc] Attempting connection to svr1:3322/DB2PLOC [jcc] Using properties: { ..... traceLevel=-1,clientRerouteAlternateServerName=null, ..... } [jcc] END TRACE_CONNECTS [jcc][t4] [time:2010-05-30-09:51:20.146][thread:WebContainer : 4][tracepoint:315]creating a socket to svr1 at 10.50.1.30 [jcc] [t4][time:2010-05-30-09:51:20.146][thread:WebContainer : 4][tracepoint:1][Request.flush] [jcc][t4] SEND BUFFER: EXCSAT (ASCII) (EBCDIC) [jcc][t4] 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF 0123456789ABCDEF [jcc][t4] 0000 0098D04100010092 10410048115E8482 ...A.....A.H.^.. .q}....k.....;db [jcc][t4] 0010 F29183836D819797 93898381A3899695 ....m........... 2jcc_application .....

[email protected] 14

db2drdat - DRDA trace command

!  Capture the DRDA data stream exchanged between a client and the server

!  Most often used for problem determination… !  And it can provide great information for performance tuning

–  By determining how many sends and receives are required to execute an application

–  To confirm connection reuse, blocking is active, etc

C:\Program Files\IBM\SQLLIB\BIN>db2drdat on Trace is turned on

Test here

C:\Program Files\IBM\SQLLIB\BIN>db2drdat off Trace truncated : NO Trace wrapped : NO Total number of trace records : 40 Number of trace records formatted : 40 Trace is turned off

[email protected] 15

Page 9: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

9

db2drdat - DRDA trace command, example

!  Trace information is written in ./db2drdat.dmp by default

!  EXCSAT: exchange server attributes –  Is the first command that is sent from a requester to a server –  The AR communicates the minimum level of support that it

requires from the AS

!  EXCSATRD: exchange server attributes reply data –  00D300F2: indicates reply from an incompatible server

!  More info? DB2 Version 9.1 for z/OS: DDM command support

SEND BUFFER(AR): EXCSAT RQSDSS (ASCII) (EBCDIC) 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF 0123456789ABCDEF 0000 00CBD041000100C5 1041007F115E8482 ...A.....A...^.. ..}....E...".;db 0010 F282974B85A78540 4040404040404040 ...K...@@@@@@@@@ 2bp.exe ......

RECEIVE BUFFER(AR): EXCSATRD OBJDSS (ASCII) (EBCDIC) 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF 0123456789ABCDEF 0000 0069D04300010063 1443001F115EC4C2 .i.C...c.C...^.. ..}..........;DB 0060 5AC4E2D5F0F8F0F1 F5 Z........ ]DSN08015

[email protected] 16

DRDA levels

!  Communication will be done using the lowest DRDA level supported by the Clients / Server

!  Working with down-level clients? –  An old client will work but probably with a subset of the

DRDA capabilities of the DB2 server –  Clients and servers are supported independently

!  BUT: feedback from IBM DDF Level 2 Support area: –  Typical problem: distribution protocol errors or errors

with certain DDM code points –  Special register settings not taking effect after

connection reuse –  Many (sometimes undetermined) problems solved

after updating clients

!  Keep clients up to date 17 [email protected]

Page 10: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

10

Use INACTIVE threads

!  Enable inactive thread support –  CMSTAT=INACTIVE –  Allows DB2 for z/OS pooling:

•  Reduction on CPU utilization •  Reduction on Memory utilization

!  Allow DDF threads to become INACTIVE –  Avoid holding resources

•  WITH HOLD cursors not closed •  DTT not dropped •  Application using packages bound using KEEPDYNAMIC

–  Resources held across a COMMIT would prevent the connection and associated DB2 thread from being pooled

–  Origin of another common problem: idle thread timeout

18 [email protected]

DB2 for z/OS Timeouts

!  Example: a remote client connects to DB2, does some work, and then does not go inactive:

!  IDTHTOIN –  Time, in seconds, an active server thread remains idle before it

is cancelled –  Inactive connections are not subject to idle thread timeout –  In general, default works well

!  Client may receive SQL30081N which would indicate that the remote connection was terminated

19 © [email protected]

STC09109 DSNL027I _DBXP SERVER DISTRIBUTED AGENT WITH LUWID=GA65B414.PA09.1111C8065156=43494 THREAD-INFO=TOTO123:MACBOOK01:TOTO123:javaw.exe RECEIVED ABEND=04E FOR REASON=00D3003B

Page 11: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

11

Client timeouts

!  QueryTimeoutInterval is the client side equivalent of IDTHTOIN

!  The QueryTimeoutInterval value specifies the interval between checks for expired queries

!  Controls the timeouts of threads that are connected and active but not doing any work

!  Can be disabled by adding QueryTimeoutInterval =0 in the db2cli.ini file in the common section

!  Set to a value that is larger than SQL_ATTR_QUERY_TIMEOUT

20 © [email protected]

STC09109 DSNL511I _DBXP DSNLIENO TCP/IP CONVERSATION FAILED TO LOCATION 10.100.1.123 IPADDR=10.100.1.124 PORT=1248 SOCKET=RECV RETURN CODE=1121 REASON CODE=00000000

-DIS DDF

!   DT=I --> DDF configured with INACTIVE threads !   CONDBAT --> MAX REMOTE CONNECTED !   MDBAT --> MAX REMOTE ACTIVE !   ADBAT --> Current # of DBATs, active and disconnected !   QUEDBAT --> Count # times MDBAT was reached, only reset at restart !   INADBAT --> Current # of inactive DBATs, DISPLAY THREAD TYPE(INACTIVE) !   CONQUED --> Current # of queued connections !   DSCDBAT --> Current # of disconnected DBATs= DBAT pool threads !   INACONN --> Current # of inactive connections

DSNL080I -DB2P DSNLTDDF DISPLAY DDF REPORT FOLLOWS: DSNL081I STATUS=STARTD DSNL082I LOCATION LUNAME GENERICLU DSNL083I DB2P DB2P.LU1 -NONE DSNL084I TCPPORT=5136 SECPORT=5137 RESPORT=5138 IPNAME=-NONE DSNL085I IPADDR=::192.168.1.1 DSNL086I SQL DOMAIN=WWW.HELLOWORLD.BE DSNL090I DT=I CONDBAT= 1000 MDBAT= 200 DSNL092I ADBAT= 2 QUEDBAT= 0 INADBAT= 0 CONQUED= 0 DSNL093I DSCDBAT= 0 INACONN= 0 DSNL099I DSNLTDDF DISPLAY DDF REPORT COMPLETE ***

21 [email protected]

Page 12: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

12

DB2 for z/OS: Tracing distributed events

!  DB2 accounting records are created separately at the requester and each server

!  Events are recorded in the accounting record at the location where they occur

–  The Class 2 TCB time at the requester does not include processing time at the server

–  To get the Total TCB: ADD Class 2 time at the AR to the Class 2 time at the AS

–  Same for getpage, prefetch, locking and I/O counts

!  Important: –  Private protocol SQL activity is counted at both the

requester and server –  DRDA SQL activity is counted only at the server –  … but are not using PP anymore, right?

22 © [email protected]

DB2 Accounting for distributed workloads

!  DB2 writes an accounting record when a DDF thread: –  Ends –  Is made inactive –  Does not go inactive because using KEEPDYNAMIC(YES) –  Or a sign-on occurs for an RRSAF thread

!  This has the potential to create a huge amount of records !  zParm ACCUMACC controls whether and when DB2

accounting data is accumulated for DDF and RRSAF threads –  ACCUMACC=NO, default no effect –  ACCUMACC = n, n defines the accumulation interval

!  zParm ACCUMUID defines the aggregation criteria –  Value from 0 to 17 –  ACCUMUID=1 End user ID

23 [email protected]

Page 13: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

13

DDF Rollup

!  ACCUMAC and ACCUMUID can be changed dynamically !  Allows to get detailed accounting information if needed !  Change back to original value after problem reproduction

24 [email protected]

Distributed unit of work (DUOW)

!  DB2 Connect support multisite updates with two-phase commit

–  Updates data in multiple remote database servers with guaranteed integrity

–  Involves more than 1 database server

!  DUOW is available for applications developed using: –  Regular SQL –  TP monitors that implement the XA interface specification

•  IBM TxSeries CICS •  IBM Message and Queuing Series •  IBM Component Broker Series •  Microsoft Transaction Server (MTS) •  BEA Tuxedo and several others

25 [email protected]

Page 14: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

14

Distributed unit of work (DUOW)

!  A distributed transaction can update any mix of supported database servers within a single transaction

!  Supported by: –  DB2 for Linux, UNIX and Windows Version 8 or later –  DB2 for z/OS Version 7 or later –  DB2 for IBM i

!  Exploits two-phase commit technology centrally controlled by a coordinator

–  DB2 or TP monitor

!  DUOW problem determination can be a challenge! !  Scenario:

–  DUOW involving DB2 for z/OS as one of the participants –  Timeouts in DB2 for z/OS

26 [email protected]

Problem analysis

!  Isolated problem with big business impact !  System was not under stress !  No indication of z/OS issues !  Extract of DB2 MSTR address space

!  Holder LUW-ID = GA647214.F72A.C5BAAC83BE46

DSNT376I _DBP1 PLAN=DISTSERV WITH CORRELATION-ID=db2jcc_appli CONNECTION-ID=SERVER LUW-ID=GA647215.O622.C5BAAC8177FD=72267 THREAD-INFO=USERID1:wassrv01:USERID1:db2jcc_application IS TIMED OUT. ONE HOLDER OF THE RESOURCE IS PLAN=DISTSERV WITH CORRELATION-ID=db2jcc_appli CONNECTION-ID=SERVER LUW-ID=GA647214.F72A.C5BAAC83BE46=111082 THREAD-INFO=USERID2:wassrv03:USERID2:db2jcc_application ON MEMBER DBP2

27 [email protected]

Page 15: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

15

Problem resolution

!  Analysis using DSN1LOGP –  DSN1LOGP allows to specify 1 to 10 LUW-IDs to include

information in a summary report

!  Commit takes too long! ≈ 27 seconds !  Typical values in this environment

–  DUOW 0,03 secs / two-phase commit –  BATCH 0,005 secs / two-phase commit (RRS)

!   LSRN to TS: SELECT TIMESTAMP(X'C5BAAC83C4C7’||X'0000') FROM SYSIBM.SYSDUMMY1;

URID(135137F4CC22) LRSN(C5BAAC83C4C7) --> 2010-05-25-06.53.02.490736 TYPE(UR CONTROL) SUBTYPE(BEGIN UR)

======================> Execution of Updates <======================

URID(135137F4CC22) LRSN(C5BAAC83CDA1) --> 2010-05-25-06.53.02.526992 TYPE(UR CONTROL) SUBTYPE(BEGIN COMMIT1) ……… URID(135137F4CC22) LRSN(C5BAAC9D5CA6) --> 2010-05-25-06.53.29.327200 TYPE(UR CONTROL) SUBTYPE(END COMMIT2)

28 [email protected]

WLM: client set info

!  DB2 server systems allow requester systems to influence certain accounting and monitoring information using the EXCSQLSET command

!  DB2 server systems have implemented the concepts of: –  End user IDs –  End user workstation names –  End user application names –  Accounting data

!  Much of this information is externalized in various forms: –  The DSNV437I message of the DISPLAY THREAD command –  THREAD-INFO data in various messages such as DSNT375I –  The QWHC trace record correlation header –  The QMDA section of DB2 accounting trace records

29 [email protected]

Page 16: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

16

How to identify a client?

!  Method depends on API used: –  CLI –  C program –  Java program –  WebShpere Application Server

!  APAR PK74330: –  Stored procedure SYSPROC.WLM_SET_CLIENT_INFO –  Allows a DB2 for z/OS AR to set client information associated

with the current connection at the DB2 for z/OS server –  Changes the following DB2 for z/OS client special registers

•  CURRENT CLIENT_ACCTNG •  CURRENT CLIENT_USERID •  CURRENT CLIENT_WRKSTNNAME •  CURRENT CLIENT_APPLNAME

30 [email protected]

How to identify an ODBC client?

!  Special registers cannot be set through SQL

!  Information can be used by WLM classification identifier AI position ≥ 56

!  Exposed in RMF report Enclave Classification Data

DSNL027I -PRD1 SERVER DISTRIBUTED AGENT WITH 778 LUWID=C9DE5919.F7D7.C5C2D6F15029=636 THREAD-INFO=CRIS:TotoMac:Toto:TestFromMac:*:*:* RECEIVED ABEND=04E FOR REASON=00D3003B DSNL028I -PRD1 C9DE5919.F7D7.C5C2D6F15029=636 779 ACCESSING DATA FOR LOCATION ::10.50.1.12 IPADDR ::10.50.1.12

31 [email protected]

Page 17: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

17

SUMMARY

32 [email protected]

Agenda

!  DRDA CONFIGURATIONS !  METHODOLOGY !  END TO END MONITORING !  TOOLS AND TECHNIQUES !  COMMON PROBLEMS !  SUMMARY AND CONCLUSIONS

33 [email protected]

Page 18: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

18

QUESTIONS?

34 [email protected]

CRISTIAN MOLARO [email protected]

THANKS!

CRISTIAN MOLARO [email protected]

Page 19: Distributed access to DB2 for z/OS MONITORING ...dugi.molaro.be/wp-content/uploads/2010/06/June2010_CMolaro_Mo… · Use direct connections when no added value on using DB2 Connect

6/2/10

19

IDUG EUROPE 2010

!  Registration Now Available –  http://www.idug.org/idug-europe/index.html

!  Threads –  DB2 10 for z/OS –  DB2 for z/OS Lessons Learned –  DB2 9.7 for LUW in Depth –  DB2 for LUW Lessons Learned –  SQL & XML –  DB2 Performance

!  5 One Day Seminars !  Experts panel + Special Interest Groups and more

36 © [email protected]

IDUG EUROPE 2010

!  The Belgian speakers this year –  Davy Goethals –  Kurt Struyf –  Frédéric Bothy –  Cristian Molaro

!  Check www.idug.org for cost Saving Opportunities –  Early Bird Discount –  Multiple Delegate Discount –  Mentor program

!  Questions or more information? !  http://www.idug.org/idug-europe/index.html !  Offline

37 © [email protected]