21
1 © 2014 IBM Corporation 1 DB2 11 for z/OS Profiles Overview The New ZParms and MORE! Paul Bartak, IBM DB2 Advisor [email protected] © 2014 IBM Corporation 2 Profiles are gaining momentum, flexibility, and are evolving A profile is a set of criteria that identifies a particular context on a DB2 subsystem such as Threads, Connections (System Resources), or SQL statements that have particular attributes. Profiles incorporate: Monitoring remote threads and remote connections (TCP/IP) Optimization System Parameters for SQL statements Modeling your production environment in test for SQL EXPLAIN Setting thresholds for Query Acceleration – IDAA Setting the value of a special register Knowledge Center Topic

DB2 11 for z/OS Profiles Overview The New ZParms and MORE! for zOS... · 2017-11-16 · DB2 issues DSNT772I messages, which provide additional details including the specific profile

  • Upload
    others

  • View
    43

  • Download
    2

Embed Size (px)

Citation preview

1

© 2014 IBM Corporation1

DB2 11 for z/OS Profiles OverviewThe New ZParms and MORE!

Paul Bartak, IBMDB2 [email protected]

© 2014 IBM Corporation2

Profiles are gaining momentum, flexibility, and are evolving

� A profile is a set of criteria that identifies a particular context on a DB2 subsystem such as Threads, Connections (System Resources), or SQL statements that have particular attributes.

� Profiles incorporate:

– Monitoring remote threads and remote connections (TCP/IP)

– Optimization System Parameters for SQL statements

– Modeling your production environment in test for SQL EXPLAIN

– Setting thresholds for Query Acceleration – IDAA

– Setting the value of a special register

� Knowledge Center Topic

2

© 2014 IBM Corporation3

Profile tables� Following are a complete set of PROFILE objects:

– SYSIBM.DSN_PROFILE_TABLE

– SYSIBM.DSN_PROFILE_HISTORY

– SYSIBM.DSN_PROFILE_ATTRIBUTES

– SYSIBM.DSN_PROFILE_ATTRIBUTES_HISTORY

� DSNTIJSG creates the profile tables

– Three supporting indices:

• SYSIBM.DSN_PROFILE_TABLE_IX_ALL

• SYSIBM.DSN_PROFILE_TABLE_IX2_ALL

• SYSIBM.DSN_PROFILE_ATTRIBUTES_IX_ALL

In DSNOPTDB.DSNOPTTS

© 2014 IBM Corporation4

Profile Scope, Context and the Action� SYSIBM.DSN_PROFILE_TABLE

– Defines the context

– Profile and filtering (ie. LOCATION, PRDID, AUTHID, etc.)

– Only certain combinations are allowed

– PROFILEID defaults to identity column value

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

• Defaults to ‘Y’

– PROFILE_TIMESTAMP defaults to CURRENT

� SYSIBM.DSN_PROFILE_ATTRIBUTES table

– Controls the actions

– Defines attributes (ie. MONITOR CONNECTIONS, MONITOR THREADS, and MONITOR IDLE THREADS, etc.)

– One or more attributes rows are required

– PROFILEID is foreign key to DSN_PROFILE_TABLE (delete cascade)

– ATTRIBUTE_TIMESTAMP defaults to CURRENT

3

© 2014 IBM Corporation5

PROFILE_TABLE Filtering Categories & Criteria Sampling� Specific filtering determined by column combinations

� IP address or Domain Name

– LOCATION column (must be only column specified)

� Plan name, collection identifier, and package name

– PLANNAME, COLLID, and PKGNAME columns

� Role or Authorization identifier

– ROLE 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

� All can be wild carded

– Only “*” can be specified, enabling an “All” context for filtering– No “like” wild carding

© 2014 IBM Corporation6

#1: Valid Profiles - DSN_PROFILE_TABLE Categories and columns for monitoring SYSTEM RESOURCES

