4
© 2015 IBM Corporation zAnalytics DB2 Update Day 2015 – March 23-27, 2015 1 DB2 Update Day 2015 How to write native stored procedures in Data Studio Jørn Thyssen <[email protected]> Technical Sales & Solutions Analytics on System z

Native Stored Procedures with data studio

Embed Size (px)

Citation preview

Page 1: Native Stored Procedures with data studio

© 2015 IBM Corporation

zAnalytics DB2 Update Day 2015 – March 23-27, 2015

1

DB2 Update Day 2015

How to write nativestored proceduresin Data Studio

Jørn Thyssen <[email protected]> Technical Sales & SolutionsAnalytics on System z

Page 2: Native Stored Procedures with data studio

© 2015 IBM Corporation

zAnalytics DB2 Update Day 2015 – March 23-27, 2015

2

Agenda

Scenario 1: Create native stored procedure from template

Scenario 2: Run stored procedure for testing purposes

Scenario 3: Create new version of stored procedure Scenario 4: Debug stored procedure Scenario 5: Tune SQL statement from stored procedure

If time permits:– Monitor Support

l Query Monitorl OMPE (IBM Tivoli Omegamon XE for DB2 Performance Expert for DB2 for z/OS)

Page 3: Native Stored Procedures with data studio

© 2015 IBM Corporation

zAnalytics DB2 Update Day 2015 – March 23-27, 2015

3

Enhanced Instrumentation for Stored Procedure Performance Analysis

DB2 10 delivered an APAR PM53243 which better support and separate reporting about Stored Procedure and UDF processing. New IFCIDs 380 (SP) and 381 (UDF) are created for Stored Procedure and User-Defined Function detail, respectively. These records have 2 data sections:

• Identify the stored procedure or UDF beginning or ending (like IFICD 233)

• Include the current CP, specialty engine, and elapsed time details for nested activity

• These records can be used to determine the CP, specialty engine, and elapsed time for a given SP or UDF invocation

• New IFCID 499 which reports the related SQL statement execution details per SP execution

Page 4: Native Stored Procedures with data studio

Stored Procedure invoked from a distributed application

Link to the SQL Dashboard for further analysis and drill down into the Stored Procedure