Sunteți pe pagina 1din 61

What is New in DB2 for i

Mike Cain DB2 for i Center of Excellence Rochester, MN USA mcain@us.ibm.com

2008 IBM Corporation

On the Web
DB2 for i Home Page
http://www.ibm.com/systems/i/software/db2/

System i Advantages
http://www-1.ibm.com/systems/i/advantages/

System i Access
http://www.ibm.com/systems/i/access/

DB2 for i Java


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

Education and Publications


http://www.ibm.com/systems/i/ - Click on Education http://publib.boulder.ibm.com/iseries/

Newsgroups and Forums


comp.databases.ibm-db2 comp.sys.ibm.as400.misc groups

Questions can be sent to:


rchudb@us.ibm.com

2008 IBM Corporation

DB2 for i Focus Areas


The Self Managing Database Reduced TCO thru automation Integration: Built-in Security and Auditing Trusted Reliability & Scalability Simplified, best of breed scaling Integrated transaction management Advanced, flexible logging facilities Open for Business SQL, the strategic interface Latest de facto standards Innovative Applications SQL and Data-centric programming Move to SOA over time Business Intelligence Store, manage, and ANALYZE data! End user query and reporting to large scale data warehousing

IBM SOA Foundation

Software

Skills & Support

2008 IBM Corporation

DB2 for i V5R4 Enhancements

2008 IBM Corporation

DB2 for i V5R4 Enhancements


Application Flexibility & Portability
Free Format RPG & SQL PHP DB2 interface Enhanced SQL Standards support

Performance
SQL Query Engine enhancements

LIKE & LOB Support Sensitive Cursors Autonomic Indexes


Faster SQL Procedural Language Enhanced MQT Optimization Faster XML Extenders

Scalar FullSelect Standard Flagger


Improved DB2 Family Compatibility

Recursive Expressions OLAP Support RowNumber & Rank ANS Timestamp Format TDES Encryption 2 MB SQL Statements & 32K keys OnDemand & Availability
Cross-Reference Files Robustness Automatic Journaling Enhancements SMAPP for EVIs Parallel Rollback Unlock

Usability
System i Navigator Enhancements

DB2 On Demand Performance Center SQE Plan Cache Analyzer DB2 Health Center
Resource Governor Governor Exit Point DB2 Content Manager

2008 IBM Corporation

DB2 for i 6.1 Enhancements

2008 IBM Corporation

6.1 SQL Enhancements


Queries
Grouping Sets and Super groups VALUES in FROM INSERT in FROM Full Outer Join

Schema statements (DDL)


Decimal Float Expressions in Indexes ROW CHANGE TIMESTAMP Hidden Columns NCHAR, NVARCHAR, and NCLOB ALTER FUNCTION Ignore unsupported syntax SYSTOOLS/SYSIBMADM FOR EACH STATEMENT INSTEAD OF trigger

Data Change statements (DML)


Extended Indicator Variable Values Skip Locked Data

Scalar Functions
TIMESTAMP_FORMAT and VARCHAR_FORMAT enhancements LOCATE function fix (PTF) ENCRYPT_AES ASCII (UTF-8 result) MONTHS_BETWEEN, ROUND_TIMESTAMP, and TRUNC_TIMESTAMP

Miscellaneous
Statistics catalog views (V5R4 PTF) CLIENT special registers FOR BIT DATA and binary compatibility Output parameter support for heterogeneous CALL BX literals

2008 IBM Corporation

GROUPING SETS and Super Groups


Produce the result based on two different grouping sets of rows from the SALES table. SELECT WEEK(SALES_DATE) AS WEEK, DAYOFWEEK(SALES_DATE) AS DAY_WEEK, SALES_PERSON, SUM(SALES) AS UNITS_SOLD FROM SALES WHERE WEEK(SALES_DATE) = 13 GROUP BY GROUPING SETS( (WEEK(SALES_DATE), SALES_PERSON), (DAYOFWEEK(SALES_DATE), SALES_PERSON) ) ORDER BY WEEK, DAY_WEEK, SALES_PERSON The rows with WEEK 13 are from the first grouping set and the other rows are from the second grouping set.

Prior to this support you would have to run multiple queries CUBE and ROLLUP included in this support

2008 IBM Corporation

VALUES in FROM
Form the cross product of this table X with the SALES table. This add columns R1 and R2 to every row. SELECT R1, R2, WEEK(SALES_DATE) AS WEEK, DAYOFWEEK(SALES_DATE) AS DAY_WEEK, MONTH(SALES_DATE) AS MONTH, REGION, SALES AS UNITS_SOLD FROM SALES, ( VALUES(GROUP 1,GROUP 2) ) AS X (R1,R2)