Specify only one of the following columns: CLIENT_APPLNAME ,

CLIENT_USERID, CLIENT_WRKSTNNAMEClient application name, user ID, or

workstation ID

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

Only checks the first SQL COLLID/PKGNAME for the thread.

Collection identifier or package name

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: 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 Specify (Filtering Criteria)Filtering Category

See the Information Center for evaluation ordering and precedence rules

4

© 2014 IBM Corporation7

#1: Threads and Connections Profiles – System Level Monitoring

� 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 number of concurrent inbound DDF connections that are to be allowed. – 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 allowed 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

© 2014 IBM Corporation8

#1: Threads and Connections Profiles – System Level Monitoring

� You can monitor threads and connections for remote

TCP/IP access to DB2 servers

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

– Protects system resources

5

© 2014 IBM Corporation9

#1: Threads and Connections ProfilesSystem Level Monitoring Keywords (Monitoring Functions)

� MONITOR CONNECTIONS (CONDBAT)

– Total number of remote connections from TCP/IP requesters

• including current active connections 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 LOCATION, PRDID, ROLE or AUTHID and COLLID or PKGNAME

� 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

© 2014 IBM Corporation10

#1: Threads and Connections Profiles – System Level 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

6

© 2014 IBM Corporation11

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

� 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 5 minutes.

– EXCEPTION - If profile threshold is exceeded, the thread and connection are queued or terminated.

• Messaging:

– DIAGLEVEL1 (default) with minimal information (DSNT771I)

– DIAGLEVEL2 includes PROFILEID and reason code (DSNT772I)

• For Example WARNING_DIAGLEVEL1

– ATTRIBUTE2 column of DSN_PROFILE_ATTRIBUTES table to specify the threshold

© 2014 IBM Corporation12

#1: Threads and Connections – System Level Monitoring

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

7

© 2014 IBM Corporation13

#1: Threads and Connections – System Level Monitoring

DB2 issues DSNT771I messages, which provide limited information

in the message text about the when the threshold is exceed and begins to queue or 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 queue or 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

© 2014 IBM Corporation14

#1: Threads and Connections – System Level Monitoring

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, 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

8

© 2014 IBM Corporation15

#1: Threads and Connections – System Level Monitoring

© 2014 IBM Corporation16

#1: System Level Monitoring Example

� Column 1: Normal remote thread behavior, governed by MAXDBAT & CONDBAT.

� Column 2: Profile active for IPAddr/Domain with MONITOR_THREADS set to EXCEPTION. Suspensions start @ MT and continue to CONDBAT.

� Column 3: Profile active for IPAddr/Domain with MONITOR_THREADS & MONITOR_CONNECTIONS set to EXCEPTION. Threads start suspending @ MT and continue to MC.

� Column 4:Profile active for non-IPAddr/Domain with MONITOR_THREADS set to EXCEPTION. Threads begin suspending @ MT and continue for 2x MT (as long as this is < CONDBAT). Then they are rejected.

9

© 2014 IBM Corporation17

#1: System Level Monitoring 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 criteria matched both ROLE_APP and USER1 profile 13 would be used because profiles with both ROLE and AUTHID take precedence

� If a thread criteria contained ROLE_DBA and USER2 profile 11 would apply

– What about criteria of ROLE_DBA and USER1?

nullnullnullUSER1ROLE_APPnull13

nullnullnullnullROLE_APPnull14

nullnullnullnullnullTEST.SVL.IBM.COM

15

nullnullSQL09073nullnullnull16

COLL1

null

null

COLLID

nullSQL09073nullnullnull17

nullnullUSER1nullnull12

nullnullnullROLE_DBAnull11

PKGNAMEPRDIDAUTHID ROLELOCATIONPROFILE ID

© 2014 IBM Corporation18

#1: System Level Monitoring Example � PROFILEID=21 indicates that DB2 monitors system resources 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.

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

10

