what's new in db2 for i

61
© 2008 IBM Corporation What is New in DB2 ® for i Mike Cain DB2 for i Center of Excellence Rochester, MN USA [email protected]

Upload: twcstk7

Post on 28-Apr-2015

57 views

Category:

Documents


10 download

DESCRIPTION

What's New in DB2 for i

TRANSCRIPT

Page 1: What's New in DB2 for i

© 2008 IBM Corporation

What is New in DB2® for iMike CainDB2 for i Center of ExcellenceRochester, MN [email protected]

Page 2: What's New in DB2 for i

© 2008 IBM Corporation

On the Web

DB2 for i Home Pagehttp://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 Javahttp://www.ibm.com/systems/i/software/db2/javadb2.html

Education and Publicationshttp://www.ibm.com/systems/i/ - Click on Education

http://publib.boulder.ibm.com/iseries/

Newsgroups and Forumscomp.databases.ibm-db2

comp.sys.ibm.as400.misc groups

Questions can be sent to:[email protected]

Page 3: What's New in DB2 for i

© 2008 IBM Corporation

DB2 for i Focus Areas

The Self Managing DatabaseReduced TCO thru automationIntegration: Built-in Security and Auditing

Trusted Reliability & ScalabilitySimplified, best of breed scalingIntegrated transaction managementAdvanced, flexible logging facilities

Open for BusinessSQL, the strategic interfaceLatest de facto standards

Innovative ApplicationsSQL and Data-centric programmingMove to SOA over time

Business IntelligenceStore, manage, and ANALYZE data!End user query and reporting to large scale data warehousing

IBM SOA Foundation

Skills &Support

Software

Page 4: What's New in DB2 for i

© 2008 IBM Corporation

DB2® for i V5R4 Enhancements

Page 5: What's New in DB2 for i

© 2008 IBM Corporation

DB2 for i V5R4 Enhancements

Application Flexibility & PortabilityFree Format RPG & SQL

PHP DB2 interface

Enhanced SQL Standards support

Scalar FullSelect

Standard FlaggerImproved DB2 Family Compatibility

Recursive ExpressionsOLAP Support – RowNumber & Rank ANS Timestamp FormatTDES Encryption2 MB SQL Statements & 32K keys

OnDemand & AvailabilityCross-Reference Files Robustness

Automatic Journaling Enhancements

SMAPP for EVIs

Parallel Rollback Unlock

PerformanceSQL Query Engine enhancements

LIKE & LOB Support

Sensitive Cursors

Autonomic IndexesFaster SQL Procedural Language

Enhanced MQT Optimization

Faster XML Extenders

UsabilitySystem i Navigator Enhancements

DB2 On Demand Performance Center

SQE Plan Cache Analyzer

DB2 Health CenterResource Governor

Governor Exit Point

DB2 Content Manager

Page 6: What's New in DB2 for i

© 2008 IBM Corporation

DB2® for i 6.1 Enhancements

Page 7: What's New in DB2 for i

© 2008 IBM Corporation

6.1 SQL Enhancements

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

QueriesGrouping 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

MiscellaneousStatistics catalog views (V5R4 PTF)

CLIENT special registers

FOR BIT DATA and binary compatibility

Output parameter support for heterogeneous CALL

BX literals

Page 8: What's New in DB2 for i

© 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 ROLLUPincluded in this support

Page 9: What's New in DB2 for i

© 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

Page 10: What's New in DB2 for i

© 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

Page 11: What's New in DB2 for i

© 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.

Column is treated as if it had not been specified in the statement.

-7

Default value-5

Null value-1, -2, -3, -4, and -6

Value is provided0

MeaningIndicator Values

Page 12: What's New in DB2 for i

© 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.

Infinity – NaN – SNaN special valuesInfinity – NaN – SNaN special values

Exponent range 10-6143 to 106144Exponent range 10-383 to 10384

16 bytes long8 bytes long

Guarantees 34 digits of precisionGuarantees 16 digits of precision

DECFLOAT(34)DECFLOAT(16)

Page 13: What's New in DB2 for i

© 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

Page 14: What's New in DB2 for i

© 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;

Page 15: What's New in DB2 for i

© 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;

Page 16: What's New in DB2 for i

© 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

Page 17: What's New in DB2 for i

© 2008 IBM Corporation

COMMENT and LABEL Enhancements

COMMENT ON CONSTRAINT mjatst.cst IS ‘A long description up to 2000 bytes’;

