db2 for i - update for semiug and wmsugobserve authorization list impact on database object access...

71
© 2013 IBM Corporation 1 Title of presentation goes here Power Systems 2014 DB2 for IBM i update for SEMIUG and WMSUG “TR7 & TR8 timed enhancements” Scott Forstie ([email protected]) DB2 for i Business Architect

Upload: others

Post on 10-Mar-2020

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2013 IBM Corporation1 Title of presentation goes here

Power Systems 2014

DB2 for IBM i update forSEMIUG and WMSUG“TR7 & TR8 timed enhancements”

Scott Forstie([email protected] )DB2 for i Business Architect

Page 2: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation

IBM Power Systems™

DB2 for i – Enhancements delivered via DB2 PTF Group s

IBM i 7.1

TR6 timed Enhancements:

� HTTP functions

� Database Reorganization

(User specified starting point)

� Tracking System Limits (Phase 1)

� Many Others…

TR3

2012 2013

TR4TR5 TR6 TR7

TR7 timed Enhancements:

� Dynamic Compound

� Additional RPG Free Format

� 1.7 TB Indexes

� Tracking System Limits (Phase 2)

� Many Others…

TR5 timed Enhancements:

� Named and Default Parameters for Procedures

� Infosphere Guardium V9.0 – DB2 for i

� SQE enhancement for Encoded Vector Indexes defined with INCLUDE

� Many Others…

TR4 timed Enhancements:

� XMLTable

� RUNSQL command

� Performance enhancements for large numbers of row locks

� Automatic management of SQL Plan Cache size

� Many Others…

SF99701 Level 11

SF99701 Level 14

SF99701 Level 18

SF99701 Level 23

SF99701 Level 26

Enhancements delivered by PTF are documented here:www.ibm.com/developerworks/ibmi/techupdates/db2

& in this article “A Hit Parade of DB2 for i Enhanc ements”http://iprodeveloper.com/database/hit-parade-db2-i- enhancements

Page 3: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation3 DB2 for i – Update

DB2 for i – Enhancements delivered via DB2 PTF Groups

IBM i 7.1

TR7

The DB2 PTF Group schedule can be found here:

www.ibm.com/developerworks/ibmi/techupdates/db2/groupptf

2014 20157.1 - TR8 7.1 - TR9

7.1 - TR8 timed Enhancements:• High priority enhancements

based upon customer requests• Enhanced ability to

programmatically analyze performance

• New DB2 for i services• And more…

SF99701 Level 26

SF99701 Level 29

SF99701 Level xx

TR8 Enhancements – Landing Page:

www.ibm.com/developerworks/ibmi/techupdates/i71-TR8

Page 4: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation4 DB2 for i – Update

DB2 for i – Enhancements delivered by DB2 PTF Groups

• The developerWorks IBM i Technology Updates wiki includes the schedule, status and enhancement breakdown.

• www.ibm.com/developerworks/ibmi/techupdates/db2/gro upptf

Page 5: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation5 DB2 for i – Update

DB2 for i – Explaining the technology

• Enhancements delivered by PTF:www.ibm.com/developerworks/ibmi/techupdates/db2

• Some InfoCenter books, including the 7.1 SQL Reference , are updated with TRs:http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/db2/rbafz.pdf

• The “IBM i 7.1 Technical Overview” Redbook :http://www.redbooks.ibm.com/abstracts/sg247858.html

• We publish deep dive White Papers on some topics:HTTP functions & DB2 for i - http://bit.ly/httpAndDB2foriXML on DB2 for i - http://bit.ly/XMLonDB2fori

• We explore some Technology topics with articles:www.ibm.com/developerworks/ibmi/library

• DB2 for i – Power page http://ibm.com/systems/i/db2

Page 6: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation6 DB2 for i – Update

Something for everyone…

• IBM i – the solutions platform delivers new SQL capabilities

• Modernization – Making it easierto move from DDS to SQL DDL

• A new breed of catalogs –SQL As A Service with DB2 for i

• VLDB - IBM i gets bigger and better

Technology Refresh 7 – DB2 for i enhancements

Themes

Page 7: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation7 DB2 for i – Update

Technology Refresh 7 – Digging deeperVLDB - IBM i gets bigger and better• SQL Indexes can grow to 1.7TB• Automatic tracking and trending for growth rates of DB2 tables and indexes• Live movement of DB2 tables and indexes to SSD

DB2 for i as a solutions platform• Advanced SQL scripting with the Dynamic Compound statement• Remote 3-part name – controlled using RDB aliases• Additional RPG Full Free Format & Embedded SQL

Modernization – Making it easier to move from DDS to SQL DDL• Improved SQL Generate DDL support for Keyed DDS files• Field reference detail maintained over CREATE TABLE AS

DB2 for i systems management catalogs – a new breed of data

Ease of use improvements on DB2 for i• Ability to use SQL to query Audit and IFS Journals• Deferred Journal support on Restore

Page 8: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation8 DB2 for i – Update

DB2 for i – Functional Enhancements

Page 9: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation9 DB2 for i – Update

BEGINDECLARE V_ERROR BIGINT DEFAULT 0;DECLARE V_HOW_MANY BIGINT;DECLARE CONTINUE HANDLER FOR SQLEXCEPTION

SET V_ERROR = 1;

SELECT COUNT(*) INTO V_HOW_MANY FROM STAFFWHERE JOB = 'Clerk' AND SALARY < 15000;

IF (V_ERROR = 1 OR V_HOW_MANY = 0) THEN RETURN;

END IF;UPDATE STAFF SET SALARY = SALARY * 1.1 WHERE JOB = 'Clerk';

END;

Dynamic COMPOUND statement

• Support the prepare and execute of a COMPOUND statement without requiring the user to create a procedure

• Variables, handlers, and all normal control statements can be included

• Both ATOMIC and NOT ATOMIC are supported

Page 10: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation10 DB2 for i – Update

Dynamic COMPOUND statement

Glancing under the covers…

• A temporary program (QTEMP/QCMPD00001) is used• Nested dynamic compounds are supported

• After the program call completes, the program is deleted

BEGINDECLARE V_ERROR BIGINT DEFAULT 0;DECLARE V_HOW_MANY BIGINT;DECLARE CONTINUE HANDLER FOR SQLEXCEPTION

SET V_ERROR = 1;

SELECT COUNT(*) INTO V_HOW_MANY FROM STAFFWHERE JOB = 'Clerk' AND SALARY < 15000;

IF (V_ERROR = 1 OR V_HOW_MANY = 0) THEN RETURN;

END IF;UPDATE STAFF SET SALARY = SALARY * 1.1 WHERE JOB = 'Clerk';

END;

QTEMP/QCMPD00001

*PGM

Parsed, ILE C code gen’ed, module created, program bound and invoked

Program deleted

Page 11: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation11 DB2 for i – Update

Free form RPG – history and staging

• Phase I – OS/400 V5R1Calculation specification (C spec)

• Phase II – OS/400 V5R3Embedded SQL (Exec SQL)

• Phase III – IBM i 7.1 TR7Control (Header) specification (H spec)File specification (F spec)Data specification (D spec)Procedure specification (P spec)