© 2014 IBM Corporation19

#1: System Level Monitoring 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

a message 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

© 2014 IBM Corporation20

#1: System Level Monitoring Example

� PROFILE 35 with associated attribute.

– Issue a warning when 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.

– Could be used to monitor the use of unsupported software

null

COLLID

nullSQL09073nullnullnull35

PKGNAMEPRDIDAUTHID ROLELOCATIONPROFILE ID

2008-12-19…..NULL0WARNING_DIAG

LEVEL2

MONITOR

THREADS

35

ATTRIBUTE_

TIMESTAMP

ATTRIBUTE3ATTRIBUTE2ATTRIBUTE1KEYWORDSPROFILE ID

11

© 2014 IBM Corporation21

#2 Optimization parameters for SQL statements –Valid Profile combinations

MIN STAR JOIN TABLES, NPAGES THRESHOLD, STAR JOIN

All of COLLID, PKGNAME, and PLANNAME (Only “*”)

Applicable Keywords Values

(SYSIBM.DSN_PROFILE_ATTRIB

UTES)

Applicable Filtering Columns

(SYSIBM.DSN_PROFILE_TABLE)

© 2014 IBM Corporation22

#2: Allowable Subsystem 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

12

© 2014 IBM Corporation23

#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

© 2014 IBM Corporation24

#2: Subsystem Parameters Example

2008-12-19…..nullnullDISABLESTAR JOIN 17

ATTRIBUTE_TI

MESTAMP

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.

PRBCOL

COLLID

PRBPACKnull*nullnull17

PKGNAMEPRDIDPLANNAME ROLELOCATIONPROFILE ID

13

© 2014 IBM Corporation25

#3: Production Modeling

� 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

© 2014 IBM Corporation26

#3: Production modeling - Components

� ZParms

– SIMULATED_CPU_SPEED

– SIMULATED_COUNT

– Also consider NPGTHRSH, PARADEG, and STARJOIN

� New SYSIBM.DSN_PROFILE_ATTRIBUTES

– SORT_POOL_SIZE

– MAX_RIDBLOCKS

– For bufferpools

• Same as the BP names listed in the DSNTIP1/2 panels.

14

© 2014 IBM Corporation27

#3 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

© 2014 IBM Corporation28

#3: 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.

15

© 2014 IBM Corporation29

#3: 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

2008-12-19…..null10240000nullSORT POOL SIZE4713

ATTRIBUTE_TIMESTAMP

ATTRIBUTE3ATTRIBUTE2ATTRIBUTE1KEYWORDSPROFILE ID

© 2014 IBM Corporation30

#4: Profiles and IDAA

� Profiles have the ability to use KEYWORDs to influence whether or not to send a query to an accelerator server

– ACCEL_TABLE_THRESHOLD (cardinality)– Cardinality greater than this value are considered for acceleration

– -1 disables this check

– Defaults to 1,000,000

– ACCEL_RESULTSIZE_THRESHOLD (number of rows)

– Expected # of rows below this value are considered for acceleration

– -1 (disabled) is the default.

– Values specified are in “thousands”

– ACCEL_TOTALCOST_THRESHOLD – A query cost greater or equal this value is considered for acceleration

– -1 for disabled

– 5000 is the default

� Use in conjunction with IBM Support

16

© 2014 IBM Corporation31

#5 Setting Special Registers

� Added to DB2 11 via PM93658

� Automatically sets several special registers for remote applications

� Overrides settings from the drivers

� Overrides any SET statements before the first SQL statement in the

connection

� Contents are not effected by COMMIT or ROLLBACK

� Application SETs after the first SQL will override the Profile setting

� System directed connections use value of requesting site

� Honors stored procedure INHERIT / DEFAULT SPECIAL REGISTERS

© 2014 IBM Corporation32

#5: Setting Special Registers

SPECIAL_REGISTERLOCATION only