LABEL ON CONSTRAINT mjatst.cst IS ‘A short description up to 50 bytes’;

LABEL ON FUNCTION mjatst.fun IS ‘A short description up to 50 bytes’;

LABEL ON PROCEDURE mjatst.prc IS ‘A short description up to 50 bytes’;

LABEL ON ROUTINE mjatst.rtn IS ‘A short description up to 50 bytes’;

LABEL ON TRIGGER mjatst.trg IS ‘A short description up to 50 bytes’;

LABEL ON TYPE mjatst.typ IS ‘A short description up to 50 bytes’;

Add descriptive information to constraints, routines, and triggers.

Page 18: What's New in DB2 for i

© 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

Page 19: What's New in DB2 for i

© 2008 IBM Corporation

SQL Enhancements – Scalar Functions

Encrypts a string using the AES encryption algorithm ENCRYPT_AES

Returns the character that has the ASCII code value specified by the argument.

CHR

Returns the ASCII code value of the leftmost character of the argument as an integer

ASCII

Returns a timestamp truncated to the specified unit. TRUNC_TIMESTAMP

Returns a timestamp rounded to the specified unit. ROUND_TIMESTAMP

Returns an estimate of the number of months between two dates MONTHS_BETWEEN

Returns a character string representation of a timestamp, with the string in a specified format

VARCHAR_FORMAT

Returns a timestamp from a character string representation of a timestamp according to the specified format of the string.

TIMESTAMP_FORMAT

Datetime Functions

String Functions

Page 20: What's New in DB2 for i

© 2008 IBM Corporation

NCHAR, NVARCHAR, NCLOB

CREATE TABLE mjatst.table2 (

c1 NCHAR(10),

c2 NVARCHAR(20),

c3 NCLOB(1M) );

New standard way of specifying UTF-16.

DBCLOB (1M) CCSID 1200

DBCLOB (n) CCSID 1200

NATIONAL CHARACTER LARGE OBJECT

NCHAR LARGE OBJECT

NCLOB

NATIONAL CHARACTER LARGE OBJECT (n)

NCHAR LARGE OBJECT (n)

NCLOB (n)

VARGRAPHIC (n) CCSID 1200NATIONAL CHARACTER VARYING (n)

NATIONAL CHAR VARYING (n)

NCHAR VARYING (n)

NVARCHAR (n)

GRAPHIC (1) CCSID 1200

GRAPHIC (n) CCSID 1200

NATIONAL CHARACTER

NATIONAL CHAR

NCHAR

NATIONAL CHARACTER (n)

NATIONAL CHAR (n)

NCHAR (n)

Page 21: What's New in DB2 for i

© 2008 IBM Corporation

ALTER FUNCTION

ALTER FUNCTION mjatst.func1

ALTER NOT DETERMINISTIC

RETURNS NULL ON NULL OUTPUT;

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;

Change a function without having to reissue grants.

Page 22: What's New in DB2 for i

© 2008 IBM Corporation

Ignore unsupported syntax

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

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.

Page 23: What's New in DB2 for i

© 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

Page 24: What's New in DB2 for i

© 2008 IBM Corporation

BX Literals

CREATE TABLE qtemp.binary1 (c1 VARBINARY(1000));

INSERT INTO qtemp.binary1 VALUES( BX’A1B2C3D4’ );

Alternative method of specifying binary constants.

Page 25: What's New in DB2 for i

© 2008 IBM Corporation

New System Schemas

Two new system schemas to house future information.

SYSTEM PATH changes for SQL naming:

″QSYS″, ″QSYS2″, ″SYSPROC″, ″SYSIBMADM″, ″the value of the authorization ID of the statement″

SYSTOOLS and SYSIBMADM

New SYSTOOLS examples:

HARVEST_INDEX_ADVICE (builds an SQL script)

ACT_ON_INDEX_ADVICE (creates permanent indexes)

Page 26: What's New in DB2 for i

© 2008 IBM Corporation

Statistics Catalog Views

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.

SYSTABLEINDEXSTAT

Contains one row for every index built over a table partition or table member. SYSPARTITIONINDEXSTAT

Contains one row for every table partition or table member.SYSPARTITIONSTAT

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

Contains one row for every column in a table partition or table member and one row for every column statistics collection.

SYSCOLUMNSTAT

New views allow simple access to statistics.

These were PTFed to V5R4