Visit the RPG Cafe to discover complete details on this important RPG enhancement: www.ibm.com/developerworks/ibmi/rpg/welcome

Includes Embedded SQL Precompilersupport

EXEC SQL INSERT INTO LIB1/TABLE1 (COL1) VALUES (:STMPHV);

vs

C/EXEC SQL

C+ INSERT INTO LIB1/TABLE1(COL1) VALUES (:STMPHV)

C/END-EXEC

Page 12: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation12 DB2 for i – Update

sqlsetenvattr() - called before a connection is madesqlsetconnectattr() - called before or after a connection is made

Example: Find employees with less than 2 years of tenuresqlsetconnectattr 1 SQL_ATTR_DATE_FMT SQL_IBMi_FMT_EURsqlsetconnectattr 1 SQL_ATTR_DATE_SEP SQL_SEP_PERIODsqlexecdirect 1 “SELECT EMPNO FROM CORPDATA.EMP WHERE HIREDATE > ‘09.23.2013‘ – 2 YEARSORDER BY LASTNAME, FIRSTNME, MIDINIT" -3

DB2 Connect – Date and Time format controls

• DB2 Connect V10.5 and IBM i 6.1 & 7.1 have been enhanced to provide DATE/TIME/DECIMAL format & separator control by supporting new environment level and connection level attributes.

DB2 Connect 10.5 release

DB2 PTF Group SF99701 Level 25SF99601 Level 30

DB2 Connect7.1

Time format values:SQL_IBMi_FMT_HMSSQL_IBMi_FMT_ISOSQL_IBMi_FMT_USASQL_IBMi_FMT_EURSQL_IBMi_FMT_JIS

Time separator values:SQL_SEP_COLONSQL_SEP_PERIODSQL_SEP_COMMASQL_SEP_BLANKSQL_SEP_JOB

Decimal separator values:SQL_SEP_PERIODSQL_SEP_COMMASQL_SEP_JOB

Attribute names:SQL_ATTR_DATE_FMTSQL_ATTR_DATE_SEPSQL_ATTR_TIME_FMTSQL_ATTR_TIME_SEPSQL_ATTR_DECIMAL_SEP

Date format values:SQL_IBMi_FMT_YMDSQL_IBMi_FMT_MDYSQL_IBMi_FMT_DMYSQL_IBMi_FMT_JULSQL_IBMi_FMT_ISOSQL_IBMi_FMT_EURSQL_IBMi_FMT_JISSQL_IBMi_FMT_USA

Date separator values:SQL_SEP_SLASHSQL_SEP_COMMASQL_SEP_PERIODSQL_SEP_BLANKSQL_SEP_DASHSQL_SEP_JOB

Page 13: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation13 DB2 for i – Update

DB2 for i – Navigator Enhancements

Page 14: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation14 DB2 for i – Update

Navigator – DB2 for i enhancements with TR7

More reasons to use Navigator

Navigator feature Improvement1. DB2 Health Center � Integrate System Limits2. Generate SQL � New options for modernizing DDS to SQL

3. Database Maintenance � Improved Index Build information

4. View Journal Entries �Improved ability to study Audit and Data journals5. SQL Performance Monitors � Review I/O activity by Program

6. OmniFind � New controls to Add Objects to a Text Search

collection (Browser based Navigator only)

Page 15: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation15 DB2 for i – Update

DB2 Health Center - Tracking System Limits

Tracking of System Limits is integrated into the DB2 Health Center.

IBM HTTP SERVER FOR i PTF Group (7.1) - SF99368 Level 22

IBM Navigator for i (browser)

DB2 PTF Group SF99701 Level 26

DB2 PTF Group SF99601 Level 31

7.16.1

IBM i Access Windows TR7-timed Service Pack for

7.1

IBM i Navigator (installed client)

Page 16: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation16 DB2 for i – Update

New Generate SQL option for Modernization

Generate additional indexes option – views & indexes

Page 17: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation17 DB2 for i – Update

Navigator – Improved ability to mine Journals

IBM i Navigator.lnk

Enhancements for QAUDJRN – New default columns displayed

– New columns to identify the object

– Search capability for object names is based on the names in the Entry Specific Data

• Object type• Generic library name• Generic file name

– Search capability for IFS names (or any other column) available in the “Additional filters” box

Enhancements for data journals – New default columns displayed

– New columns to identify the IFS objects

– Search capability for object names is based on the Journal ID (existing support)

– Search capability for IFS names (or any other column) available in the “Additional filters” box

DB2 PTF Group SF99701 Level 26

7.1

IBM i Access Windows TR7-timed Service Pack for

7.1

IBM i Navigator (installed client)

IBM HTTP SERVER FOR i PTF Group (7.1) - SF99368 Level 22

IBM Navigator for i (browser)

Page 18: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation18 DB2 for i – Update

Navigator – Enhancements to View Entries…

• Graphical alternative to the DISPLAY_JOURNAL() UDTF

• Easy to work with entries, reorder by column and un derstand the entry specific data!

Page 19: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation19 DB2 for i – Update

Navigator – Enhancements to View Entries…

• Select the Columns… button to see & add the new colu mns

• Use the Additional filters �Browse button to see filter names

Page 20: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation20 DB2 for i – Update

Enhanced Analyze Program Summary detail

To see a break-down of I/O activity by Program Name:1) Analyze a SQL Performance Monitor

2) Choose the Program Summary

DB2 PTF Group SF99701 Level 26

DB2 PTF Group SF99601 Level 30

7.16.1

Page 21: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation21 DB2 for i – Update

Navigator – OmniFind Collection management

� OmniFind – New controls to Add Objects to a Text Search collection. (Browser based Navigator only)i. IFS sub-directories check boxii. Multiple Member Source Physical Files

Easily add more objects to your search target (collection)

IBM HTTP SERVER FOR i PTF Group (7.1) - SF99368 Level 22

IBM Navigator for i (browser)

Page 22: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation22 DB2 for i – Update

Plan Cache properties – Greater insight & control• Autosizing enhancement

– The default hit ratio changes from 70%�90%– The maximum size allowed for autosizing, which was previously set to a hard

coded value, is now calculated based on partition size.

• Slowest runs information. Plan Cache Activity Thresh olds• Default values now show as *DEFAULT or *AUTO• Temporary object storage information

DB2 PTF Group SF99701 Level 26

7.1

Customizable

• Maximum Autosize

• Target hit ratio

• # of longest runs to keep

Page 23: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation23 DB2 for i – Update

DB2 for i – Security Enhancements

Page 24: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation24 DB2 for i – Update

Observe Authorization List impact on database object access

DB2 PTF Group SF99701 Level 25

DB2 PTF Group SF99601 Level 30

7.16.1

• Authorization lists are a useful security mechanism to control object access with a minimum of administration.

• Database authorization catalogs have been extended to indicate the name of the authorization list related to user access to objects

*PGM & *SRVPGM – Procedures and Functions

QSYS2/SYSROUTINEAUTH

*XSROBJ – XML Schema RepositoriesQSYS2/SYSXSROBJECTAUTH

*LIB - SchemasQSYS2/SYSSCHEMAAUTH

ColumnsQSYS2/SYSCOLAUTH

*SRVPGM – Global VariablesQSYS2/SYSVARIABLEAUTH

