db2 10 for z/os profiles overview: “the new zparms”jul 11, 2012  · profile support, introduced...

61
© 2012 IBM Corporation Houston, TX July 11, 2012 Mark Rader IBM Advanced Technical Skills (ATS) DB2 for z/OS [email protected] DB2 10 for z/OS Profiles Overview: “The New ZPARMs”

Upload: others

Post on 06-Apr-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

© 2012 IBM Corporation

Houston, TX

July 11, 2012

Mark Rader

IBM Advanced Technical Skills (ATS)DB2 for z/OS

[email protected]

DB2 10 for z/OS Profiles Overview:“The New ZPARMs ”

Page 2: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation2

Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS

� “A profile is a set of criteria that identifies a particular context on a DB2® subsystem.” For example: threads, connections, or SQL statements that have particular attributes.

� Profiles allow you to:

– #1 Monitor remote threads and connections (TCP/IP) – DB2 10

– #2 Set or disable optimization parameters for SQL statements

– #3 Model your test “system” environment after production

– #4 Manage copies of SQL access paths – DB2 10

– #5 Set thresholds for Query Acceleration – IDAA

Page 3: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation3

Profile Documentation

� For specific and complete information please refer to DB2 10 for z/OS Managing Performance SC19-2978-05, either from the Publication Center:– http://www.ibm.com/e-

business/linkweb/publications/servlet/pbi.wss?SSN=12GFM0015428749677&FNC=

PBL&PBL=SC19-2978-05

– Or the DB2 10 for z/OS Information Center:

– http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.db2z10.doc%2Fsrc%2Falltoc%2Fdb2z_10_prodhome.htm

Page 4: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation4

Profile Tables

� There are four PROFILE tables:

– SYSIBM.DSN_PROFILE_TABLE– SYSIBM.DSN_PROFILE_HISTORY– SYSIBM.DSN_PROFILE_ATTRIBUTES– SYSIBM.DSN_PROFILE_ATTRIBUTES_HISTORY

� DSNTIJSG creates the profile tables and three supporting indices:

• SYSIBM.DSN_PROFILE_TABLE_IX_ALL• SYSIBM.DSN_PROFILE_TABLE_IX2_ALL• SYSIBM.DSN_PROFILE_ATTRIBUTES_IX_ALL

Page 5: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation5

Profile Scope, Context and Action

� SYSIBM.DSN_PROFILE_TABLE

– Defines profile and filtering (e.g. LOCATION, PRDID, AUTHID, etc.)

– Only certain combinations are allowed

– The PROFILE_ENABLED column indicates whether DB2 activates the profile when you start monitoring

� SYSIBM.DSN_PROFILE_ATTRIBUTES table

– Defines attributes (e.g. MONITOR CONNECTIONS, MONITOR THREADS, MONITOR IDLE THREADS, etc.)

– One or more attributes rows are required

– Attribute rows control the actions that DB2 applies

Page 6: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation6

PROFILE_TABLE Filtering Criteria

� Specific filtering determined by PROFILE_TABLE colu mn combinations in conjunction with KEYWORDS specified in the PROFILE_ ATTRIBUTES table

� IP address or domain name– LOCATION column

� Authorization identifier and IP address

– AUTHID and LOCATION columns� Plan name, collection identifier, and package name

– PLANNAME, COLLID, and PKGNAME columns� Role or Authorization identifier

– ROLE and/or AUTHID columns� Collection identifier and/or package name

– COLLID and/or PKGNAME columns� Location name, or location alias

– LOCATION column� Client application name, user ID, or workstation ID

– CLIENT_APPLNAME, CLIENT_USERID or CLIENT_WRKSTNNAME column

Page 7: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation7

#1: Monitor Remote Threads and Connections

� You can monitor threads and connections for remote TCP/IP access to DB2 10 for z/Os servers

– Analyze the use of system resources by particular clients, applications, and users

– Protect resources accordingly

Page 8: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation8

#1: Threads and Connections – System Level Resources

� Value of the MAXDBAT subsystem parameter specifies the maximum number of database access threads (DBATs) that are allowed to beconcurrently active. – 0 to 19999– Default 200

� The CONDBAT subsystem parameter sets the maximum nu mber of concurrent inbound DDF connections that are to be a llowed. – 0 to 150000– Default 10000– CONDBAT must be greater than or equal to MAXDBAT

� IDTHTOIN subsystem parameter controls the amount of time, in seconds, that an active server thread is to be allo wed to remain idle. – Timeout value; thread is canceled after the timeout value expires, and its locks and cursors are

released– 0 to 9999– Default 120

Page 9: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation9

#1: Threads and Connections – Customer Impact� A single subsystem value means resources cannot

be allocated by business area or priority– Vice President’s request for connection or thread is equal to summer

intern’s request

– Numerous low priority threads can reduce access for high priority threads

� Customers may be forced to use other means to prioritize or manage thread and connection requests – E.g. DB2 Connect Server Gateways