Equivalent to creating a temporary table, inserting rows, and then using the temporary table in the query

2008 IBM Corporation

INSERT in FROM
Insert customer numbers into the new SALES table that has an identity column and return the generated values. CREATE TABLE SALES2 ( SALES_ID INTEGER AS IDENTITY, SALES_DATE DATE DEFAULT CURRENT DATE, SALES_PERSON FOR COLUMN SALES00001 VARCHAR(15) , REGION VARCHAR(15), SALES INTEGER ); SELECT * FROM FINAL TABLE ( INSERT INTO SALES2 ( SALES_DATE, SALES_PERSON, REGION, SALES ) SELECT * FROM SALES ) ORDER BY INPUT SEQUENCE;

No easy way to return generated values prior to this support

2008 IBM Corporation

EXTENDED INDICATOR VALUES


Get the next row in the transaction table for update and skip any rows that are currently locked. EXEC SQL DECLARE x CURSOR WITH EXTENDED INDICATORS FOR SELECT * FROM corpdata.transaction; EXEC SQL OPEN x; EXEC SQL FETCH x INTO :trans:inds; inds1 = -5; EXEC SQL UPDATE corpdata.transaction SET TRANSOPERATION = :top:inds1, CUSTOMERID = :cid:inds2, TRANSINFO = :top:inds3 WHERE CURRENT OF x; EXEC SQL CLOSE x;

Prior to this support you would have to update all columns or would have to use a different UPDATE statement for every combination of columns you wanted to update. Applies to UPDATE and INSERT VALUES, also allowed on PREPARE.

Indicator Values 0 -1, -2, -3, -4, and -6 -5 -7

Meaning Value is provided Null value Default value Column is treated as if it had not been specified in the statement.

2008 IBM Corporation

DECIMAL FLOAT

New numeric data type with attributes of both decimal and floating point IEEE 754R CREATE TABLE mjatst.table1 ( c1 DECFLOAT(16) , c2 DECFLOAT(34) );

New numeric data type with extended accuracy and performance.

DECFLOAT(16) Guarantees 16 digits of precision 8 bytes long Exponent range 10-383 to 10384 Infinity NaN SNaN special values

DECFLOAT(34) Guarantees 34 digits of precision 16 bytes long Exponent range 10-6143 to 106144 Infinity NaN SNaN special values

2008 IBM Corporation

Expressions and Selection in Indexes

CREATE INDEX mjatst.index1 ON mjatst.table1 (c1*c2) ;

CREATE INDEX mjatst.index2 ON mjatst.table1 (c1*c2) WHERE c1 > 14;

SQL create index enhancements for key expressions and sparse indexes. SQE can use indexes with expressions, but does not provide support for sparse indexes yet

2008 IBM Corporation

ROW CHANGE TIMESTAMP


CREATE TABLE mjatst.table4 ( c1 INT, c2 VARCHAR(20), c3 TIMESTAMP NOT NULL IMPLICITLY HIDDEN FOR EACH ROW ON UPDATE AS ROW CHANGE TIMESTAMP ); INSERT INTO mjatst.table4 (c1, c2) VALUES (1, FIRST), (2, SECOND), (3, THIRD); SELECT c1, c2, c3 FROM mjatst.table4;

New standard way of updating a timestamp column on any update or insert.

UPDATE mjatst.table4 SET c1 = 4, c2 = FOURTH WHERE C1 = 1; SELECT c1, c2, c3 FROM mjatst.table4;

2008 IBM Corporation