*DTAARA - SequencesQSYS2/SYSSEQUENCEAUTH

*FILE - TablesQSYS2/SYSTABAUTH

*SQLUDT – User Defined TypesQSYS2/SYSUDTAUTH

*SQLPKG - PackagesQSYS2/SYSPACKAGEAUTH

Object informationCatalogExample:SELECT GRANTEE, TABLE_NAME, PRIVILEGE_TYPE, AUTHORIZATION_LIST FROM QSYS2.SYSTABAUTH WHERE TABLE_SCHEMA = 'TOYSTORE' AND TABLE_NAME = 'STAFF'ORDER BY GRANTEE DESC

7.1 only

7.1 only

Page 25: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation25 DB2 for i – Update

DB2 for i – Database Management Enhancements

Page 26: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation26 DB2 for i – Update

DB2 for i – Deferred Journal Restore

– Support within Restore using Defer ID (DFRID) is extended to include Journals, similar to how Views & MQTs are managed

– Restore will recognize the journal dependency for Database files, Data areas, Data queues & Libraries. Once the dependent Journal is restored, the object or library that deferred start ing journaling will now start journaling

– The Restore Deferred Objects (RSTDFROBJ) command can be called directly using the same DFRID value that was used on RSTOBJ or RSTLIB.

– GO RESTORE option 21 uses Defer ID

DB2 PTF Group SF99701 Level 26

7.1

Page 27: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation27 DB2 for i – Update

DB2 for i – Deferred Journal Restore & BRMS

Backup Recovery and Media Services (BRMS) – No longer need to use OVERRIDE(*YES) and

RCYORDLST(<user-specified-restore-order>)

Page 28: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation28 DB2 for i – Update

Tracking Important System limits – Phase 2

Phase 2 – Instrument additional limits & Integrate i nto IBM i Navigator’s DB2 Health Center

Database category:1. Maximum number of all rows in a partition2. Maximum number of valid rows in a partition3. Maximum number of deleted rows in a partition4. Maximum number of overflow rows in a partition5. Maximum number of variable-length segments6. Maximum number of indexes over a partition

Journal category:1. Maximum size of a 1TB journal receiver2. Maximum number of objects that can be associated with a *MAX10M journal3. Maximum number of objects that can be associated with a *MAX250K journal4. Maximum sequence number for a *MAXOPT3 journal5. Maximum sequence number for a *MAXOPT1 or *MAXOPT2 journal

File System category:Maximum number of object description entries in a library DB2 PTF Group

SF99701 Level 26DB2 PTF Group

SF99601 Level 31

7.16.1

Take a look at the data:SELECT * FROM QSYS2/SYSLIMITS IBM i Access Windows

TR7-timed Service Pack for 7.1

IBM i Navigator (installed client)

IBM HTTP SERVER FOR i PTF Group (7.1) - SF99368 Level 22

IBM Navigator for i (browser)

Page 29: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation29 DB2 for i – Update

RDB alias support for 3-part SQL statements

• Instead of using CREATE ALIAS (SQL) to deploy database transparency, the Relational Database Directory Entry Alias name can be used.

Example – pull daily sales data from different destinations

ADDRDBDIRE RDB(X1423P2 MYALIAS) RMTLOCNAME(X1423P2 *IP) INSERT INTO WORKTABLE SELECT * FROM MYALIAS.SALESLI B.DAILY_SALES

CHGRDBDIRE RDB(LP13UT16 MYALIAS) RMTLOCNAME(LP13UT1 6 *IP) INSERT INTO WORKTABLE SELECT * FROM MYALIAS.SALESLI B.DAILY_SALES

WorkTable

X1423P2

LP13UT16

Note:

The SQL statement text does not change

DB2 PTF Group SF99701 Level 26

7.1

Page 30: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation30 DB2 for i – Update

DB2 for i – Performance Enhancements

Page 31: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation31 DB2 for i – Update

Maximum size of an SQL index increased to 1.7TB

• The maximum size of an SQL index has been increased to 1.7TB• Few indexes approach 1TB today. This enhancement extends an important limit

for VLDB considerations

DB2 PTF Group SF99701 Level 25

7.1

Increased to 1.7 terabytes

• When very large database objects are on the horizon…engage Mike’s team [email protected]

Read this… http://db2fori.blogspot.com/2013/03/living-large.html

Page 32: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation32 DB2 for i – Update

Live movement of DB2 tables and indexes to SSD

• With TR7, the media preference on a DB2 for i Tables, Views & Indexes can be changed without requiring an exclusive, no read lock on the file .

• The change can be made when shared read locks (*SHRRD) exist on the file.

• After *SSD has been specified as the preferred storage media, the file's data will asynchronously move to the SSD.

• This enhancement applies to SQL and IBM i Command interfaces:o ALTER TABLE STORE123.EMPLOYEE ALTER UNIT SSD

o CHGPF FILE(STORE123/EMPLOYEE) UNIT(*SSD)

o CHGLF FILE(STORE123/XEMP2) UNIT(*SSD)

• If you haven’t used SSD’s yet, read these:http://www.ibm.com/developerworks/ibmi/library/i-ssdperformance/index.html&http://db2fori.blogspot.com/2013/08/db2-for-i-hitting-mark-again.html

DB2 PTF Group SF99701 Level 26

DB2 PTF Group SF99601 Level 31

7.16.1

Improved ability to utilize SSDs

Page 33: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation33 DB2 for i – Update

Control blocking for a file using QSYS2/OVERRIDE_TABLE()

• Controlling the blocking size is important for data intensive, performance critical applications.

• The Override with Data Base File (OVRDBF) command can be used to tune sequential read only and write only applications.

• A specific byte count can be supplied or *BUF32KB, *BUF64KB, *BUF128KB, *BUF256KB special values can be specified.

• The new OVERRIDE_TABLE() procedure is an easy approach for SQL applications to control blocking programmatically.

Example usage

-- Override the Employee table to utilize 256K blocking for sequential processingCALL QSYS2.OVERRIDE_TABLE('CORPDATA', 'EMP', '*BUF2 56KB');

-- Discard the overrideCALL QSYS2.OVERRIDE_TABLE('CORPDATA', 'EMP', 0);

DB2 PTF Group SF99701 Level 25

DB2 PTF Group SF99601 Level 30

7.16.1

Page 34: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation34 DB2 for i – Update

DB2 for i - Services

Page 35: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation35 DB2 for i – Update

DB2 for i - Services

• SQL as a Service – the new SAAS– What does “as a Service” imply? Answer: Greater value relalized

• DB2 for i enhancements in TR7 include some exciting Service oriented capabilities

• What these services have in common is that DB2 for i constructs are used to externalize the service

• Dig deeper here: www.developerworks.com/ibmi/techupdates/db2

New Category

Page 36: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation36 DB2 for i – Update

DB2 for i - Services

• Deep details, security configuration, System health, analysis capabilities, and more tasks are possible using SQL on i

Page 37: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation37 DB2 for i – Update

SQL catalogs � Work Management Services

Work Management Services

See developerWorks for more detail:

https://www.ibm.com/developerworks/ibmi/techupdates /db2

Page 38: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation38 DB2 for i – Update

QSYS2/SYSTEM_VALUE_INFO – view