� Single idle thread timeout may not reflect behavior of all application threads – E.g. entire subsystem may disable idle thread timeout because a single

application cannot tolerate an idle thread timeout

Page 10: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation10

#1: Threads and Connections – System Level Resources KEYWORDS

� MONITOR CONNECTIONS (CONDBAT)– Total number of remote connections from TCP/IP requesters, including current

active connections and inactive connections

– Filtering on LOCATION column only: IP Address or Domain Name

� MONITOR THREADS (MAXDBAT)– Total number of concurrent active remote threads that use TCP/IP on the DB2

subsystem.

– Filtering on one of:• LOCATION column (IP address, domain name, location or location alias), or• PRDID, or• ROLE and/or AUTHID, or • COLLID and/or PKGNAME or• One of CLIENT_APPLNAME, CLIENT_USERID, or CLIENT_WORKSTNNAME

� MONITOR IDLE THREADS (IDTHTOIN)– Approximate time (in seconds) that an active server thread is allowed to remain idle. – A zero value means that matching threads are allowed to remain idle indefinitely.

– Same filtering as Monitor Threads

Page 11: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation11

#1: Threads and Connections – Define Monitoring

� Create a profile by inserting rows in the DSN_PROFILE_TABLE.

– You must specify one of the valid combinations of filtering criteria for monitoring system activities

� Specify monitoring function by inserting rows into the DSN_PROFILE_ATTRIBUTES

– Specify a value for the KEYWORDS column

• MONITOR THREADS– Must be less than or equal to MAXDBAT

• MONITOR CONNECTIONS – Must be less than or equal to CONDBAT

• MONITOR IDLE THREADS– It is not limited to IDTHTOIN

Page 12: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation12

#1: Monitor Threads and Connections Attributes –System Level Resources

� DSN_PROFILE_ATTRIBUTES Continued

– ATTRIBUTE1 column specifies how DB2 responds when a threshold ismet.

• Action Taken:

– WARNING - A console message is issued at most every five minutes. – EXCEPTION - If profile threshold is exceeded, DB2 takes action (the

connection rejected, or thread queued, or thread canceled). • Messaging:

– DIAGLEVEL1 (default) with minimal information

– DIAGLEVEL2 includes PROFILEID and reason code• For Example WARNING_DIAGLEVEL1

– ATTRIBUTE2 column of DSN_PROFILE_ATTRIBUTES table specifies the threshold

Page 13: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation13

#1: Profile and Attributes Tables: Simplified Example

Y22TEST.SVL.IBM.COM

Y21JCC03570

Y20Tom

PROFILE_

ENABLED

PROFILEIDPKGNAMECOLLIDPRDIDLOCATIONAUTHIDROLE

SYSIBM.DSN_PROFILE_TABLE

2011-12-19…180WARNINGMONITOR IDLE THREADS

21

2011-12-21…20EXCEPTIONMONITOR THREADS

22

2011-12-19…45EXCEPTIONMONITOR CONNECTIONS

22

2011-12-19...10EXCEPTIONMONITOR THREADS

20

Attribute TimestampAttribute3Attribute2Attribute1KeywordsProfileID

SYSIBM.DSN_PROFILE_ATTRIBUTES

Page 14: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation14

#1: Defining Profiles: Filtering CriteriaClient IP address or client domain name

1. Client IP address or domain name (defined in LOCATION column)

Client Product ID2. Client Product ID (defined in PRDID column)

Role name, Authorization ID3. Role name + Authorization ID (defined in ROLE and AUTHID

columns)

4. Role name (defined in ROLE column)

5. Authorization ID (defined in AUTHID column)

Collection ID, Package name6. Collection ID + Package name (defined in COLLID and

PKGNAME columns)

7. Collection ID (defined in COLLID column)

8. Package name (defined in PKGNAME column)

Page 15: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation15

#1: Defining Profiles: Filtering Criteria, cont.

Location name or Location alias9. Server location name or server location alias that Client tries

to connect to (defined in LOCATION column)

Client Application Name *10. End Client Application name (defined in

CLIENT_APPLNAME column)

Client User ID *11. End Client User ID (defined in CLIENT_USERID column)

Client Workstation Name *12. End Client workstation name (defined in

CLIENT_WRKSTNNAME column)

Page 16: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation16

#1. Defining Profiles: Column Details

� LOCATION column accepts three formats

– IP address : IPv4 dotted-decimal (e.g. 9.1.2.3) or IPv6 colon-hex format (e.g. 2001:DB8::8:800:200C:417A)

– Domain name, such as TEST.US.IBM.COM

– Location name string: 1-16 byte string, such as STLEC1B

• Support for location name added via PM28500

� GROUP_MEMBER applies to members of a data sharing group

– Blank: valid profile row applies to any member of the data sharing group

– Non-blank: Value represents member name and valid row applies only to that member of the data sharing group

Page 17: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation17

#1. Defining Profiles: Default Filter Support