SELECT table_schema, table_name, table_partition, number_rows, number_deleted_rows

FROM QSYS2.SYSPARTITIONSTAT

WHERE table_schema = ‘MJATST’

Page 27: What's New in DB2 for i

© 2008 IBM Corporation

Statistics Catalog Views

Contains one row for each program, service program, and module that contains SQL statements.

SYSPROGRAMSTAT

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.

SYSPARTITIONINDEXES

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.

SYSPARTITIONMQTS

Contains one row for each SQL package in the SQL schema. SYSPACKAGESTAT

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.

SYSMQTSTAT

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.

SYSINDEXSTAT

New views allow simple access to statistics.

NOT PTFed back

SELECT package_schema, package_name, package_type, number_statements, package_used_size

FROM QSYS2.SYSPACKAGESTAT

WHERE package_schema LIKE ‘Q%’

Page 28: What's New in DB2 for i

© 2008 IBM Corporation

CLIENT Special Registers

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

CURRENT CLIENT_WRKSTNNAME AS "Client Workstation“ FROM sysibm.sysdummy1;

Contains the value of the client user ID from the client information specified for this connection.

CURRENT CLIENT_USERID

Contains the value of the application name from the client information specified for this connection.

CURRENT CLIENT_APPLNAME

Contains the value of the client program ID from the client information specified for this connection.

CURRENT CLIENT_PROGRAMID

Contains the value of the workstation name from the client information specified for this connection.

CURRENT CLIENT_WRKSTNNAME

Contains the value of the accounting string from the client information specified for this connection.

CURRENT CLIENT_ACCTNG

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.

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.

Page 29: What's New in DB2 for i

© 2008 IBM Corporation

Interoperability – DRDA

DB2 for z/OSDB2 for VM and VSEDB2 for iDB2 for AIXDB2 for HP-UX DB2 for Sun SolarisDB2 for W indowsDB2 for Liniux Inform ix Txaction

Attachm ateGrandview HiT SoftwareMicrosoftOracleRocketStarQuestSybase/MDIW all DataXDB System s

ApplicationServer (Data)

DB2 for z/OSDB2 for VM and VSEDB2 for iDB2 for AIXDB2 for HP-UX DB2 for Sun SolarisDB2 for W indowsDB2 for Liniux

FileTek, Inc.Grandview Platinum Technology Inc. XDB Systems

Oracle and Microsoft do not support DRDA as a Server

6.1DDM and DRDA IPv6DRDA Identity tokensDRDA LOB OptimizationsDRDA Authentication MethodsDRDA Scrollable CursorsOutput parameter support for heterogeneous CALL

Server and Client

DDM/DRDA Protocols

DDM/DRDA Protocols

Page 30: What's New in DB2 for i

© 2008 IBM Corporation

6.1 Application Development

CLIAlias support in Metadata APIs

Row-wise array INSERT

Wide APIs

JDBCJDBC 4.0

Alias support in Metadata APIs

Returning DEFAULT

Return update counts

XDASQL Server Mode

Serviceability improvements

.NETMultiple-row INSERT

Additional data type support

Visual Studio integration

Distributed transaction support

Exploit ADO.NET 2.0

Native JDBC

JDBC 4.0

CLI Handle Threshold Exit

Embedded SQL RPG Precompiler Variable Scoping

Precompiler IFS support

Unicode support in COBOL

RUNSQLSTM IFS support

Run SQL Scripts flagger

Page 31: What's New in DB2 for i

© 2008 IBM Corporation

SQL Query Engine (SQE)

6.1 SQE (Stage 6)CCSID translation support Lateral CorrelationUDTF supportSignificant optimization time improvementsOther miscellaneous performance

SQE CharacteristicsParallel to Normal Release EnhancementsObject Oriented DesignEnhanced Performance primarily for complex queriesEnhanced Optimization EngineEnhanced Statistics Encoded Vector Indexes Enhancements

SQE DeliveryFirst Wave V5R2 GASecond Wave mid-V5R2 Third Wave V5R3 GAFourth Wave mid-V5R3 Fifth Wave V5R4 GA

Virtually all SQL queries use

SQE!

Page 32: What's New in DB2 for i

© 2008 IBM Corporation

SQL Runtime Performance ImprovementsHost Server Variable Length compression (V5R4 PTF)

SQL CALL cache improvements

Optimization time improvements

Long name resolve

Large page use (64K)

6.1 Performance