• The new view return the same data as the Retrieve System Values (QWCRSVAL) API• The system value QLOCALE is stored in UCS-2, which is why VARGRAPHIC is used• *ALLOBJ or *AUDIT special authority is required to retrieve the values for QAUDCTL,

QAUDENDACN, QAUDFRCLVL, QAUDLVL, QAUDLVL2, and QCRTOBJAUD(‘*NOTAVL’ or -1 are returned when accessed by an unauthorized user):

Catalog definition:SYSTEM_VALUE_NAME VARCHAR(10) – Name of the system valueCURRENT_NUMERIC_VALUE BIGINT – System value when binary data is returnedCURRENT_CHARACTER_VALUE VARGRAPHIC(1280) – System value when character data is returned

Example: -- Examine the system values related to maximums

SELECT * FROM QSYS2/SYSTEM_VALUE_INFOWHERE SYSTEM_VALUE_NAME LIKE '%MAX%'ORDER BY SYSTEM_VALUE_NAME

DB2 PTF Group SF99701 Level 26

DB2 PTF Group SF99601 Level 31

IBM i 7.1IBM i 6.1

New with TR7

Page 39: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation39 DB2 for i – Update

SQL catalogs � Security Services

Storage Services

See developerWorks for more detail:

https://www.ibm.com/developerworks/ibmi/techupdates /db2

Page 40: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation40 DB2 for i – Update

QSYS2/USER_STORAGE – view

• Built upon the data returned by the Retrieve User Information (QSYRUSRI) API.

• Users see the data for any *USRPRF to which they have *READ authority• User storage is broken down by SYSBAS and iASPs

Example: -- How much storage has user SCOTTF consumed?

SELECT * FROM QSYS2/USER_STORAGE

WHERE USER_NAME = ‘SCOTTF’

DB2 PTF Group SF99701 Level 26

DB2 PTF Group SF99601 Level 31

IBM i 7.1IBM i 6.1

New with TR7

Page 41: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation41 DB2 for i – Update

SQL catalogs � Security Services

Security Services

See developerWorks for more detail:

https://www.ibm.com/developerworks/ibmi/techupdates /db2

Page 42: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation42 DB2 for i – Update

QSYS2/USER_INFO – view

• Built upon the data returned by the Retrieve User Information (QSYRUSRI) API.• Users see the data for any *USRPRF to which they have *READ authority• Setup details, authorizations, its all easily accessed.

Example: -- Which users are having trouble signing on?

SELECT * FROM USER_INFO

WHERE SIGN_ON_ATTEMPTS_NOT_VALID > 0

DB2 PTF Group SF99701 Level 26

DB2 PTF Group SF99601 Level 31

IBM i 7.1IBM i 6.1

New with TR7

Page 43: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation43 DB2 for i – Update

QSYS2/FUNCTION_USAGE – view

• The detail returned corresponds to the data returned by the Retrieve Function Usage Information(QSYRTFUI, QsyRetrieveFunctionUsageInfo) API.

• Only users with *SECADM user special authority can examine the function usage configuration details returned with this view. Users without *SECADM authority who attempt to reference this view will get SQLCODE -443.

• Each row corresponds with users or groups that have function usage settings

Example:

-- What function usage has been granted or revoked?

SELECT * FROM QSYS2/FUNCTION_USAGE ORDER BY FUNCTIO N_ID, USER_NAME

DB2 PTF Group SF99701 Level 26

DB2 PTF Group SF99601 Level 31

IBM i 7.1IBM i 6.1

New with TR7

Page 44: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation44 DB2 for i – Update

SQL catalogs � Command Services

Command Services

Page 45: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation45 DB2 for i – Update

QSYS2/QCMDEXC – Procedure

BaseBase

IBM i 7.1IBM i 6.1

The QCMDEXC procedure can be used within SQL applications to easily execute CL Commands.

Examples: • DECLARE V_CPYLIB_COMMAND VARCHAR(500);

DECLARE V_CPYLIB_LEN DECIMAL(15, 5);SET V_CPYLIB_COMMAND = 'CPYLIB FROMLIB(' CONCAT RTRIM(V_LIBRARY) CONCAT ') TOLIB(' CONCAT RTRIM(V_NEW_LIBRARY) CONCAT ') DATA(*NO)‘;SET V_CPYLIB_LEN = CHARACTER_LENGTH(V_CPYLIB_COMMAND);CALL QSYS2/QCMDEXC(V_CPYLIB_COMMAND, V_CPYLIB_LEN);

• CALL QSYS2/QCMDEXC('ADDLIBLE PRODLIB2',17);

• Length argument no longer required:CALL QSYS2/QCMDEXC('ADDLIBLE PRODLIB2');

DB2 PTF Group SF99701 Level 25

DB2 PTF Group SF99601 Level 30

IBM i 7.1IBM i 6.1

New with TR7

Page 46: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation46 DB2 for i – Update

Technology Refresh 8 – Digging deeper

DB2 for i – data model management improvements• Generate DDL source using SQL• CREATE TABLE tolerates out of order partition ranges

• SQL procedure to restart identity values

Performance & Analysis just got easier• Faster Toolbox JDBC driver support for blocked INSERTs

• Use SQL to find the most expensive queries in the SQL Plan Cache• Extract statements from an SQL Plan Cache snapshot using SQL

• New DB2 for i catalogs - observe SQL statement level statistics

• DRDA connections imprinted with client special register values• and others…

IBM i Navigator “ease of use” improvements

Page 47: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation47 DB2 for i – Update

DB2 for iPerformance & Analysis improvements

Page 48: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation48 DB2 for i – Update

Finding the most expensive queries

Everyone sees value in reviewing the most expensive queries. While “most expensive” can be interpreted in many ways, the total elapsed time needed to execute the query is the best place to start. The QSYS2.DUMP_PLAN_CACHE_topN procedure provides an SQL interface to programmatically mine the live SQL Plan Cache.

Example:

CALL QSYS2.DUMP_PLAN_CACHE_topN ('SNAPSHOTS', 'TOPN020214', 20);select qqc21,DEC(QQI6)/1000000.0 as Total_time,QVC102 as Current_User_Profile, qq1000 from SNAPSHOTS.TOPN020214 where qqrid=1000 order by qqi6 desc;

DB2 PTF Group SF99701 Level 29

7.1

Parameters:1) OUTPUT_LIBRARY varchar(10)2) OUTPUT_TABLE varchar(10)

3) Top_N_Choice INTEGER

Automate

using

SQL

Page 49: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation49 DB2 for i – Update

Programmatic consumption of Snapshots

SQL Performance Monitors and SQL Plan Cache snapshots contain extensive detail about database activity. Today, the primary benefactor of this detail is the DBA or DB performance analyst who is using IBM i Navigator to graphically analyze the activity.

The QSYS2/EXTRACT_STATEMENTS procedure provides an SQL interface to pull out the important / deep details.

Example – Extract the 100 most recent statementsCALL QSYS2.DUMP_PLAN_CACHE('SNAPSHOTS', 'SNAP020114');