One of CLIENT_APPLNAME, CLIENT_USERID, CLIENT_WORKSTNNAME

COLLID, PKGNAME, or both

AUTHID, ROLE, or both

PRDID only

Applicable Keywords Values

(SYSIBM.DSN_PROFILE_ATTRIBUTES)

Applicable Filtering Columns

(SYSIBM.DSN_PROFILE_TABLE)

17

© 2014 IBM Corporation33

#5 Setting SPECIAL_REGISTER options

� CURRENT APPLICATION COMPATIBILITY

� CURRENT DEBUG MODE

� CURRENT DECFLOAT ROUNDING MODE

� CURRENT DEGREE

� CURRENT EXPLAIN MODE

� CURRENT GET_ACCEL_ARCHIVE

� CURRENT FUNCTION PATH

� CURRENT LOCALE LC_CTYPE

� CURRENT MAINTAINED TABLE TYPES FOR OPTIMIZATION

� CURRENT MAINTAINED TABLE TYPES

� CURRENT OPTIMIZATION HINT

� CURRENT PACKAGE PATH

� CURRENT PRECISION

� CURRENT QUERY ACCELERATION

� CURRENT REFRESH AGE

� CURRENT ROUTINE VERSION

� CURRENT RULES

� CURRENT SCHEMA

� CURRENT SQLID

� CURRENT TEMPORAL BUSINESS_TIME

� CURRENT TEMPORAL SYSTEM_TIME

� ENCRYPTION PASSWORD

� PATH

� SCHEMA

� SESSION TIME ZONE

� TIME ZONE

© 2014 IBM Corporation34

#5 Setting Special Registers Examples

� ATTRIBUTE2/3 are not used

� The SET statement

– is1024 bytes max

– must have a blank around the “=“

– must choose valid values special registers

• Value is used as defined

– values cannot be expressions

SET APPLICATION COMPAITBILITY = ‘V11R1’SPECIAL_REGISTER11

ATTRIBUTE1KEYWORDSPROFILE ID

KILLERAPPnullnullnullnull11

CLIENT_APPLNAMECOLLIDPRDIDAUTHID ROLEPROFILE ID

18

© 2014 IBM Corporation35

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

© 2014 IBM Corporation36

Defining Profile Actions

� Rows in the SYSIBM.DSN_PROFILE_ATTRIBUTES table control the

actions.

� The values of the PROFILEID columns of each table associate each

profile with the corresponding actions for that profile. (’101’)

19

© 2014 IBM Corporation37

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 Profiles in the profile tables

– For every valid row of the SYSIBM.DSN_PROFILE_TABLE table

that contains PROFILE_ENABLED='Y‘ (Default)

– Profiles in rows that contain PROFILE_ENABLED='N' are not

started.

© 2014 IBM Corporation38

Validate Profiles are Started

� Issue the –DIS PROFILE command

20

© 2014 IBM Corporation39

Validate The Profile is ‘Accepted’

� SYSIBM.DSN_PROFILE_HISTORY

� SYSIBM.DSN_PROFILE_ATTRIBUTES_HISTORY

� Example:

© 2014 IBM Corporation40

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

21

© 2014 IBM Corporation41

Appendix – SYSTEM LEVEL Profile examples that DO

NOT Work

� One PROFILE (DSN_PROFILES_TABLE) with conflicting scopes will

be rejected.

REJECTED - INVALID SCOPE SPECIFIED. FOR SYSTEM

LEVEL MONITOR

12

STATUSPROFILE ID

COLL1

COLLID

nullSQL09073nullROLE_DBAnull12

PKGNAMEPRDIDAUTHID ROLELOCATIONPROFILE ID

© 2014 IBM Corporation42

References

� DB2 11 for z/OS Managing Performance SC19-4060

� DB2 11 for z/OS Administration Guide SC19-4050

� DB2 11 for z/OS SQL Reference SC19-4066

� Technote:

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