Database Maintenance Performance ImprovementsALWCANCEL(*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 ImprovementsPerformance Monitor Improvements

3010 fixes and Unicode

1000 records for non-SQL

Filter by port number and ipV6

Page 33: What's New in DB2 for i

© 2008 IBM Corporation

6.1 Increased Limits

SQL Application and Runtime Limits64K 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 LimitsNumber of schemas - number of dependent logical files – (partial V5R4 PTF)

Increase ALTER TABLE number of dependents supported

Increase Save number of dependents supported

Page 34: What's New in DB2 for i

© 2008 IBM Corporation

6.1 Availability/Recovery

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

Database

Logical file and MQT restore

XA and DDL improvements

Quiesce transactions for XSM Switchover

Serviceability improvements

Eliminate package corruption (V5R4 PTF)

Page 35: What's New in DB2 for i

© 2008 IBM Corporation

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

6.1 System i Navigator

Page 36: What's New in DB2 for i

© 2008 IBM Corporation

DB2 for iWhat’s New Since 6.1 GA

Page 37: What's New in DB2 for i

© 2008 IBM Corporation

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

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

Developer’s 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

Web Based Query and Reporting

Page 38: What's New in DB2 for i

© 2008 IBM Corporation

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

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

Page 39: What's New in DB2 for i

© 2008 IBM Corporation

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

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 SOA-based 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

Page 40: What's New in DB2 for i

© 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

Page 41: What's New in 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

Page 42: What's New in DB2 for i

© 2008 IBM Corporation

DB2® for i Post 6.1 Enhancements

Page 43: What's New in DB2 for i

© 2008 IBM Corporation

Post V5R4 GA Enhancements

Check the DB2 for i Home Page

Performance

Validate Constraints without Checking • V5R4 - Database Group SF99504 Version 18

• 6.1 - Database Group SF99601 Version 6

Preserve EVI Indexes on ALTER • V5R4 - Database Group SF99504 Version 19 (planned)

• 6.1 - In the base release

CPYFRMIMPF performance • V5R4 - Database Group SF99504 Version 19

• 6.1 - Database Group SF99601 Version 8

Materialize Member List Seize

• V5R4 - Database Group SF99504 Version 20

• 6.1 – Database Group SF99601 Version 9 (planned)

Solid State Disks (SSD)

V5R4 - Database Group SF99504 Version 21 and 22 (planned)

6.1 – Database Group SF99601 Version 9 and 10

(planned)

Audit and Security

SECURE columns

• V5R4 - Database Group SF99504 Version 19 (planned)

• 6.1 - Database Group SF99601 Version 8 (planned)

Systems Management

SQL Server Mixed Mode for Batch Processing • V5R4 - Database Group SF99504 Version 19 (planned)

• 6.1 - Database Group SF99601 Version 8 (planned)

Allow QSQSRVR jobs in a User Subsystem • V5R4 - Database Group SF99504 Version 18

• 6.1 - Database Group SF99601 Version 8 (planned)

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

• V5R4 - Database Group SF99504 Version 18

• 6.1 - Database Group SF99601 Version 7

Page 44: What's New in DB2 for i

© 2008 IBM Corporation

Post 6.1 GA Enhancements

Audit and Security

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

*JOBCTL No Longer Required for STRDBMON on JOB(*)• Database Group SF99601 Version 8

STRDBMON over a View• Database Group SF99601 Version 9 (planned)

Function

Allow Unqualified SRVPGM Names for RoutinesDatabase Group SF99601 Version 8

Availability and Recovery

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

Internal Error (-901) Service LoggingDatabase Group SF99601 Version 10 (planned)

Performance

SQL Procedure Performance Enhancements • Database Group SF99601 Version 7

PROGRAM TYPE SUB on CREATE PROCEDURE (SQL) • Database Group SF99601 Version 7

Page 45: What's New in DB2 for i

© 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)

Page 46: What's New in DB2 for i

© 2008 IBM Corporation

SECURE columns

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 VARCHAR(10) The system name of a table's schema.

Table_Name VARCHAR(10) The system name of a table.

Column_Name VARCHAR(10) The system column name that is secured.

Attribute VARCHAR(10) The attribute being set for the column.

The valid values of the Attribute are:

SECURE NO - This column does not contain data that needs to be secured in a database monitor or plan cache.

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.

Protects secure data in a database monitor and 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.

Page 47: What's New in DB2 for i