CALL QSYS2.EXTRACT_STATEMENTS('SNAPSHOTS', 'SNAP020114', '*AUDIT',

'AND QQC21 NOT IN

(''CH'', ''CL'', ''CN'', ''DE'', ''DI'', ''DM'', ''HC'', ''HH'', ''JR'', ''FE'', ''PD'', ''PR'', ''PD'')',

' ORDER BY QQSTIM DESC FETCH FIRST 100 ROWS ONLY ',

null, null);

DB2 PTF Group SF99601 Level 32

6.1

DB2 PTF Group SF99701 Level 28

7.1

Parameters:1) MONITOR_SCHEMA varchar(10) - required

2) MONITOR_NAME varchar(10) - required

Optional parameters…

3) ADDITIONAL_SELECT_COLUMNSvarchar(5000). A value of *AUDIT will cause the procedure to return the merged statement and columns that are normally interesting to auditing

4) ADDITIONAL_PREDICATES varchar(5000)

5) ORDER_BY varchar(5000)

6) OUTPUT_SCHEMA varchar(258)

7) OUTPUT_TABLE varchar(258)

If parameters 6&7 are not specified, a result set is returned

Page 50: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation50 DB2 for i – Update

Programmatic consumption of Snapshots

Example – Extract the 10 queries with the longest ru ntime, where the query took > 1 secondCALL QSYS2.DUMP_PLAN_CACHE('SNAPSHOTS', 'SNAP020114');

CALL QSYS2.EXTRACT_STATEMENTS('SNAPSHOTS', 'SNAP020114',

ADDITIONAL_SELECT_COLUMNS => ‘DEC(QQI6)/1000000.0 as Total_time, QVC102 as Current_User_Profile ',

ADDITIONAL_PREDICATES => ' AND QQI6 > 1000000 ',

ORDER_BY => ' ORDER BY QQI6 DESC ');Coding guide:http://bit.ly/1000rcdFieldsNote: Extraction takes time, this is not a quick operation

Page 51: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation51 DB2 for i – Update

Improved Toolbox JDBC driver support for blocked IN SERTs

• Prior to this enhancement, the driver did not take advantage of the variable length information on blocked inserts (it already did on data retrieval).

• This enhancement improves blocked insert efficiency when inserting into VARCHAR and VARBINARY columns when using "batched insert".

• CLOBs cannot be used with "batched insert", so CLOBs cannot take advantage of this support.

• If you explicitly specify “true” on the “variable field compression” property , you’ll need to change to receive the enhancement.

DB2 PTF Group SF99701 Level 29

7.1

Page 52: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation52 DB2 for i – Update

New statistical catalogs for SQL statement level deta ils

• In the tradition of providing DB2 for i statistical catalogs per object type, new catalogs are being added to show statement level detail

• The QSYS2/SYSPACKAGESTMTSTAT operates upon *SQLPKG object types, surfacing details about prepared SQL statements such as the # of executions and much more…

• The QSYS2/SYSPROGRAMSTMTSTAT operates upon *PGM and *SRVPGM object types, surfacing details about embedded SQL statements such as the # of times an Access Plan has been rebuilt and more…

DB2 PTF Group SF99701 Level 29

7.1Number of times the Access Plan has been rebuilt

And many more elements…

Number of times stmt has been executed

Statement Text

Statement Name

Object Type

Object Library

Object Name

QSYS2/SysPackageStmtStat & QSYS2/SysProgramStmtStat columns

Page 53: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation53 DB2 for i – Update

DB2 for iData model management improvements

Page 54: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation54 DB2 for i – Update

Generate DDL source using SQL

• Today, SQL DDL can be generated for existing objects using IBM i Navigator’s Generate SQL… or via the Generate Data Definition Language (QSQGNDDL) API .With IBM i 7.1 in the TR8 timeframe, an SQL approach is now possible!

• The QSYS2/GENERATE_SQL() procedure can be called to generate DDL for one or more objects.• The procedure has many parameters (33 of them), but leverages DB2 for i support for defaults on parameters. • Use the API documentation to understand the required privileges and procedure parameters: http://bit.ly/QSQGNDDL•The generated DDL can be written to a user specified output file or consumed as a result set.

• Since this is an SQL procedure, SQLCODE=-443 is a generic indicator of failure.

• If the object name is delimited, the delimited name needs to be input.• Either the SQL name or System name is permitted on input.

• The procedure handles generic names, something unique to this interface.

DB2 PTF Group SF99701 Level 28

7.c1

SQL interfaces are easy to use and powerful

Page 55: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation55 DB2 for i – Update

Generate DDL source using SQL

Example 1: Generate DDL for all tables within a sch ema, returned as a RScall qsys.create_sql_sample('SAMPLE_CORPORATE_DB'); -- creates library SAMPL00001

call qsys2.generate_sq l ('%', 'SAMPLE_%', 'TABLE', REPLACE_OPTION => '0');

(these calls generate the same detail)call qsys2.generate_sql ('%', 'SAMPL00001', 'TABLE', REPLACE_OPTION => '0');

Page 56: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation56 DB2 for i – Update

Generate DDL source using SQL

Example 2: Generate DDL for all indexes starting wi th ‘X’ within a schema, place the output in a filecall qsys2.qcmdexc('CRTLIB DDLSOURCE');

call qsys2.qcmdexc('CRTSRCPF FILE(DDLSOURCE/GEN020314) RCDLEN(92)');

call qsys2.qcmdexc('ADDPFM FILE(DDLSOURCE/GEN020314) MBR(INDEXSRC)');

call qsys2.generate_sql ('X%', 'SAMPLE_CORPORATE_DB', 'INDEX', 'GEN020314', 'DDLSOURCE', 'INDEXSRC', REPLACE_OPTION => '0');

create alias qtemp.ddl_1 for DDLSOURCE/GEN020314(INDEXSRC);select * from qtemp.ddl_1;

Page 57: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation57 DB2 for i – Update

DB2 for i – Name delimiting function

• SQL Catalogs store names in un-delimited form• Most SQL statements and services require that input names be properly delimited.• The QSYS2/DELIMIT_NAME() User Defined Function (UDF ) is a new DB2 for i supplied service that can be used to insure a name is ready for use.• Delimiters are only added if needed.• Input InName VARCHAR(128) & RETURNS VARCHAR(258)Example:SELECT TABLE_NAME , QSYS2.DELIMIT_NAME(TABLE_NAME) AS TABLE_NAME_DELIMITED FROM QSYS2.SYSTABLES ORDER BY TABLE_NAME

DB2 PTF Group SF99701 Level 28

7.1

Page 58: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation58 DB2 for i – Update

Enhanced ability to copy tables with identity colum ns

• Identity value columns are guaranteed to contain a unique value.• When tables are copied with INCLUDING IDENTITY COLUMN ATTRIBUTES or via CL commands like Copy File (CPYF), the next value for the identity column is the defined first value• In many cases, the Database Engineer (DBE) would prefer to have the new table use the same “next value” as the source table.

• Now, you can easily reestablish the identity value using the QSYS2/RESTART_IDENTITY() procedure. The procedure calculates the NEXT VALUE of the source file’s identity value and alters the target file to match.

Procedure signature:CALL QSYS2.RESTART_IDENTITY(<source-library-name>, <source-file-name>,

<target-library-name>, <target-file-name>);

DB2 PTF Group SF99601 Level 32

6.1