� A single byte asterisk ‘*’ placed in any of the filt ering columns in DSN_PROFILE_TABLE defines a default filter scope

– Default filter scope matches all threads or connections that are not matched by other profile table rows

Page 18: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation18

#1. Monitor Threads and Connections: Results•Column 1: Normal remote thread behavior, governed by MAXDBAT & CONDBAT.

•Column 2: Profile active for IPAddr/Domain with MONITOR_THREADS (MT) set to EXCEPTION. Suspensions start at MT and continue to CONDBAT.

•Column 3: Profile active for IPAddr/Domain with MONITOR_THREADS (MT) & MONITOR_CONNECTIONS (MC) set to EXCEPTION. Threads start suspending at MT and continue to MC, beyond which requests are rejected with -30041.

•Column 4:Profile active for non-IPAddr/Domain with MONITOR_THREADS (MT) set to EXCEPTION. Threads begin suspending at MT and continue for 2 x MT (as long as this is < CONDBAT), beyond which requests are rejected.

Page 19: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation19

#1: Valid Profiles - DSN_PROFILE_TABLE Categories and Columns to Monitor System Level Resources

Specify only one of the following columns: CLIENT_APPLNAME ,

CLIENT_USERID, CLIENT_WRKSTNNAME

Client application name, user ID, or workstation ID

Specify only the location name or location alias in LOCATION column. This category applies only to profiles that specify MONITOR THREADS and MONITOR IDLE THREADS.

Location name, or location alias

Specify one or both of the following columns: COLLID or PKGNAME

Profiles that specify both COLLID and PKGNAME take precedence over profiles that specify only one value. Profiles that specify only COLLID take precedence over profiles that specify only PKGNAME

Collection identifier or package name

Specify one or both of the following columns: ROLE or AUTHID

Profiles that specify both ROLE and AUTHID take precedence over profiles that specify only one value. Profiles that specify only ROLE take precedence over profiles that specify only AUTHID

Role or authorization identifier

Specify only the PRDID column.Client product identifier

Specify only the LOCATION column. The value can be an IP address or domain name.

Client IP address or domain name

Columns to SpecifyFiltering Category

Page 20: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation20

#1: Threads and Connections Profile/Attribute Valid Combinations – System Level Resources

MONITOR THREADSLOCATION only (Location Name, Location Alias, Client IP Address, or Domain Name

One of CLIENT_APPLNAME, CLIENT_USERID, CLIENT_WORKSTNNAME

COLLID, PKGNAME, or both

AUTHID, ROLE, or both

MONITOR IDLE THREADSPRDID only

MONITOR CONNECTIONSLOCATION only (Client IP address or Domain Name only)

Note: This category is the only accepted filtering criteria for profiles that specify the MONITOR CONNECTIONS keyword

Applicable KEYWORDS Values

(SYSIBM.DSN_PROFILE_ATTRIBUTES)

Applicable Filtering Columns

(SYSIBM.DSN_PROFILE_TABLE)

Page 21: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation21

#1: Threads and Connections – System Level Resources

DB2 issues DSNT771I messages, which provide limited information in the message text about the when the threshold is exceed and begins to fail remote connection requests with SQLCODE -30041. This level is also used when the diagnosis level is not specified.

EXCEPTION_DIAGLEVEL1

DB2 issues DSNT772I messages, which provide additional details including the specific profile ID and the specific reason code, when the threshold is exceeded and begins to fail remote connection requests with SQLCODE -30041

EXCEPTION DIAGLEVEL2

DB2 issues messages when total number of remote connections exceeds the threshold, and begins to fail remote connection requests with SQLCODE -30041

EXCEPTION

DB2 issues DSNT772I messages, which provide additional details including the specific profile ID and the specific reason code, when the threshold is exceeded

WARNING_DIAGLEVEL2connections including active connections and live inactive connections

DB2 issues DSNT771I messages, which provide limited information in the message text about the when the threshold is exceeded. This level is also used when the diagnosis level is not specified.

WARNING_DIAGLEVEL1Specifies that DB2 monitors the total number of remote

DB2 issues messages when total number of remote connections exceeds the threshold.

WARNINGMONITOR CONNECTIONS -

ACTION TAKENATTRIBUTE1KEYWORD

Type and Level of Detail for Messages Issued for MONITOR CONNECTIONS

Page 22: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation22

#1: Threads and Connections – System Level Resources

DB2 issues DSNT771I messages, which provide limited information in the message text about the when the threshold is exceed and begins to fail the connection requests with SQLCODE -30041. This level is also used when the diagnosis level is not specified.

EXCEPTION_DIAGLEVEL1

DB2 issues DSNT772I messages, which provide additional details including the specific profile ID and the specific reason code, when the threshold is exceeded and starts to fail the connection requests with SQLCODE -30041

EXCEPTION DIAGLEVEL2

DB2 issues messages when total number of active threads exceeds the threshold, and starts to fail the connection requests with SQLCODE -30041.

EXCEPTION

DB2 issues DSNT772I messages, which provide additional details including the specific profile ID and the specific reason code, when the threshold is exceeded.

WARNING_DIAGLEVEL2

DB2 issues DSNT771I messages, which provide limited information in the message text about the when the threshold is exceed. This level is also used when the diagnosis level is not specified.

WARNING_DIAGLEVEL1Specifies that DB2 monitors the total number of concurrent active threads.

DB2 issues messages when total number of active threads exceeds the threshold.

WARNINGMONITOR THREADS

ACTION TAKENATTRIBUTE1KEYWORD

Type and Level of Detail for Messages Issued for MONITOR THREADS

Page 23: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation23

#1: Threads and Connections – System Level Resources

DB2 issues DSNT771I messages, which provides limited informationabout when the threshold is exceeded and begins to cancel idle threads.. This level is also used when the diagnosis level is not specified.

EXCEPTION_DIAGLEVEL1

DB2 issues DSNT772I messages, which provide additional details including the specific profile ID and the specific reason code, and begins to cancel idle threads.when the threshold is exceeded

EXCEPTION DIAGLEVEL2

DB2 issues messages when thresholds are exceeded, and begins to cancel idle threads.

EXCEPTION

DB2 issues DSNT772I messages, which provide additional details including the specific profile ID and the specific reason code, when the threshold is exceeded.

WARNING_DIAGLEVEL2seconds) that an active server thread is allowed to remain idle.