© 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 VARCHAR(10),

Table_Name VARCHAR(10),

Column_Name 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;

Page 48: What's New in DB2 for i

© 2008 IBM Corporation

SQL Server ModeSubsystem 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

Page 49: What's New in DB2 for i

© 2008 IBM Corporation

SQL Server ModeImproved 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.

Page 50: What's New in DB2 for i

© 2008 IBM Corporation

SQL Server ModeImproved identification of current user

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

Page 51: What's New in DB2 for i

© 2008 IBM Corporation

Collect SQL detailsFor all statements executedvia STRSQL or RUNSQLSTM

Start SQL Interactive Session (STRSQL command) users willobserve the following client special register values:

CLIENT PROGRAMID = 'STRSQL'CLIENT APPLNAME = 'START SQL INTERACTIVE SESSION'CLIENT USERID = The current user's nameCLIENT WRKSTNNAME = The DB2 for i database nameCLIENT ACCTNG = The current user's accounting code

(i.e. ACGCDE parameter on CHGUSRPRF)

Run SQL Statements (RUNSQLSTM command) users willobserve the following client special register values:

CLIENT PROGRAMID = 'RUNSQLSTM'CLIENT APPLNAME = 'RUN SQL STATEMENTS'CLIENT USERID = The current user's nameCLIENT WRKSTNNAME = The DB2 for i database nameCLIENT ACCTNG = The current user's accounting code

(i.e. ACGCDE parameter on CHGUSRPRF)

Page 52: What's New in DB2 for i

© 2008 IBM Corporation

Collect SQL detailsfor all statements executedvia 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*) )

Page 53: What's New in DB2 for i

© 2008 IBM Corporation

Collect SQL detailsonly for statements executedby 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')

Page 54: What's New in DB2 for i

© 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 MAINSpecifies that the routine executes as the main entry point in aprogram. The external program generated will be a *PGM object.

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

Service program calls perform faster than program calls

Page 55: What's New in DB2 for i

© 2008 IBM Corporation

DB2® for i - What’s Next

Disclaimer: The following information is tentativeand might not come to fruition.

IBM makes no guarantees or commitments to provide the features or functions listed here.

Page 56: What's New in DB2 for i

© 2008 IBM Corporation

Possible Future SQL Enhancements

Schema statements (DDL)XML data type

Global variables

Array support in routines

Encryption enhancements (FIELDPROCS)

Three-part Aliases

Partition table enhancements

MiscellaneousParameter marker enhancements

Expressions in CALL

Queries and Data Change statements (DML)MERGE

Result set support in embedded SQL

Scalar Functions XML functions

MQ Series functions

TIMESTAMP_FORMAT and VARCHAR_FORMAT enhancements

Page 57: What's New in DB2 for i

© 2008 IBM Corporation

Possible Future SQL Query Engine (SQE)

SQE CharacteristicsParallel to Normal Release EnhancementsObject Oriented DesignEnhanced Performance primarily for complex queriesEnhanced Optimization EngineEnhanced Statistics Encoded Vector Indexes Enhancements

SQE DeliveryFirst Wave V5R2 GASecond Wave mid-V5R2 Third Wave V5R3 GAFourth Wave mid-V5R3 Fifth Wave V5R4 GASixth Wave 6.1 GA

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

Page 58: What's New in DB2 for i

© 2008 IBM Corporation

SQL Runtime Performance ImprovementsSQL function enhancements (inline functions)

OVRDBF and REUSEDLT(NO) support available now via Lab Services

EVI enhancements

Possible Future Performance Enhancements

Database Maintenance Performance ImprovementsALTER TABLE performance and concurrency

CREATE ENCODED VECTOR INDEX idx2 ON sales (region)INCLUDE ( SUM(sales) )

SELECT region, SUM(sales) FROM sales GROUP BY region

Page 59: What's New in DB2 for i

© 2008 IBM Corporation

Possible Future Limits/Availability/Recovery

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)

Database

Read Currently Committed

Allow transactions to span *SYSBAS and IASPs

CHGPFCST CHECK(*YES *NO)

CHGSRCF TEXT(*FROMMBR) SRCTYPE(*FROMMBR)

SQL Application and Runtime Limits128-byte schema names

Page 60: What's New in DB2 for i

© 2008 IBM Corporation

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

Possible Future System i Navigator

Page 61: What's New in DB2 for i

© 2008 IBM Corporation