DB2 PTF Group SF99701 Level 28

7.1

Page 59: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation59 DB2 for i – Update

QSYS2/GET_JOB_INFO() � enhanced

• GET_JOB_INFO() enhanced to accept ‘*’ to indicate that the current job as the target

• The UDTF table is enhanced to include the most recently executed (or currently executing) SQL statement text

Example 1) Get job information for the current jobselect a.* from table(qsys2.get_job_info('*')) a;

Example 2) Get job information for the current jobselect a.* from table(qsys2.get_job_info('803868/Quser/Qzdasoinit')) a;

DB2 PTF Group SF99701 Level 29

DB2 PTF Group SF99601 Level 32

IBM i 7.1IBM i 6.1

Page 60: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation60 DB2 for i – Update

SQL catalogs � Landscape view

Landscape

Page 61: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation61 DB2 for i – Update

SYSCATALOGS

INFORMATION_SCHEMA_CATALOG_NAME

Catalogs

IBMIBM®® DB2DB2®® for i Catalogsfor i Catalogs

SQLSCHEMAS

SCHEMATA

Schemas

SYSSCHEMAS

SYSCHKCSTSYSCSTSYSCSTCOLSYSCSTDEPSYSKEYCSTSYSREFCST

SQLFOREIGNKEYSSQLPRIMARYKEYS

CHECK_CONSTRAINTS REFERENTIAL_CONSTRAINTSTABLE_CONSTRAINTS

Constraints

SYSCOLUMNSSYSCOLUMNS2SYSFIELDSSYSINDEXESSYSKEYSSYSTABLEDEPSYSTABLESSYSVIEWDEPSYSVIEWS

SQLCOLUMNSSQLSPECIALCOLUMNSSQLTABLES

COLUMNSTABLESVIEWS

Tables Views Indexes

SYSTRIGCOLSYSTRIGDEPSYSTRIGGERSSYSTRIGUPD

Triggers SYSPACKAGESYSSEQUENCESSYSTYPESSYSVARIABLEDEPSYSVARIABLES

SQLTYPEINFOSQLUDTS

USER_DEFINED_TYPES

Miscellaneous Objects

SYSFUNCSSYSJARCONTENTSSYSJAROBJECTSSYSPARMSSYSPROCSSYSROUTINEDEPSYSROUTINES

SQLFUNCTIONCOLSSQLFUNCTIONSSQLPROCEDURECOLSSQLPROCEDURES

PARAMETERSROUTINES

Routines Statistics

SYSCOLUMNSTATSYSINDEXSTATSYSMQTSTATSYSPACKAGESTATSYSPACKAGESTMTSTATSYSPARTITIONDISKSYSPARTITIONINDEXESSYSPARTITIONINDEXDISKSYSPARTITIONINDEXSTATSYSPARTITIONMQTSSYSPARTITIONSTATSYSPROGRAMSTATSYSPROGRAMSTMTSTATSYSTABLEINDEXSTATSYSTABLESTAT

SQLSTATISTICS

DB2 for i catalog views (QSYS2)

ODBC and JDBC TM catalog views (SYSIBM)

ANS and ISO catalog views (QSYS2)

SQL_FEATURESSQL_LANGUAGESSQL_SIZINGCHARACTER_SETS

Database Support

XSRANNOTATIONINFOXSROBJECTCOMPONENTSXSROBJECTHIERARCHIESXSROBJECTS

XML Schemas

Privileges

SQLCOLPRIVILEGESSQLTABLEPRIVILEGES

AUTHORIZATIONSROUTINE_PRIVILEGESUDT_PRIVILEGESUSAGE_PRIVILEGESVARIABLE_PRIVILEGES

SYSCOLAUTHSYSPACKAGEAUTHSYSROUTINEAUTHSYSSCHEMAAUTHSYSSEQUENCEAUTHSYSTABAUTHSYSUDTAUTHSYSVARIABLEAUTHSYSXSROBJECTAUTH

Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.Other company, product or service names may be trademarks or service marks of others.

http://www.ibm.com/systems/i/software/db2/

Page 62: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation62 DB2 for i – Update

SYSTOOLS.ACT_ON_INDEX_ADVICE - PROCEDURESYSTOOLS.HARVEST_INDEX_ADVICE - PROCEDURE

QSYS2.OVERRIDE_QAQQINI - PROCEDUREQSYS2.RESET_TABLE_INDEX_STATISTICS -

PROCEDUREQSYS2.SYSIXADV - TABLE

SYSTOOLS.REMOVE_INDEXES - PROCEDURE

Performance Services

QSYS2.HEALTH_ACTIVITYQSYS2.HEALTH_DATABASE_OVERVIEWQSYS2.HEALTH_DESIGN_LIMITSQSYS2.HEALTH_ENVIRONMENTAL_LIMITSQSYS2.HEALTH_SIZE_LIMITSQSYS2.RESET_ENVIRONMENTAL_LIMITS

Health Center Procedures PTF Services

QSYS2.PTF_INFO - VIEWQSYS2.GROUP_PTF_INFO - VIEW

DB2 for i Services

IBM i Services

http://www.ibm.com/developerworks/ibmi/db2

QSYS2.CANCEL_SQLQSYS2.DUMP_SQL_CURSORSQSYS2.EXTRACT_STATEMENTSQSYS2.FIND_AND_CANCEL_QSQSRVR_SQLQSYS2.FIND_QSQSRVR_JOBSQSYS2.GENERATE_SQLQSYS2.RESTART_IDENTITYSYSTOOLS.CHECK_CSTSYSTOOLS.CHECK_SYSROUTINE

Utility Procedures Security Services

QSYS2.FUNCTION_INFO – VIEWQSYS2.FUNCTION_USAGE – VIEW

QSYS2.GROUP_PROFILE_ENTRIES – VIEWSYSPROC.SET_COLUMN_ATTRIBUTE - PROCEDURE

QSYS2.SQL_CHECK_AUTHORITY - UDFQSYS2.USER_INFO – VIEW

TCP/IP Services

QSYS2.TCPIP_INFO - VIEWSYSIBMADM.ENV_SYS_INFO - VIEW

Work Management Services

QSYS2.SYSTEM_VALUE_INFO - VIEWQSYS2.GET_JOB_INFO - UDTF

QSYS2.CHANGE_PLAN_CACHE_SIZEQSYS2.DUMP_PLAN_CACHEQSYS2.DUMP_PLAN_CACHE_PROPERTIESQSYS2.DUMP_PLAN_CACHE_topNQSYS2.END_ALL_PLAN_CACHE_EVENT_MONITORSQSYS2.END_PLAN_CACHE_EVENT_MONITORQSYS2.START_PLAN_CACHE_EVENT_MONITOR (2)

Plan Cache Procedures

System Health Services

QSYS2.SYSLIMTBL - TABLEQSYS2.SYSLIMITS – VIEW

QSYS2.OVERRIDE_TABLE – PROCEDUREQSYS2.DELIMIT_NAME – UDF

SYSPROC.WLM_SET_CLIENT_INFO – PROCEDURE

Application Services

Journal Services

QSYS2.DISPLAY_JOURNAL - UDTF

Storage Services

QSYS2.SYSDISKSTAT – VIEWQSYS2.USER_STORAGE – VIEW