DB2 issues DSNT771I messages, which provide limited information in the message text about the when the threshold is exceeded. This level is also used when the diagnosis level is not specified.

WARNING_DIAGLEVEL1Specifies that DB2 monitors the approximate time (in

DB2 issues messages when the thresholds are exceeded.WARNINGMONITOR IDLE THREADS

ACTION TAKENATTRIBUTE1KEYWORD

Type and Level of Detail for Messages Issued for MONITOR IDLE THREADS

Page 24: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation24

#1: Threads and Connections Example Profiles� Profile 17 would be rejected upon starting because it contains multiple

conflicting categories

� Profile 15 is the only valid profile for MONITOR CONNECTIONS

� If a thread’s criteria matched both ROLE_APP and USER1 profile 13 would be used because profiles with both ROLE and AUTHID take precedence

� If a thread’s criteria contained ROLE_DBA and USER1 profile 11 would apply

nullnullnullUSER1ROLE_APPnull13

nullnullnullnullROLE_APPnull14

nulnullnullnullnullTEST.SVL.IBM.COM

15

nullnullSQL09073nullnullnull16

COLL1

null

null

COLLID

nullSQL09073nullnullnull17

nullnullUSER1nullnull12

nullnullnullROLE_DBAnull11

PKGNAMEPRDIDAUTHID ROLELOCATIONPROFILE ID

Page 25: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation25

#1: Threads and Connections Example � PROFILEID=21 MONITOR THREADS indicates that DB2 monitors active threads that

meet the criteria defined by the DSN_PROFILE_TABLE row that contains 21 in the PROFILEID column.

– When the number of remote connections exceeds 50, DB2 issues a message and continues to service new connection requests.

– When the active threads exceeds 100, DB2 issues a message and suspends any new thread requests.

2011-1-21…..NULL50WARNINGMONITOR CONNECTIONS

21

2011-12-17…..NULL30EXCEPTIONMONITOR IDLE THREADS

21

2011-12-19…..NULL100EXCEPTIONMONITOR THREADS

21

ATTRIBUTE_TIMESTAMP

ATTRIBUTE3ATTRIBUTE2ATTRIBUTE1KEYWORDSPROFILE ID

nullnullnullnullnullDEMOMVS.DEMOPKG.IBM.COM21

PKGNAMECOLLIDPRDIDAUTHID ROLELOCATIONPROFILE ID

Page 26: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation26

#1: Threads and Connections Example � PROFILEID=21 MONITOR IDLE THREADS indicates that DB2

monitors idle threads that meet the criteria defined by the DSN_PROFILE_TABLE that contains 21 in the PROFILEID column.

– When a thread remains idle for more than 30 seconds,DB2 issues amessage and terminates the idle thread.

2009-1-21…..NULL50WARNINGMONITOR CONNECTIONS

21

2008-12-17…..NULL30EXCEPTIONMONITOR IDLE THREADS

21

2008-12-19…..NULL100EXCEPTIONMONITOR THREADS

21

ATTRIBUTE_TIMESTAMP

ATTRIBUTE3ATTRIBUTE2ATTRIBUTE1KEYWORDSPROFILE ID

nullnullnullnullnullDEMOMVS.DEMOPKG.IBM.COM21

PKGNAMECOLLIDPRDIDAUTHID ROLELOCATIONPROFILE ID

Page 27: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation27

#1: Threads and Connections Example� PROFILE 35 with associated attribute.

– Issue a warning every time a thread is associated with PRDID SQL09073.

– DSNT772I csect-name A MONITOR PROFILE condition-type CONDITION OCCURRED number TIME(S) IN PROFILE ID=profile-id WITH PROFILE FILTERING SCOPE=filtering-scope WITH REASON=reason-code.

– Monitor the use of unsupported software

null

COLLID

nullSQL09073nullnullnull35

PKGNAMEPRDIDAUTHID ROLELOCATIONPROFILE ID

2008-12-19…..NULL0WARNING_DIAGLEVEL2

MONITOR THREADS

35

ATTRIBUTE_TIMESTAMP

ATTRIBUTE3ATTRIBUTE2ATTRIBUTE1KEYWORDSPROFILE ID

Page 28: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation28

#2. SQL Contexts: Optimization Parameters

Specify only the PLANNAME column.Plan name

Specify all of the following columns: PLANNAME, COLLID, and PKGNAMEPlan name, collection identifier, and package name

Specify all of the following columns: AUTHID and LOCATIONAuthorization identifier and IP address

Columns to SpecifyFiltering Category

� Override the values of ZPARMS for complex queries:

– NPGTHRSH, STARJOIN, SJTABLES

– Specify following filtering categories in the DSN_PROFILE_TABLE

Page 29: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation29

#2: SQL Contexts: Optimization Parameters� Specify the subsystem parameter that you want to modify in the

DSN_PROFILE_ATTRIBUTES table

� KEYWORDS and Attributes.

– ZPARM NPGTHRSH

• KEYWORDS = NPAGES THRESHOLD • ATTRIBUTE2 = number of pages

– ZPARM STARJOIN

• KEYWORDS = STAR JOIN • ATTRIBUTE1 = ENABLE/DISABLE

– ZPARM SJTABLES

• KEYWORDS = MIN STAR JOIN TABLES• ATTRIBUTE2 = number of tables

Page 30: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation30

#2 Optimization parameters for SQL statements –Valid Profile combinations

All of COLLID, PKGNAME, and PLANNAME

PLANNAME only

MIN STAR JOIN TABLES, NPAGES THRESHOLD, STAR JOIN

AUTHID and LOCATION

Applicable Keywords Values

(SYSIBM.DSN_PROFILE_ATTRIBUTES)

Applicable Filtering Columns

(SYSIBM.DSN_PROFILE_TABLE)

Page 31: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation31

#2: Subsystem Parameters Example

Set ATTRIBUTE2 to an integer between 3 and 225 to specify the minimum number of tables for star join processing. (SJTABLES subsystem parameter)

MIN STAR JOIN TABLES

Set ATTRIBUTE1 to DISABLE or ENABLE to specify whether DB2 uses start join processing. (STARJOIN subsystem parameter)

STAR JOIN

Set ATTRIBUTE2 to an integer, 0 or greater, to specify the pages threshold for index access. (NPGTHRSH subsystem parameter)

NPAGES THRESHOLD

ATTRIBUTE(n)KEYWORD

Page 32: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation32

#2: Subsystem Parameters Example

2011-12-19…..nullnullDISABLESTAR JOIN 17

ATTRIBUTE_TIMESTAMP

ATTRIBUTE3ATTRIBUTE2ATTRIBUTE1KEYWORDSPROFILE ID

� Insert the following rows into SYSIBM.DSN_PROFILE_TABLE and the SYSIBM.DSN_PROFILE_TABLE table:

� Specifies that DB2 is to disable star join processing for all statements that are included in profile 17.

null

COLLID

nullnullDDS2364null9.39.68.14717

PKGNAMEPRDIDAUTHID ROLELOCATIONPROFILE ID

Page 33: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation33

#3 Managing Query Access Path

� Override the values of :

– PLANMGMT and PLANMGMTSCOPE bind options

– Subsystem parameters for a particular collection and package

Page 34: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation34

#3 Maintain Copies of Previous Access Plans -Procedure

� Define the access path management polices for the profiles

– insert one or more rows into the SYSIBM.DSN_PROFILE_ATTRIBUTES table that contains the following values:

Specify the types of SQL statements that the policies apply to:

'STATIC‘ Static SQL statements only.

PLANMGMNTSCOPE

Specify the policy for saving copies of access paths:

'OFF' DB2 saves no copy of the old access path. Existing copies remain unchanged.

'BASIC‘ DB2 saves or replaces active and previous copies.

'EXTENDED‘ DB2 saves or replaces active, previous, and original copies.

PLANMGMNT

ATTRIBUTE1KEYWORDS

Page 35: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation35

#3 Maintain Copies of Previous Access Plans -Procedure

� Create a Profile – insert a row in the PROFILE_TABLE

– For PLANNAME, the value must be '*'.

– For COLLID, specify the collection identifier.

– For PKGNAME, specify the name of the package.

COLLID1

COLLID

PKG01nullnull*null51

PKGNAMEPRDIDAUTHID PLANNAMEAUTHIDPROFILE ID

2011-12-19…..nullnullEXTENDEDPLANMGMT51

ATTRIBUTE_TIMESTAMP

ATTRIBUTE3ATTRIBUTE2ATTRIBUTE1KEYWORDSPROFILE ID

Page 36: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation36

#4: Model Production in Test� Attempting to recreate production access paths in development or

system test requires more than simply copying production statistics for access path analysis

– “System” factors result in different access paths than production

� In addition to catalog statistics, optimizer considers:

– CPU speed

– # of CPs (for parallelism)

– BP size

– RID pool

– Sort pool

Page 37: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation37

#4: Model Production - Requirements and Fixes

� V9 APAR PM26475 & V10 APAR PM26973

– Supports optimizer overrides for these system settings

� New zparms

– SIMULATED_CPU_SPEED

– SIMULATED_COUNT

� New SYSIBM.DSN_PROFILE_ATTRIBUTES

– SORT_POOL_SIZE

– MAX_RIDBLOCKS

– For bufferpools

• Same as the BP names listed in the DSNTIP1 panel.

Page 38: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation38

#4 Production Modeling – Valid Profile Combinations

BPname, MAX_RIDBLOCKS, SORT_POOL_SIZE

None. Profiles for this purpose have a global scope on the test subsystem.

Applicable Keywords ValuesApplicable Filtering Columns

Page 39: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation39

#4: Obtaining Production Values

� Obtain existing production values– BP information available from –DISPLAY BUFFERPOOL command

– Example jobs to acquire and set production settings in a test environment.• http://www.ibm.com/support/docview.wss?uid=swg21470440

– Member MDLPROD.COPY contains SQL statements (run on the PROD Subsystem) to capture the CPU speed, number of processors, Rid pool, and sort pool from the IBM_SERVICE_DATA

– Values converted to integer– Member MDLTEST.COPY is an example job that executes SQL to insert and

create the profile that incorporates the production values obtained in the MDLROD.COPY member.

� EXPLAIN will reflect “PROFILEID xxxx” concatenated into the REASON column of the DSN_STATEMNT_TABLE table.

Page 40: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation40

#4: Define a Profile� INSERT 1 row into profile table using any unique number

– INSERT INTO SYSIBM.DSN_PROFILE_TABLE (PROFILEID) VALUES(4713);

� INSERT 1 row into the ATTRIBUTES table for each override– INSERT INTO SYSIBM.DSN_PROFILE_ATTRIBUTES

(PROFILEID,KEYWORDS,ATTRIBUTE1,ATTRIBUTE2)VALUES (4713, ’SORT_POOL_SIZE’,NULL, 10240000);

– INSERT INTO SYSIBM.DSN_PROFILE_ATTRIBUTES(PROFILEID,KEYWORDS,ATTRIBUTE1,ATTRIBUTE2)VALUES (4713, ’BP8K0’, NULL, 2500);

� Update the CPU ZPARMS for the test subsystem– SIMULATED_COUNT = 8– SIMULATED_CPU_SPEED = 18

null

COLLID

nullnullnullnullnull4713

PKGNAMEPRDIDAUTHID PLANNAMEAUTHIDPROFILE ID

2011-12-19…..null10240000nullSORT POOL SIZE4713

ATTRIBUTE_TIMESTAMP

ATTRIBUTE3ATTRIBUTE2ATTRIBUTE1KEYWORDSPROFILE ID

Page 41: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation41

#5: Profiles and IDAA

� DB2 9 Profiles had the ability to use two functional keywords toinfluence whether or not to send a query to an accelerator server

� DB2 10 added a third

– ACCEL_TABLE_THRESHOLD – Total table cardinality for a query to be treated as a short running

query– ACCEL_RESULTSIZE_THRESHOLD

– Maximum number of rows that a query that is sent to an accelerator server can return

– ACCEL_TOTALCOST_THRESHOLD – Maximum estimated total cost for a query to be treated as a short

running query

� Details in the Managing Performance manual, which also says to contact IBM Support.

Page 42: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation42

Defining a Profile

� A row in the profile table defines one filtering scope

– Possible to have multiple rows defining more than one scope

� Filtering category is authorization identifier expressed in the AUTHID column (value: DDS2364)

� The PROFILE_ENABLED column indicates whether DB2 activates the profile when you issue the START PROFILE command

Page 43: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation43

Defining Profile Actions

� Rows in the SYSIBM.DSN_PROFILE_ATTRIBUTES table control the actions.

� The values of the PROFILEID columns of each table associate eachprofile with the corresponding actions for that profile. (’101’)

Page 44: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation44

Starting and Stopping Profiles

� You must enable and start profiles before DB2 can use the information in the profile tables

� Issue a START PROFILE command.

– DB2 activates the functions specified in the profile tables for every valid row of the SYSIBM.DSN_PROFILE_TABLE table that contains PROFILE_ENABLED='Y'. Profiles in rows that contain PROFILE_ENABLED='N' are not started.

Page 45: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation45

Validate Profiles are Started

� Issue the –DIS PROFILE command

Page 46: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation46

Validate The Profile is ‘Accepted’

� SYSIBM.DSN_PROFILE_HISTORY

� SYSIBM.DSN_PROFILE_ATTRIBUTES_HISTORY

� Example:

Page 47: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation47

Appendix

Page 48: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation48

Appendix – SYSTEM LEVEL Profile examples that DO NOT Work

� Two PROFILES (DSN_PROFILES_TABLE) with an identical SCOPE will be incompatible.

� When started the first PROFILE encountered is ACCEPTED

� Second PROFILE is REJECTED – DUPLICATED SCOPE

ACCEPTED - DOMAIN NAME IS RESOLVED INTO IP ADDRESS ::FFFF:9.39.68.147

DEMOMVS.DEMOPKG.IBM.COM10

STATUSLOCATIONPROFILE ID

REJECTED - DUPLICATED SCOPE SPECIFIEDDEMOMVS.DEMOPKG.IBM.COM11

STATUSLOCATIONPROFILE ID

Page 49: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation49

Appendix – SYSTEM LEVEL Profile examples that DO NOT Work

� One PROFILE (DSN_PROFILES_TABLE) with two conflicting SCOPES will be rejected.

REJECTED - INVALID SCOPE SPECIFIED. FOR SYSTEM LEVEL MONITOR

12

STATUSPROFILE ID

COLL1

COLLID

nullSQL09073nullROLE_DBAnull12

PKGNAMEPRDIDAUTHID ROLELOCATIONPROFILE ID

Page 50: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation50

CREATE TABLE SYSIBM.DSN_PROFILE_TABLE

( "AUTHID" VARCHAR(128) ,"PLANNAME" VARCHAR(24) ,"COLLID" VARCHAR(128),"PKGNAME" VARCHAR(128),"LOCATION" VARCHAR(254) -- this change is done via APAR PM28500,"PROFILEID" INTEGER NOT NULL PRIMARY KEY GENERATED

BY DEFAULT AS IDENTITY ,"PROFILE_TIMESTAMP" TIMESTAMP NOT NULL WITH DEFAULT ,"PROFILE_ENABLED" CHAR(1) NOT NULL DEFAULT 'Y' ,"GROUP_MEMBER" VARCHAR(24) ,"REMARKS" VARCHAR(762) ,"ROLE" VARCHAR(128) ,"PRDID" CHAR(8) ,"CLIENT_APPLNAME" VARCHAR(255) -- this change is done via APAR PM28500,"CLIENT_USERID" VARCHAR(255) -- this change is done via APAR PM28500,"CLIENT_WRKSTNNAME" VARCHAR(255) -- this change is done via APAR PM28500) IN DSNOPTDB.DSNOPTTS CCSID UNICODE;

DDL of SYSIBM.DSN_PROFILE_TABLE

Page 51: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation51

DDL of SYSIBM.DSN_PROFILE_HISTORYCREATE TABLE SYSIBM.DSN_PROFILE_HISTORY

( "AUTHID" VARCHAR(128) ,"PLANNAME" VARCHAR(24) ,"COLLID" VARCHAR(128) ,"PKGNAME" VARCHAR(128) ,"LOCATION" VARCHAR(254) -- this change is done via APAR PM28500,"PROFILEID" INTEGER NOT NULL ,"PROFILE_TIMESTAMP" TIMESTAMP NOT NULL ,"PROFILE_ENABLED" CHAR(1) NOT NULL ,"GROUP_MEMBER" VARCHAR(24) ,"STATUS" VARCHAR(254) ,"ROLE" VARCHAR(128) ,"PRDID" CHAR(8)

,"CLIENT_APPLNAME" VARCHAR(255) -- this change is done via APAR PM28500,"CLIENT_USERID" VARCHAR(255) -- this change is done via APAR PM28500,"CLIENT_WRKSTNNAME" VARCHAR(255) -- this change is done via APAR PM28500

) IN DSNOPTDB.DSNOPTTS

CCSID UNICODE;

Page 52: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation52

DDL of SYSIBM.DSN_PROFILE_ATTRIBUTES

CREATE TABLE SYSIBM.DSN_PROFILE_ATTRIBUTES ( "PROFILEID" INTEGER NOT NULL REFERENCES

SYSIBM.DSN_PROFILE_TABLE ON DELETE CASCADE ,"KEYWORDS" VARCHAR(128) NOT NULL ,"ATTRIBUTE1" VARCHAR(1024) ,"ATTRIBUTE2" INTEGER ,"ATTRIBUTE3" FLOAT ,"ATTRIBUTE_TIMESTAMP" TIMESTAMP NOT NULL WITH DEFAULT,"REMARKS" VARCHAR(762) ) IN DSNOPTDB.DSNOPTTS CCSID UNICODE;

Page 53: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation53

DDL of DSN_PROFILE_ATTRIBUTES_HISTORY

CREATE TABLE SYSIBM.DSN_PROFILE_ATTRIBUTES_HISTORY

( "PROFILEID" INTEGER NOT NULL ,"KEYWORDS" VARCHAR(128) NOT NULL ,"ATTRIBUTE1" VARCHAR(1024) ,"ATTRIBUTE2" INTEGER ,"ATTRIBUTE3" FLOAT ,"ATTRIBUTE_TIMESTAMP" TIMESTAMP NOT NULL ,"STATUS" VARCHAR(254) ) IN DSNOPTDB.DSNOPTTS CCSID UNICODE;

Page 54: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation54

CREATE INDEX DDL: SYSIBM.DSN_PROFILE_TABLECREATE UNIQUE INDEX SYSIBM.DSN_PROFILE_TABLE_IX_ALLON SYSIBM.DSN_PROFILE_TABLE

( "PROFILEID");

CREATE INDEX SYSIBM.DSN_PROFILE_TABLE_IX2_ALL ON SYSIBM.DSN_PROFILE_TABLE

( "PROFILE_ENABLED" ,"AUTHID" ,"PLANNAME" ,"COLLID" ,"PKGNAME" ,"LOCATION" -- this change is done via APAR PM28500,"PRDID" ,"ROLE","CLIENT_APPLNAME" -- this change is done via APAR PM28500,"CLIENT_USERID" -- this change is done via APAR PM28500,"CLIENT_WRKSTNNAME" -- this change is done via APAR PM28500,"GROUP_MEMBER" ,"PROFILE_TIMESTAMP" DESC);

Page 55: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation55

CREATE UNIQUE INDEX SYSIBM.DSN_PROFILE_ATTRIBUTES_IX_ALL ON SYSIBM.DSN_PROFILE_ATTRIBUTES

( "PROFILEID"

,"ATTRIBUTE_TIMESTAMP" DESC

,"KEYWORDS" ,"ATTRIBUTE1"

,"ATTRIBUTE2"

,"ATTRIBUTE3");

CREATE INDEX DDL: SYSIBM.DSN_PROFILE_ATTRIBUTES

Page 56: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation56

Filtering Criteria – Client Application Name

� Defaults:– IBM Data Server Driver for JDBC and SQLJ:

db2jcc_application

– IBM Data Server Driver for ODBC and CLI: db2cli.exe

– DB2 Connect CLP: db2bp.exe

– From application on DB2 for z/OS• Foreground TSO TSO logon userid• Background TSO job name• RRS attach correlation ID• Call attach (CAF) job name• CICS attach – 1st 8 bytes of correlation id• IMS attach – 8 bytes: PSB name program name

Page 57: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation57

Filtering Criteria – Client Application Name

� Client application name can be set by application explicitly:

– DB2Connection.setDB2ClientApplicationInformation(String info)

– Set Client Information (sqleseti)

– One of RRS DSNRLE functions:

• SIGNON• AUTH SIGNON• CONTEXT SIGNON• SET_CLIENT_ID

– WLM_SET_CLIENT_INFO stored procedure

Page 58: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation58

Filtering Criteria – Client User ID

� Default client end user ID is the primary authoriza tion ID used to establish the connection

� Client user ID can be set by application explicitly

– DB2Connection.setDB2ClientUser(String info)

– Set Client Information (sqleseti)

– One of RRS DSNRLE functions:

• SIGNON• AUTH SIGNON• CONTEXT SIGNON• SET_CLIENT_ID

– WLM_SET_CLIENT_INFO stored procedure

Page 59: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation59

Filtering Criteria – Client Workstation Name

� Default client workstation name is client host name or, for DB2 for z/OS, connection type name. For example

– IBM Data Server Driver or DB2 Connect: client host name

– For remote application running in DB2 for z/OS environment

• TSO foreground TSO• TSO background BATCH• RRS RRSAF• Call attach DB2CALL• CICS attach CICS region name• IMS attach IMS region ID

Page 60: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation60

Filtering Criteria – Client Workstation Name

� Client workstation name can be set by application explicitly:

– DB2Connection.setDB2ClientWorkstation(String info)

– Set Client Information (sqleseti)

– One of RRS DSNRLE functions:

• SIGNON• AUTH SIGNON• CONTEXT SIGNON• SET_CLIENT_ID

– WLM_SET_CLIENT_INFO stored procedure

Page 61: DB2 10 for z/OS Profiles Overview: “The New ZPARMs”Jul 11, 2012  · Profile support, introduced in DB2 9 for z/OS, expanded in DB2 10 for z/OS “A profile is a set of criteria

Enhanced Monitoring DB2 V10

© 2012 IBM Corporation61

References

� DB2 10 for z/OS Managing Performance SC19-2978-SC19-2978-05

� DB2 10 for z/OS Installation and Migration Guide GC19-2974-07

� Technote:

– http://www.ibm.com/support/docview.wss?uid=swg21470440