Hidden Columns
CREATE TABLE mjatst.table3 ( c1 INT, c2 VARCHAR(20), c3 TIMESTAMP IMPLICITLY HIDDEN; INSERT INTO mjatst.table3 (c1, c2, c3) VALUES (1, FIRST, CURRENT TIMESTAMP), (2, SECOND, CURRENT TIMESTAMP), (3, THIRD, CURRENT TIMESTAMP); SELECT * FROM mjatst.table3;

New standard way of hiding a column when querying all columns.

SELECT c1, c2, c3 FROM mjatst.table3;

2008 IBM Corporation

FULL OUTER JOIN

Join the tables on the PROD# column to get a table of all parts and products, showing the supplier information, if any. SELECT PART, SUPPLIER, PARTS.PROD#, PRODUCT FROM PARTS FULL OUTER JOIN PRODUCTS ON PARTS.PROD# = PRODUCTS.PROD#;

Equivalent to UNION ALL of LEFT OUTER JOIN and RIGHT EXCEPTION JOIN

2008 IBM Corporation

COMMENT and LABEL Enhancements


COMMENT ON CONSTRAINT mjatst.cst IS A long description up to 2000 bytes; LABEL ON LABEL ON LABEL ON LABEL ON LABEL ON LABEL ON CONSTRAINT mjatst.cst IS A short description up to 50 bytes; FUNCTION ROUTINE TRIGGER TYPE mjatst.fun IS A short description up to 50 bytes; mjatst.rtn IS A short description up to 50 bytes; mjatst.trg IS A short description up to 50 bytes; mjatst.typ IS A short description up to 50 bytes; PROCEDURE mjatst.prc IS A short description up to 50 bytes;

Add descriptive information to constraints, routines, and triggers.

2008 IBM Corporation

SKIP LOCKED DATA


Get the next row in the transaction table for update and skip any rows that are currently locked.

DECLARE X CURSOR FOR SELECT * FROM transaction WITH CS SKIP LOCKED DATA OPEN X; FETCH X INTO

Prior to this support you would have waited on locks

2008 IBM Corporation

SQL Enhancements Scalar Functions

Datetime Functions
TIMESTAMP_FORMAT VARCHAR_FORMAT MONTHS_BETWEEN ROUND_TIMESTAMP TRUNC_TIMESTAMP Returns a timestamp from a character string representation of a timestamp according to the specified format of the string. Returns a character string representation of a timestamp, with the string in a specified format Returns an estimate of the number of months between two dates Returns a timestamp rounded to the specified unit. Returns a timestamp truncated to the specified unit.

String Functions
ASCII CHR ENCRYPT_AES Returns the ASCII code value of the leftmost character of the argument as an integer Returns the character that has the ASCII code value specified by the argument. Encrypts a string using the AES encryption algorithm

2008 IBM Corporation

NCHAR, NVARCHAR, NCLOB


CREATE TABLE mjatst.table2 ( c1 NCHAR(10), c2 NVARCHAR(20), c3 NCLOB(1M) ); NATIONAL CHARACTER NATIONAL CHAR NCHAR NATIONAL CHARACTER (n) NATIONAL CHAR (n) NCHAR (n) NATIONAL CHARACTER VARYING (n) NATIONAL CHAR VARYING (n) NCHAR VARYING (n) NVARCHAR (n) NATIONAL CHARACTER LARGE OBJECT NCHAR LARGE OBJECT NCLOB NATIONAL CHARACTER LARGE OBJECT (n) NCHAR LARGE OBJECT (n) NCLOB (n) DBCLOB (n) CCSID 1200 DBCLOB (1M) CCSID 1200 VARGRAPHIC (n) CCSID 1200 GRAPHIC (n) CCSID 1200 GRAPHIC (1) CCSID 1200

New standard way of specifying UTF-16.

2008 IBM Corporation

ALTER FUNCTION

ALTER FUNCTION mjatst.func1 ALTER NOT DETERMINISTIC RETURNS NULL ON NULL OUTPUT;

Change a function without having to reissue grants.

ALTER FUNCTION mjatst.func1 REPLACE (p1 VARCHAR(10)) RETURNS INT BEGIN DECLARE x INT; RETURN (SELECT MAX(LENGTH) FROM QSYS2.SYSCOLUMNS WHERE DATA_TYPE = p1); END;

2008 IBM Corporation

Ignore unsupported syntax


CREATE TABLESPACE TS1 MANAGED BY DATABASE USING (device /dev/rcont $N 20000) SQLSTATE: 01505 SQLCODE: +143 Message: Statement CREATE TABLESPACE ignored. CREATE TABLE mjatst.newt1 (c1 INT) INDEX IN ts1 SQLSTATE: 01680 SQLCODE: +20367 Message: Clause INDEX IN ignored. CREATE TABLE mjatst.t1 (c1 INT) IN ts1 SQLSTATE: 42704 SQLCODE: -204 Message: TS1 in MJA type *NODGRP not found.

Statements and clauses that will never be necessary on i are ignored making ports easier.

2008 IBM Corporation

FOR EACH STATEMENT INSTEAD OF trigger

CREATE TRIGGER mjatst.trgins1 INSTEAD OF INSERT ON mjatst.v1 FOR EACH STATEMENT BEGIN END;

Allow INSTEAD OF triggers to be FOR EACH STATEMENT.

PTFed to V5R4

2008 IBM Corporation

BX Literals
CREATE TABLE qtemp.binary1 (c1 VARBINARY(1000)); INSERT INTO qtemp.binary1 VALUES( BXA1B2C3D4 );

Alternative method of specifying binary constants.

2008 IBM Corporation

New System Schemas


SYSTOOLS and SYSIBMADM
SYSTEM PATH changes for SQL naming: QSYS, QSYS2, SYSPROC, SYSIBMADM, the value of the authorization ID of the statement

Two new system schemas to house future information.

New SYSTOOLS examples: HARVEST_INDEX_ADVICE (builds an SQL script) ACT_ON_INDEX_ADVICE (creates permanent indexes)

2008 IBM Corporation

Statistics Catalog Views


SYSCOLUMNSTAT SYSPARTITIONINDEXSTAT SYSPARTITIONSTAT SYSTABLEINDEXSTAT Contains one row for every column in a table partition or table member and one row for every column statistics collection. Contains one row for every index built over a table partition or table member. Contains one row for every table partition or table member. Contains one row for every index that has at least one partition or member built over a table. If the index is over more than one partition or member, the statistics include all those partitions and members. Contains one row for every table that has at least one partition or member. If the table has more than one partition or member, the statistics include all partitions and members.

SYSTABLESTAT

SELECT table_schema, table_name, table_partition, number_rows, number_deleted_rows FROM QSYS2.SYSPARTITIONSTAT WHERE table_schema = MJATST

New views allow simple access to statistics. These were PTFed to V5R4

2008 IBM Corporation

Statistics Catalog Views


SYSINDEXSTAT Contains one row for every SQL index. Use this view when you want to see information for a specific SQL index or set of SQL indexes. The information is similar to that returned via Show Indexes in System i Navigator. Contains one row for every materialized table. Use this view when you want to see information about a specified materialized query table or set of materialized query tables. The information is similar to that returned via Show Materialized Query Tables in System i Navigator. Contains one row for each SQL package in the SQL schema. Contains one row for every index built over a table partition or table member. Use this view when you want to see index information for indexes built on a specified table or set of tables. The information is similar to that returned via Show Indexes in System i Navigator. Contains one row for every materialized table built over a table partition or table member. Use this view when you want to see materialized query table information for materialized tables built on a specified table or set of tables. The information is similar to that returned via Show Materialized Query Tables in System i Navigator. Contains one row for each program, service program, and module that contains SQL statements. SYSMQTSTAT

SYSPACKAGESTAT SYSPARTITIONINDEXES

SYSPARTITIONMQTS

SYSPROGRAMSTAT

SELECT package_schema, package_name, package_type, number_statements, package_used_size FROM QSYS2.SYSPACKAGESTAT WHERE package_schema LIKE Q%

New views allow simple access to statistics. NOT PTFed back

2008 IBM Corporation

CLIENT Special Registers


CURRENT CLIENT_ACCTNG CURRENT CLIENT_APPLNAME CURRENT CLIENT_PROGRAMID CURRENT CLIENT_USERID CURRENT CLIENT_WRKSTNNAME Contains the value of the accounting string from the client information specified for this connection. Contains the value of the application name from the client information specified for this connection. Contains the value of the client program ID from the client information specified for this connection. Contains the value of the client user ID from the client information specified for this connection. Contains the value of the workstation name from the client information specified for this connection.

The values of the special registers can be changed through: The Set Client Information (SQLESETI) API. In CLI, the SQLSetConnectAttr() API. In JDBC, the setClientInfo connection method.
SELECT CURRENT CLIENT_ACCTNG AS "Client Accounting", CURRENT CLIENT_APPLNAME AS "Client Application", CURRENT CLIENT_PROGRAMID AS "Client Program", CURRENT CLIENT_USERID AS "Client User",

Provides the ability to track the real user and application. Besides direct access, database monitor will capture the values and Current SQL for a job will show values.

CURRENT CLIENT_WRKSTNNAME AS "Client Workstation FROM sysibm.sysdummy1;

2008 IBM Corporation

Interoperability DRDA
DB2 for z/O S DB2 for VM and VSE DB2 for i DB2 for AIX DB2 for HP-UX DB2 for Sun Solaris DB2 for W indows DB2 for Liniux Inform ix Txaction Attachm ate G randview HiT Software M icrosoft O racle Rocket StarQ uest Sybase/M DI W all Data XDB System s

DDM/DRDA Protocols

DDM/DRDA Protocols

Server and Client

DB2 DB2 DB2 DB2 DB2 DB2 DB2 DB2

for for for for for for for for

z/OS VM and VSE i AIX HP-UX Sun Solaris W indows Liniux

DDM and DRDA IPv6 DRDA Identity tokens DRDA LOB Optimizations DRDA Authentication Methods DRDA Scrollable Cursors Output parameter support for heterogeneous CALL

6.1

FileTek, Inc. Grandview Platinum Technology Inc. XDB System s

Application

Oracle and Microsoft do not support DRDA as a Server

Server (Data)

2008 IBM Corporation

6.1 Application Development


Native JDBC
JDBC 4.0 CLI Handle Threshold Exit

CLI
Alias support in Metadata APIs Row-wise array INSERT Wide APIs

Embedded SQL
RPG Precompiler Variable Scoping Precompiler IFS support Unicode support in COBOL

JDBC
JDBC 4.0 Alias support in Metadata APIs Returning DEFAULT Return update counts

RUNSQLSTM IFS support Run SQL Scripts flagger

XDA
SQL Server Mode Serviceability improvements

.NET
Multiple-row INSERT Additional data type support Visual Studio integration Distributed transaction support Exploit ADO.NET 2.0
2008 IBM Corporation

SQL Query Engine (SQE)

SQE Characteristics

Parallel to Normal Release Enhancements Object Oriented Design Enhanced Performance primarily for complex queries Enhanced Optimization Engine Enhanced Statistics Encoded Vector Indexes Enhancements

Virtually all SQL queries use SQE!

SQE Delivery
First Wave Second Wave Third Wave Fourth Wave Fifth Wave

V5R2 GA mid-V5R2 V5R3 GA mid-V5R3 V5R4 GA

6.1 SQE (Stage 6)


CCSID translation support Lateral Correlation UDTF support Significant optimization time improvements Other miscellaneous performance

2008 IBM Corporation

6.1 Performance
SQL Runtime Performance Improvements
Host Server Variable Length compression (V5R4 PTF) SQL CALL cache improvements Optimization time improvements Long name resolve Large page use (64K)

Database Maintenance Performance Improvements


ALWCANCEL(*YES) Reorganize No Longer Requires *EXCL Lock Reorganize and LOB segment crossers (V5R4 PTF) ALTER TABLE performance Do not rebuild EVIs (V5R4 PTF) Preserve indexes in tables with LOBs (segment crossers)

SQL Performance Tools Improvements


Performance Monitor Improvements 3010 fixes and Unicode 1000 records for non-SQL Filter by port number and ipV6

2008 IBM Corporation

6.1 Increased Limits

SQL Application and Runtime Limits


64K result row length (partial V5R4 PTF) 128-byte cursor and statement names More than 120 columns in GROUP BY Larger in-use table

Database Object Limits


Number of schemas - number of dependent logical files (partial V5R4 PTF) Increase ALTER TABLE number of dependents supported Increase Save number of dependents supported

2008 IBM Corporation

6.1 Availability/Recovery
Database
Logical file and MQT restore XA and DDL improvements Quiesce transactions for XSM Switchover Serviceability improvements Eliminate package corruption (V5R4 PTF)

Journaling
Statistics DDL entries Implicit library journaling (STRJRNLIB, ENDJRNLIB, SQL CREATE SCHEMA) End Journal While Open Start and End Journal *ALL objects in a library Merge APYJRNCHG and APYJRNCHGX Change journal exit point (QIBM_QJO_CHG_JRNRCV) List eligible but unprotected access paths (DSPRCYAP) Miscellaneous recovery improvements

2008 IBM Corporation

6.1 System i Navigator


On Demand Performance Center
Copy to spreadsheet Customization for Analyze Condensed Advice (PTF) Plan Cache Event Monitor Plan Cache properties and resize Fast summary compare Reset last used date and stats Monitor filters - Storage Governor & Port Show statements enhancements Visual Explain while running Additional SQL Job Information

Health Center

Environmental limits Package and procedure in Size Limits File activity Journals and receivers in Overview

Database Management

Schema based info Show object locks Label and Comment cleanup

Run SQL Statements


Automatic flagger Save to spreadsheet Save to source member Save to UTF-8


2008 IBM Corporation

DB2 for i Whats New Since 6.1 GA

2008 IBM Corporation

Web Based Query and Reporting


Web-based query and report writing product that replaces IBM Query for iSeries (Query/400) Base Product Report and graphing Assistants Power Painter Spreadsheet integration Web-enable Query/400 report DB2 for i cross system Queries Additional IBM Features Active Reports (Disconnected) On Line Analytical Processing Developers Workbench Advanced metadata creation SQL Wizard HTML Layout Painter Additional Add-On Available ERP System Integration 250+ Database/Cube/Mining Connectors Extract/Transformation/Load Visual Discovery MS Excel Add-In Automatic Report Distribution / Intelligent Bursting

For more details, refer to: http://www.ibm.com/systems/i/db2

2008 IBM Corporation

IBM DB2 Web Query for i Report Broker


Additional product IBM DB2 Web Query for i Easy to use graphical scheduler for automating report execution in the background Schedule reports to run on daily, weekly, monthly, or certain days of the week. Specify blackout dates when reports should NOT be run Generate reports in many different formats, including PDF, spread-sheets, or as an active report with the Active Reports feature of DB2 Web Query Automate the report distribution function via email to single users or multiple users through a distribution list Intelligently burst the reports to send sections of the report to regional managers with only data pertinent to their job/region

For more details, refer to: http://www.ibm.com/systems/i/db2

2008 IBM Corporation

IBM DB2 Web Query for i Software Development Kit (SDK)


Additional product IBM DB2 Web Query for i Enables application integration of the reporting environment through a set of SOAbased Web Services Customize a web application to work with DB2 Web Query and Report Broker functions Invoke these functions from an existing application Link to a report from a URL within a portal interface

For more details, refer to: http://www.ibm.com/systems/i/db2

2008 IBM Corporation

MySQL
Most popular open source DB
Frequently used with PHP

Two stages
Stage 1 Runs AIX version of MySQL in PASE with Support by MySQL Uses existing Storage engines (MyISAM) Stage 2 Custom storage engine that integrates MySQL with DB2 for i

2008 IBM Corporation

OmniFind Text Search Server for DB2 for i

No-charge offering (5733-OMF) Quickly search text in DB2 columns with advanced linguistic methods OmniFind can index and search:
Adobe PDF Rich Text Format (RTF) HTML XML Lotus 123 Lotus Freelance Lotus WordPro Microsoft Excel Microsoft PowerPoint Microsoft Word Open Office 1.1 & 2.0 JustSystems Ichitaro

2008 IBM Corporation

DB2 for i Post 6.1 Enhancements

2008 IBM Corporation

Post V5R4 GA Enhancements


Performance
Validate Constraints without Checking
V5R4 - Database Group SF99504 Version 18 6.1 - Database Group SF99601 Version 6

Systems Management
SQL Server Mixed Mode for Batch Processing
V5R4 - Database Group SF99504 Version 19 (planned) 6.1 - Database Group SF99601 Version 8 (planned)

Preserve EVI Indexes on ALTER


V5R4 - Database Group SF99504 Version 19 (planned) 6.1 - In the base release

Allow QSQSRVR jobs in a User Subsystem


V5R4 - Database Group SF99504 Version 18 6.1 - Database Group SF99601 Version 8 (planned)

CPYFRMIMPF performance
V5R4 - Database Group SF99504 Version 19 6.1 - Database Group SF99601 Version 8

Add Server Mode Connecting Job to QUSRJOBI() and System i Navigator


V5R4 - Database Group SF99504 Version 18 6.1 - Database Group SF99601 Version 7

Materialize Member List Seize


V5R4 - Database Group SF99504 Version 20 6.1 Database Group SF99601 Version 9 (planned)

Audit and Security


SECURE columns
V5R4 - Database Group SF99504 Version 19 (planned) 6.1 - Database Group SF99601 Version 8 (planned)

Solid State Disks (SSD)


V5R4 - Database Group SF99504 Version 21 and 22 (planned) 6.1 Database Group SF99601 Version 9 and 10 (planned)

Check the DB2 for i Home Page

2008 IBM Corporation

Post 6.1 GA Enhancements


Performance
SQL Procedure Performance Enhancements
Database Group SF99601 Version 7

PROGRAM TYPE SUB on CREATE PROCEDURE (SQL)


Database Group SF99601 Version 7

Function
Allow Unqualified SRVPGM Names for Routines

Audit and Security


RUNSQLSTM/STRSQL and client special register
Database Group SF99601 Version 7

Database Group SF99601 Version 8

*JOBCTL No Longer Required for STRDBMON on JOB(*)


Database Group SF99601 Version 8

STRDBMON over a View


Database Group SF99601 Version 9 (planned)

Availability and Recovery


Prevent EVI Rebuild On Cancel During Catch Up
Database Group SF99601 Version 10 (planned)

Internal Error (-901) Service Logging


Database Group SF99601 Version 10 (planned)

2008 IBM Corporation

Solid State Disks (SSD)


Allows a user to indicate a media preference on an SQL table, SQL index, physical file, and logical file CL command support
UNIT(*SSD) on CRTPF, CRTLF, and CRTSRCPF* UNIT(*SSD) on CHGPF, CHGLF, and CHGSRCPF*

SQL statement support


UNIT SSD on the object level
CREATE TABLE ALTER TABLE CREATE INDEX

UNIT SSD on the partition level


CREATE TABLE ALTER TABLE ... ADD PARTITION ALTER TABLE ... ALTER PARTITION

CHGxxx and ALTER will asynchronously move data and indexes

V5R4 - Database Group SF99504 Version 21 and 22 (planned) 6.1 Database Group SF99601 Version 9 and 10 (planned)

2008 IBM Corporation

SECURE columns
Protects secure data in a database monitor and plan cache.
Issue an SQL CALL to secure column CCNBR in table LIB1.Orders:

CALL SYSPROC.SET_COLUMN_ATTRIBUTE ('LIB1', 'ORDERS', 'CCNBR', 'SECURE YES');


Parameter descriptions: Table_Schema Table_Name Column_Name Attribute VARCHAR(10) VARCHAR(10) VARCHAR(10) VARCHAR(10) The system name of a table's schema. The system name of a table. The system column name that is secured. The attribute being set for the column.

The valid values of the Attribute are: SECURE NO cache. - This column does not contain data that needs to be secured in a database monitor or plan

SECURE YES - This column contains data that needs to be secured in a database monitor or plan cache. All variable values for any query that references this column will not be visible in a database monitor or plan cache unless the security officer has started the database monitor or the security officer is accessing the plan cache. Notes Calling the procedure will require an exclusive lock and enough authority to alter the table. It will generate a journal entry so the HABPs can replay it on another system.

2008 IBM Corporation

SECURE columns

For 6.1, the following statements may need to be issued once:

CREATE PROCEDURE SYSPROC.SET_COLUMN_ATTRIBUTE ( Table_Schema Table_Name Column_Name VARCHAR(10), VARCHAR(10), VARCHAR(10),

Attribute VARCHAR(10) ) LANGUAGE C PARAMETER STYLE SQL MODIFIES SQL DATA SPECIFIC QDBCATTR EXTERNAL NAME 'QSYS/QDBSSUDF2(QDBCATTR)'; GRANT EXECUTE ON PROCEDURE SYSPROC.SET_COLUMN_ATTRIBUTE TO PUBLIC;

2008 IBM Corporation

SQL Server Mode Subsystem control


SQL Server mode jobs (QSQSRVR) reside within the QSYSWRK subsystem. Some customers want the server mode jobs to run in the subsystem of the application, to permit better performance controls and serviceability. The support is enabled with an environment variable. To enable the switch:

ADDENVVAR ENVVAR(QIBM_SRVRMODE_SBS) VALUE('*SAME') LEVEL(*SYS)

SQL CLI control provided via new connection attribute SQLSetConnectAttr() SQL_ATTR_SERVERMODE_SUBSYSTEM JDBC control provided via new connection property - servermode subsystem

2008 IBM Corporation

SQL Server Mode Improved identification of current user


Some customers have thousands of active SQL Server mode jobs. System i Navigator has been improved to show the current application user and thread.

2008 IBM Corporation

SQL Server Mode Improved identification of current user


Green screen users can see the connecting job, but not the thread detail.

2008 IBM Corporation

Collect SQL details For all statements executed via STRSQL or RUNSQLSTM
Start SQL Interactive Session (STRSQL command) users will observe the following client special register values: CLIENT CLIENT CLIENT CLIENT CLIENT PROGRAMID = 'STRSQL' APPLNAME = 'START SQL INTERACTIVE SESSION' USERID = The current user's name WRKSTNNAME = The DB2 for i database name ACCTNG = The current user's accounting code (i.e. ACGCDE parameter on CHGUSRPRF)

Run SQL Statements (RUNSQLSTM command) users will observe the following client special register values: CLIENT CLIENT CLIENT CLIENT CLIENT PROGRAMID APPLNAME USERID WRKSTNNAME ACCTNG = 'RUNSQLSTM' = 'RUN SQL STATEMENTS' = The current user's name = The DB2 for i database name = The current user's accounting code (i.e. ACGCDE parameter on CHGUSRPRF)

2008 IBM Corporation

Collect SQL details for all statements executed via STRSQL or RUNSQLSTM
Corporate auditing requirements (SOX) are becoming more demanding. SOX officers are responsible for establishing and maintaining internal controls. Some companies have decided to record and archive all the SQL statement activity for command interface users. The Database Monitor client register pre-filters can be used to solve this need. Example:

STRDBMON OUTFILE(QGPL/STRSQLMON1) OUTMBR(*FIRST *REPLACE) JOB(*ALL/*ALL/QPADE*) TYPE(*DETAIL) COMMENT('FTRCLTPGM(STRSQL)') <.....> ENDDBMON JOB(*ALL/*ALL/QPADE*) )

2008 IBM Corporation

Collect SQL details only for statements executed by CQE or SQE


Focus monitor collection on either CQE or SQE queries. This helps to minimize the overhead of monitoring SQL requests. Example:

STRDBMON OUTFILE(lib/file) COMMENT('WANT_CQE_ONLY')

STRDBMON OUTFILE(lib/file) COMMENT('WANT_SQE_ONLY')

2008 IBM Corporation

CREATE PROCEDURE PROGRAM TYPE SUB

Add the following option to CREATE PROCEDURE (SQL) and ALTER PROCEDURE (SQL).

option-list >--+-------------------+-----> +-PROGRAM TYPE MAIN-+ '-PROGRAM TYPE SUB--' PROGRAM TYPE MAIN Service program calls perform faster than program calls

Specifies that the routine executes as the main entry point in a program. The external program generated will be a *PGM object.

PROGRAM TYPE SUB

Specifies that the routine executes as a procedure in a service program. The external program generated will be a *SRVPGM object.

2008 IBM Corporation

DB2 for i - Whats Next


Disclaimer: The following information is tentative and might not come to fruition. IBM makes no guarantees or commitments to provide the features or functions listed here.

2008 IBM Corporation

Possible Future SQL Enhancements


Queries and Data Change statements (DML)
MERGE Result set support in embedded SQL

Schema statements (DDL)


XML data type Global variables Array support in routines Encryption enhancements (FIELDPROCS) Three-part Aliases Partition table enhancements

Scalar Functions
XML functions MQ Series functions TIMESTAMP_FORMAT and VARCHAR_FORMAT enhancements

Miscellaneous
Parameter marker enhancements Expressions in CALL

2008 IBM Corporation

Possible Future SQL Query Engine (SQE)

SQE Characteristics

Parallel to Normal Release Enhancements Object Oriented Design Enhanced Performance primarily for complex queries Enhanced Optimization Engine Enhanced Statistics Encoded Vector Indexes Enhancements

SQE Delivery
First Wave Second Wave Third Wave Fourth Wave Fifth Wave Sixth Wave

V5R2 GA mid-V5R2 V5R3 GA mid-V5R3 V5R4 GA 6.1 GA

SQE (Stage 7)
Logical File support Adaptive Query Processing (AQP) Other miscellaneous performance enhancements

2008 IBM Corporation

Possible Future Performance Enhancements


SQL Runtime Performance Improvements
SQL function enhancements (inline functions) OVRDBF and REUSEDLT(NO) EVI enhancements support available now via Lab Services

CREATE ENCODED VECTOR INDEX idx2 ON sales (region) INCLUDE ( SUM(sales) ) SELECT region, SUM(sales) FROM sales GROUP BY region

Database Maintenance Performance Improvements


ALTER TABLE performance and concurrency

2008 IBM Corporation

Possible Future Limits/Availability/Recovery


SQL Application and Runtime Limits
128-byte schema names

Database
Read Currently Committed Allow transactions to span *SYSBAS and IASPs CHGPFCST CHECK(*YES *NO) CHGSRCF TEXT(*FROMMBR) SRCTYPE(*FROMMBR)

Journaling
Additional filtering based on generic names on STRJRNLIB and CHGJRNOBJ to control what journaling implicitly gets started Additional control on whether journal entries for an object(s) should be filtered on remote journaling Option 42 (HA Journal Performance)

2008 IBM Corporation

Possible Future System i Navigator


On Demand Performance Center
Database monitor Client register filter Monitor over a View (PTFed) Authority changes SQL details for a job Save Show Statements

Database Management

Support for DB enhancements Support for Omnifind indexes Large list performance Partitioned table enhancement for Show Indexes and Show MQTs Generate SQL option to include GRANTs Status Reorganize enhancements Index build ALTER TABLE Save folder contents

2008 IBM Corporation

2008 IBM Corporation

S-ar putea să vă placă și