Object Services

QSYS2.OBJECT_STATISTICS – UDTF

IBMIBM®® DB2DB2®® for i Servicesfor i Services

QSYS2.QCMDEXC - PROCEDURE

Page 63: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation63 DB2 for i – Update

DB2 for i – Navigator Enhancements

Page 64: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation64 DB2 for i – Update

Navigator – what database users need to know

Time-based performance metrics for SQLOmniFind administration

Run SQL ScriptsVisual explain

Database differences

http://www-912.ibm.com/s_dir/SLINE003.NSF/PTFbyNumber/SF99368

http://www-912.ibm.com/s_dir/SLINE003.NSF/PTFbyNumber/SF99115

http://www-03.ibm.com/systems/power/software/i/access/windows_sp.html

Webpage to watch

May 30, 2014 � IBM i 7.1 TR8May 30, 2014 �IBM i 7.1 TR8

Next (planned) Update

Most features are identical, including TRx enhancements

Most features are identical, including TRx enhancements

Database commonality

IBM HTTP SERVER FOR i PTF Group:7.1 - SF99368 Level 24 � TR76.1 - SF99115 Level 35

IBM i Access Windows Service Pack7.1 – SI50567 � TR7

Recent service level?

Browser Served from IBM i 6.1 or 7.1

Windows PC InstallWhere does it run?

IBM Navigator for iIBM i Navigator(aka System i Navigator)

What are the choices?

Page 65: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation65 DB2 for i – Update

DB2 for i – Navigator Enhancements in IBM i 7.1 TR8

Preference control to ‘Retrieve all rows when populating the list’

Database folders

Ability to launch multiple explains in one actionVisual Explain

Options � ‘Allow Save Results’ will enable result sets from CALL statements to be saved

Run SQL Scripts

ImprovementNavigator feature

Page 66: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation66 DB2 for i – Update

IBM i 7.1 – Where to Find More Details on DB2 for i• developerWorks (re-designed)

– DB2 for i enhancements: https://www.ibm.com/developerworks/ibmi/techupdates/db2– DB2 for i forum: http://www.ibm.com/developerworks/forums/forum.jspa?forumID=292– Technical articles, and more… https://www.ibm.com/developerworks/ibmi/

• Blog– Mike Cain: http://db2fori.blogspot.ca/2013/10/seven.html

• Twitter– Scott Forstie: https://twitter.com/Forstie_IBMi

Page 67: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation67 DB2 for i – Update

This document was developed for IBM offerings in the United States as of the date of publication. IBM may not make these offerings available in other countries, and the information is subject to change without notice. Consult your local IBM business contact for information on the IBM offerings available in your area.

Information in this document concerning non-IBM products was obtained from the suppliers of these products or other public sources. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.

IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. Send license inquires, in writing, to IBM Director of Licensing, IBM Corporation, New Castle Drive, Armonk, NY 10504-1785 USA.

All statements regarding IBM future direction and intent are subject to change or withdrawal without notice, and represent goals and objectives only.

The information contained in this document has not been submitted to any formal IBM test and is provided "AS IS" with no warranties or guarantees either expressed or implied.

All examples cited or described in this document are presented as illustrations of the manner in which some IBM products can be used and the results that may be achieved. Actual environmental costs and performance characteristics will vary depending on individual client configurations and conditions.

IBM Global Financing offerings are provided through IBM Credit Corporation in the United States and other IBM subsidiaries and divisions worldwide to qualified commercial and government clients. Rates are based on a client's credit rating, financing terms, offering type, equipment type and options, and may vary by country. Other restrictions may apply. Rates and offerings are subject to change, extension or withdrawal without notice.

IBM is not responsible for printing errors in this document that result in pricing or information inaccuracies.

All prices shown are IBM's United States suggested list prices and are subject to change without notice; reseller prices may vary.

IBM hardware products are manufactured from new parts, or new and serviceable used parts. Regardless, our warranty terms apply.

Any performance data contained in this document was determined in a controlled environment. Actual results may vary significantly and are dependent on many factors including system hardware configuration and software design and configuration. Some measurements quoted in this document may have been made on development-level systems. There is no guarantee these measurements will be the same on generally-available systems. Some measurements quoted in this document may have been estimated through extrapolation. Users of this document should verify the applicable data for their specific environment.

Revised September 26, 2006

Special notices

67

Page 68: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation68 DB2 for i – Update

IBM, the IBM logo, ibm.com AIX, AIX (logo), AIX 5L, AIX 6 (logo), AS/400, BladeCenter, Blue Gene, ClusterProven, DB2, ESCON, i5/OS, i5/OS (logo), IBM Business Partner (logo), IntelliStation, LoadLeveler, Lotus, Lotus Notes, Notes, Operating System/400, OS/400, PartnerLink, PartnerWorld, PowerPC, pSeries, Rational, RISC System/6000, RS/6000, THINK, Tivoli, Tivoli (logo), Tivoli Management Environment, WebSphere, xSeries, z/OS, zSeries, Active Memory, Balanced Warehouse, CacheFlow, Cool Blue, IBM Systems Director VMControl, pureScale, TurboCore, Chiphopper, Cloudscape, DB2 Universal Database, DS4000, DS6000, DS8000, EnergyScale, Enterprise Workload Manager, General Parallel File System, , GPFS, HACMP, HACMP/6000, HASM, IBM Systems Director Active Energy Manager, iSeries, Micro-Partitioning, POWER, PowerExecutive, PowerVM, PowerVM (logo), PowerHA, Power Architecture, Power Everywhere, Power Family, POWER Hypervisor, Power Systems, Power Systems (logo), Power Systems Software, Power Systems Software (logo), POWER2, POWER3, POWER4, POWER4+, POWER5, POWER5+, POWER6, POWER6+, POWER7, System i, System p, System p5, System Storage, System z, TME 10, Workload Partitions Manager and X-Architecture are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol (® or ™), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries.

A full list of U.S. trademarks owned by IBM may be found at: http://www.ibm.com /legal/copytrade.shtml.

Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or other countries.AltiVec is a trademark of Freescale Semiconductor, Inc.AMD Opteron is a trademark of Advanced Micro Devices, Inc.InfiniBand, InfiniBand Trade Association and the InfiniBand design marks are trademarks and/or service marks of the InfiniBand Trade Association. Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.IT Infrastructure Library is a registered trademark of the Central Computer and Telecommunications Agency which is now part of the Office of Government Commerce.Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.Linear Tape-Open, LTO, the LTO Logo, Ultrium, and the Ultrium logo are trademarks of HP, IBM Corp. and Quantum in the U.S. and other countries.Linux is a registered trademark of Linus Torvalds in the United States, other countries or both.Microsoft, Windows and the Windows logo are registered trademarks of Microsoft Corporation in the United States, other countries or both.NetBench is a registered trademark of Ziff Davis Media in the United States, other countries or both.SPECint, SPECfp, SPECjbb, SPECweb, SPECjAppServer, SPEC OMP, SPECviewperf, SPECapc, SPEChpc, SPECjvm, SPECmail, SPECimap and SPECsfs are trademarks of the Standard Performance Evaluation Corp (SPEC).The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org.TPC-C and TPC-H are trademarks of the Transaction Performance Processing Council (TPPC).UNIX is a registered trademark of The Open Group in the United States, other countries or both.

Other company, product and service names may be trademarks or service marks of others.

Revised December 2, 2010

Special notices (cont.)

68

Page 69: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation69 DB2 for i – Update

The IBM benchmarks results shown herein were derived using particular, well configured, development-level and generally-available computer systems. Buyers should consult other sources of information to evaluate the performance of systems they are considering buying and should consider conducting application oriented testing. For additional information about the benchmarks, values and systems tested, contact your local IBM office or IBM authorized reseller or access the Web site of the benchmark consortium or benchmark vendor.

IBM benchmark results can be found in the IBM Power Systems Performance Report at http://www.ibm.com/systems/p/hardware/system_perf.html .

All performance measurements were made with AIX or AIX 5L operating systems unless otherwise indicated to have used Linux. For new and upgraded systems, the latest versions of AIX were used. All other systems used previous versions of AIX. The SPEC CPU2006, LINPACK, and Technical Computing benchmarks were compiled using IBM's high performance C, C++, and FORTRAN compilers for AIX 5L and Linux. For new and upgraded systems, the latest versions of these compilers were used: XL C for AIX v11.1, XL C/C++ for AIX v11.1, XL FORTRAN for AIX v13.1, XL C/C++ for Linux v11.1, and XL FORTRAN for Linux v13.1.

For a definition/explanation of each benchmark and the full list of detailed results, visit the Web site of the benchmark consortium or benchmark vendor.

TPC http://www.tpc.orgSPEC http://www.spec.orgLINPACK http://www.netlib.org/benchmark/performance.pdfPro/E http://www.proe.comGPC http://www.spec.org/gpcVolanoMark http://www.volano.comSTREAM http://www.cs.virginia.edu/stream/SAP http://www.sap.com/benchmark/Oracle, Siebel, PeopleSoft http://www.oracle.com/apps_benchmark/Baan http://www.ssaglobal.comFluent http://www.fluent.com/software/fluent/index.htmTOP500 Supercomputers http://www.top500.org/Ideas International http://www.ideasinternational.com/benchmark/bench.htmlStorage Performance Council http://www.storageperformance.org/results

Revised December 2, 2010

Notes on benchmarks and values

69

Page 70: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation70 DB2 for i – Update

Revised December 2, 2010

Notes on HPC benchmarks and values

The IBM benchmarks results shown herein were derived using particular, well configured, development-level and generally-available computer systems. Buyers should consult other sources of information to evaluate the performance of systems they are considering buying and should consider conducting application oriented testing. For additional information about the benchmarks, values and systems tested, contact your local IBM office or IBM authorized reseller or access the Web site of the benchmark consortium or benchmark vendor.

IBM benchmark results can be found in the IBM Power Systems Performance Report at http://www.ibm.com/systems/p/hardware/system_perf.html .

All performance measurements were made with AIX or AIX 5L operating systems unless otherwise indicated to have used Linux. For new and upgraded systems, the latest versions of AIX were used. All other systems used previous versions of AIX. The SPEC CPU2006, LINPACK, and Technical Computing benchmarks were compiled using IBM's high performance C, C++, and FORTRAN compilers for AIX 5L and Linux. For new and upgraded systems, the latest versions of these compilers were used: XL C for AIX v11.1, XL C/C++ for AIX v11.1, XL FORTRAN for AIX v13.1, XL C/C++ for Linux v11.1, and XL FORTRAN for Linux v13.1. Linpack HPC (Highly Parallel Computing) used the current versions of the IBM Engineering and Scientific Subroutine Library (ESSL). For Power7 systems, IBM Engineering and Scientific Subroutine Library (ESSL) for AIX Version 5.1 and IBM Engineering and Scientific Subroutine Library (ESSL) for Linux Version 5.1 were used.

For a definition/explanation of each benchmark and the full list of detailed results, visit the Web site of the benchmark consortium or benchmark vendor.SPEC http://www.spec.orgLINPACK http://www.netlib.org/benchmark/performance.pdfPro/E http://www.proe.comGPC http://www.spec.org/gpcSTREAM http://www.cs.virginia.edu/stream/Fluent http://www.fluent.com/software/fluent/index.htmTOP500 Supercomputers http://www.top500.org/AMBER http://amber.scripps.edu/FLUENT http://www.fluent.com/software/fluent/fl5bench/index.htmGAMESS http://www.msg.chem.iastate.edu/gamessGAUSSIAN http://www.gaussian.comANSYS http://www.ansys.com/services/hardware-support-db.htm

Click on the "Benchmarks" icon on the left hand side frame to expand. Click on "Benchmark Results in a Table" icon for benchmark results.ABAQUS http://www.simulia.com/support/v68/v68_performance.phpECLIPSE http://www.sis.slb.com/content/software/simulation/index.asp?seg=geoquest&MM5 http://www.mmm.ucar.edu/mm5/MSC.NASTRAN http://www.mscsoftware.com/support/prod%5Fsupport/nastran/performance/v04_sngl.cfmSTAR-CD www.cd-adapco.com/products/STAR-CD/performance/320/index/htmlNAMD http://www.ks.uiuc.edu/Research/namdHMMER http://hmmer.janelia.org/

http://powerdev.osuosl.org/project/hmmerAltivecGen2mod

70

Page 71: DB2 for i - Update for SEMIUG and WMSUGObserve Authorization List impact on database object access DB2 PTF Group SF99701 Level 25 DB2 PTF Group SF99601 Level 30 6.1 7.1 • Authorization

© 2014 IBM Corporation71 DB2 for i – Update

Revised April 2, 2007

Notes on performance estimates

rPerf for AIX

rPerf (Relative Performance) is an estimate of commercial processing performance relative to other IBM UNIX systems. It is derived from an IBM analytical model which uses characteristics from IBM internal workloads, TPC and SPEC benchmarks. The rPerf model is not intended to represent any specific public benchmark results and should not be reasonably used in that way. The model simulates some of the system operations such as CPU, cache and memory. However, the model does not simulate disk or network I/O operations.

• rPerf estimates are calculated based on systems with the latest levels of AIX and other pertinent software at the time of system announcement. Actual performance will vary based on application and configuration specifics. The IBM eServer pSeries 640 is the baseline reference system and has a value of 1.0. Although rPerf may be used to approximate relative IBM UNIX commercial processing performance, actual system performance may vary and is dependent upon many factors including system hardware configuration and software design and configuration. Note that the rPerfmethodology used for the POWER6 systems is identical to that used for the POWER5 systems. Variations in incremental system performance may be observed in commercial workloads due to changes in the underlying system architecture.

All performance estimates are provided "AS IS" and no warranties or guarantees are expressed or implied by IBM. Buyers should consult other sources of information, including system benchmarks, and application sizing guides to evaluate the performance of a system they are considering buying. For additional information about rPerf, contact your local IBM office or IBM authorized reseller.

========================================================================

CPW for IBM i

Commercial Processing Workload (CPW) is a relative measure of performance of processors running the IBM i operating system. Performance in customer environments may vary. The value is based on maximum configurations. More performance information is available in the Performance Capabilities Reference at: www.ibm.com/systems/i/solutions/perfmgmt/resource.html

71