Your SlideShare is downloading. ×
DB2 UDB for iSeries: V5R3 Overview
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

DB2 UDB for iSeries: V5R3 Overview

3,037

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
3,037
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • This chart shows the DB2 UDB for iSeries strategic directions - as you progress through this presentation you will be able to relate the V5R2 enhancements back to the strategic intiatives. SQL is the industry standard for database access and programming. While the heritage of application development on the iSeries has been to use RPG-like native interfaces such as Data Desription Specifications (DDS) for defining databases, and using HLL languages such as RPG or COBOL to manipulate the data - ISVs and other application development efforts will be done using SQL. While the iSeries and AS/400e has always had a tremendous relational database management system built into the OS, many applications were developed using fairly proprietary interfaces vs. the open Structured Query Language (SQL) methods of accessing and managing databases. But in today's world, ISV's solutions are being written for portability and mutliple platform support purposes. To accomplish this, they choose application development environments such as Websphere, Java tm, or Domino, and they choose SQL as the common, portable method of communicating to the database. As you can see on the lower right hand graph, DB2 UDB for iSeries actually LEADS the industry in support of the SQL Core'99 Standard. DB2 UDB for iSeries "firsts" (first to market) include industry standard SQL Stored Procedures and Encoded Vector Indexing. IBM has several research labs that continue to produce new advances in database technology. The beauty of the IBM DB2 UDB family is that we can all share from this, and DB2 UDB for iSeries will continue to leverage the technology leadership position of IBM and maintain close compatilibity with the other DB2 UDB family members. Additionally, DB2 UDB for iSeries will continue to leverage and build on the strengths of the eServer iSeries. Those strengths include reliability/availability, total cost of ownership, scalability, and usability.
  • This chart shows the DB2 UDB for iSeries strategic directions - as you progress through this presentation you will be able to relate the V5R2 enhancements back to the strategic intiatives. SQL is the industry standard for database access and programming. While the heritage of application development on the iSeries has been to use RPG-like native interfaces such as Data Desription Specifications (DDS) for defining databases, and using HLL languages such as RPG or COBOL to manipulate the data - ISVs and other application development efforts will be done using SQL. While the iSeries and AS/400e has always had a tremendous relational database management system built into the OS, many applications were developed using fairly proprietary interfaces vs. the open Structured Query Language (SQL) methods of accessing and managing databases. But in today's world, ISV's solutions are being written for portability and mutliple platform support purposes. To accomplish this, they choose application development environments such as Websphere, Java tm, or Domino, and they choose SQL as the common, portable method of communicating to the database. As you can see on the lower right hand graph, DB2 UDB for iSeries actually LEADS the industry in support of the SQL Core'99 Standard. DB2 UDB for iSeries "firsts" (first to market) include industry standard SQL Stored Procedures and Encoded Vector Indexing. IBM has several research labs that continue to produce new advances in database technology. The beauty of the IBM DB2 UDB family is that we can all share from this, and DB2 UDB for iSeries will continue to leverage the technology leadership position of IBM and maintain close compatilibity with the other DB2 UDB family members. Additionally, DB2 UDB for iSeries will continue to leverage and build on the strengths of the eServer iSeries. Those strengths include reliability/availability, total cost of ownership, scalability, and usability.
  • OLE DB & ODBC - 0 - ASENSITIVE. Applies to ForwardOnly and Dynamic cursors only. Static cursors are always Insensitive. 1 - Insensitive. Applies to ForwardOnly and Static cursors only. Dynamic cursors can never be Insensitive. 2 - Sensitive. Applies to only Dynamic cursors. Forward Only and Static cursors can never be Sensitive.
  • Crypto 128-bit product included with base OS/400 & doesn't require crypto card
  • Crypto 128-bit product included with base OS/400 & doesn't require crypto card
  • Crypto 128-bit product included with base OS/400 & doesn't require crypto card
  • Sequence value actually stored in a Data Area object Constant sequence done by having Start With, Min & Max all the same value
  • Sequence value actually stored in a data area
  • The improvement to mark procedure information in non-SQL external programs applies only to ILE *PGMs and *SRVPGMs. We do allow you to build an external SQL procedure over an OPM program, but the procedure won't survive a save and restore.
  • OLE DB & ODBC - 0 - ASENSITIVE. Applies to ForwardOnly and Dynamic cursors only. Static cursors are always Insensitive. 1 - Insensitive. Applies to ForwardOnly and Static cursors only. Dynamic cursors can never be Insensitive. 2 - Sensitive. Applies to only Dynamic cursors. Forward Only and Static cursors can never be Sensitive.
  • DELETE without a WHERE clause will (in certain cases) be turned into a clear (if not under commit) or a special form of alter (if under commit).
  • Since the analytical reports that you run against the monitor data are really just good old database queries, you also need to make sure that your analytical reports are properly tuned (eg, right indexes on output monitor table) to make your performance analysis faster and more efficient. So you also need to apply your optimization and tuning skills to your analysis of the monitor data. Best way to reduce data and simplify analysis is to only collect monitor data for a single job, if possible. Elminate SQL statements generated by DB2 - for example, DROP with the CASADE option causes DB2 to query system catalogs to find dependent objects, those DB2 initiated queries show up in DBMon today with *ALL setting
  • CHGJRNOBJ change journal attributes without ending journaling & remembering the options specified Default changes CRTJRNRCV - (intended to help reduce journal thrashing and improve round-robin arm usage) CRTJRN - this change will cause sequence numbers to be reset every IPL unless you override with *MaxOpt3 APYJRNCHG/RMVJRNCHG: intended to better match modern ERP transaction integrity expectations AUDIT Journal: Uses RCVSIZOPT(*MAXOPT1) SMAPP, part of multi-release plan to gradually reduce abnormal IPL time to 15 min or less JORECRA Change: Better Auto-"Aging" of Changed Index Pages - Reduced Memory Contention in Batch Environments
  • If you specify LOCK(*EXCL) we keep that lock for the duration. If you specify LOCK(*EXCLRD) or LOCK(*SHRUPD), you keep that lock for the duration AND in addition you need an exclusive lock for a very brief period 1) In the following , the "reorganize will be close" to what? Concurrency If LOCK(*EXCL) is not chosen, then the reorganize will be close, but not guaranteed to be exact The order of the rows will not necessarily be exact. For example, if another user has row 43 locked, Reorganize will not be able to move it so it will not necessarily be in the right position at the end of the reorganize. In many cases, this is fine, in others, the applications depends on it being exact and should use *EXCL. 2) In the following does this imply that LOCK(*SHRUPD) will not truncate any space saved during the Reorg? I see the documentation talks about the Key order not being guaranteed Concurrency Exclusive lock required for short duration at either the end of a reorganize or at the beginning of the next reorganize to truncate space. It will attempt the truncate both at the start of the reorg and again at the end of the reorg regardless of the LOCK keyword value. However, if it cannot acquire an exclusive lock for the few milliseconds it takes to truncate the table, no storage will be reclaimed. 3) I assume that this means RI & Unique indexes are always maintained regardless of the index option chosen? Index Rebuild Unique and Referential integrity indexes must be maintained Yes 4) The Reorg Comparison chart has two red squares - any special significance to those? Yes, The highlighed squares indicate the cases where that option is better than the old reorg and vice versa. 5) The Reorg Comparison chart talks about temp storage impact for ALWCANCEL(*YES) impacting journal receivers - does that mean files have to be journaled to use ALWCANCEL(*YES)? Yes 6) Not sure what this row means in Reorg Comparison chart - Does it mean what's supported on Reorg when the file being reorg'd is an RI Parent or contains a Datalink Conrol column? Allows referential integrity parents and FILE LINK CONTROL DataLinks It means that if you have a table with a file link control data link or is a parent in a referential constraint, you cannot use the new reorg. 7) Does following row in Reorg Comparison chart talk about what happens when a DBXRef file or QTEMP file are specified on the RGZPFM command? Allows QTEMP and Database Cross Reference Files Yes, you cannot use the new reorg for QTEMP files or for XREF files
  • Well duh! I discoverd today that there is a keyword that defaults to forcing an access path rebuild. It can also specify *OPTIMIZE or *NO. The latter keeps the access paths maintained as it runs, though it runs more slowly. So far the process looks good, the only downside being the amount of journal entries it creates.
  • DB2 Dev Domain Article: www-106.ibm.com/developerworks/db2/library/techarticle/dm-0404gupta/
  • Courses with asterisks are or will be available by the end of June
  • Transcript

    • 1. DB2 UDB for iSeries: V5R3 Overview Shantan Kethireddy [email_address] 400618 (31GI)
    • 2. Agenda
      • Introduction
      • Application Development Enhancements
      • DB2 & SQL Enhancements
      • Performance Improvements
      • High Availability & OnDemand Enhancements
      • Tools & Utilities
    • 3. DB2 UDB for iSeries Strategic Initiatives
      • Openness - Industry Standard Support
        • Accomodate ISVs
        • Portability/Compatibility
        • Flexibility
      • Continued LEADERSHIP in database technologies
        • Consistency across DB2 family
        • Shared R & D across IBM Labs
      • Continued Leveraging of iSeries Strengths
        • Availability
        • Scalability
        • Usability - Total Cost of Ownership
        • Application Flexibility
      The industry trend toward off-the-shelf software results in a move to SQL ... V5R3
    • 4. DB2 UDB for iSeries V5R3 Enhancements
      • Application Flexibility & Portability
      • Enhanced SQL Standards support
        • INTERSECT
        • GET DIAGNOSTICS
      • Improved DB2 Family Compatibility
        • SEQUENCE Object
        • UTF encodings for Unicode
        • Column Encryption
        • Instead Of Triggers
      • Native .NET Provider
      • Server Consolidation
      • Database Migration Toolkits
      • OnDemand & Availability
      • Online & Parallel Reorganize
      • "Ragged" Save While Active
      • Journal Enhancements
      • Performance
      • SQL Query Engine enhancements
        • Star Join enhancements
        • Constraint Awareness
        • OnDemand Stats Generation
      • Faster SQL Deletes
      • Faster Stored Procedure Call Processing
      • Usability
      • iSeries Navigator Enhancements
        • Index Evaluator
        • Reorg Table Manager
        • RI Constraint Manager
      • Enhanced RPG SQL Precompiler
    • 5. Application Development Enhancements
    • 6. Application Development Enhancements - SQL & RPG
      • Enhanced ILE RPG SQL Precompiler
        • V5 qualified subfield names support based on the RPG IV D-spec QUALIFIED keyword (only 1 level of qualification - arrays not supported)
        • Conditional precompilation: /If, /Define, /Include, and other directives
        • Support for Nested /Copy
        • Properly parse source members with sub procedures (eliminates out of sequence error)
        • Allow use of array data structures on blocked Fetch & Insert
        • Support for host structure in Update statements (cannot be array data structure)
        • Allow use of LIKEDS & LIKEREC (second optional parameter of LIKEREC not supported)
        • New COMPILEOPT parameter on CRTSQLRPGI to eliminate two-step compile process
        • Support for RPG logical (indicator) variable (application responsible for only allowing values of 0 or 1)
        • Some restrictions still remain...
          • Free-format SQL & support for qualified names (greater than 1 level)
          • Support for proper scoping of local variables (multi-pass)
    • 7. Application Development Enhancements - .NET
      • V5R3 Functionality Includes:
        • Connection Pooling
        • Stored Procedures
        • SQL & SYS Naming formats
        • Unicode & LOBs
        • Isolation Level/Commitment Ctl
        • Tracing
        • Compression
      • Restrictions:
        • Package Support (Ext Dynamic)
        • Datalink Columns
        • CMD/PGM call
        • Data Queues
        • Blocked Inserts
        • AutoCommit restricted to isolation level (*none)
      • Native .NET provider for iSeries
        • Packaged in the iSeries Access for Windows V5R3 Client
    • 8. Application Development Enhancements - .NET
      • DB2 Application Development "Stinger“ Technology
        • Improved DB2 .NET Data Provider with better performance and support for DB2 UDB for iSeries servers - part of DB2 Connect
        • Enhanced DB2 add-ins for Microsoft Visual Studio
          • Integrate DB2 into Microsoft Development Tooling
          • Ease Creation of DB2 Objects:
            • Stored Procedures
            • Triggers
            • User Defined Functions
        • ibm.com/iseries/db2/awp.html
        • ibm.com/servers/enable/site/education/ibo/view.html?oc#db2
    • 9. Application Development Enhancements
      • Support for Scrollable stored procedure result sets ( all SQL interfaces )
      • Toolbox JDBC Driver Enhancements
        • Enhanced AutoCommit - isolation level other than *NONE can now be used
        • Enhanced XA (distributed transaction support)
      • Native JDBC Driver Enhancements
        • Improved performance of character data processing
        • Connection refusal for connections/jobs using 65535 CCSID to prevent confusion on "Row not found" errors
      • DB2 Web Services
        • Actually available on Post GA V5R2 with WAS Express
        • Support for SQL Select, Insert, Update, & Delete statements along with
        • Stored Procedure Calls
        • WORF component handles invocation and XML formatting out of results
        • More details at:
        • ibm.com/servers/enable/site/education/abstracts/db2web_abs.html
      Java & Web Services
    • 10. Application Development Enhancements
      • Enhanced OLE DB provider
        • SQL-only provider (IBMDASQL) including MTS Support
        • Support for commitment control
        • Support for SQL packages (ie, Extended Dynamic)
      • ODBC Driver Enhancements
        • Enhanced MTS & XA Transaction Support
        • Enhanced AutoCommit
        • ODBC driver for Linux applications
      • CLI Improvements
        • Column-wise binding to complement existing row-wise binding support
        • SQLGetInfo enhanced to return SQL_Keywords and Connection_Job_Name
        • New Connection Attributes for:
          • Setting minimum and maximum values for precision & scale
          • Unicode SQL statements (SQL_ATTR_UCS2 - also available on V5R2)
          • Hex literals designation
      OLE DB, ODBC, CLI
    • 11. Application Development Enhancements
      • Cursor sensitivity controls if database recognizes table changes (insert, update, delete) after a cursor has been opened
        • ASENSITIVE - Default, DB2 can choose any setting. Updateable cursors always default to SENSITIVE
        • INSENSITIVE - Cursor will be insensitive to changes and behave as a read-only cursor by creating a temporary result file to process
        • SENSITIVE - Cursor implementation will have some sensitivity to changes. Prevents temporary copies and usage of DB2 SMP
      • Interface (get more details in Sensitivity article at: ibm.com/iseries/db2/sqe.html)
        • Embedded SQL: New keywords on DECLARE CURSOR & PREPARE ATTRIBUTES
        • OLE DB "Cursor Sensitivity" connection property (0-Asensitive/1- Insensitive/2-Sensitive)
          • Static Cursors are always insensitive (same for ODBC)
          • Forward Only cursors can never be sensitive (same for ODBC)
        • ODBC: SQL_ATTR_CURSOR_SENSITIVITY attribute on SQLSetStatementAttr (ODBC 3.0) or CURSORSENSITIVITY Connection keyword for ODBC 2.0
        • JDBC: "Cursor sensitivity" connection property (asensitive/insensitive/sensitive)
          • Insenstive value only recognized with TYPE_FORWARD_ONLY result set type
          • Sensitivie value only recognize with TYPE_SCROLL_SENSITIVE result set type
      Cursor Sensitivity
    • 12. Application Development Enhancements
      • Dynamic Cursor Control with Cursor Attributes on PREPARE
        • Allows you to adjust the sensitivity, scrolling, lock holding, and result set attributes of an existing cursor
        • PREPARE s1 ATTRIBUTES :hv1 FROM :stmt
      • New GET DIAGNOSTICS statement
        • Superset of all SQL error & diagnostic interfaces
        • Provides functionality & information similar to ODBC "SQLGet" functions like SQLGetConnectAttr & SQLGetStmtAttr
        • Examples:
      Improved SQL Diagnostics & Dynamic Cursor Control Statement Info: GET DIAGNOSTICS rcount = ROW_COUNT, rcmd = COMMAND_FUNCTION, rnbr = NUMBER, rmore = MORE Connection Info: GET DIAGNOSTICS rcname = CONNECTION_NAME, rcsts = CONNECTION_STATUS, rnbr = DB2_PRODUCT_ID
    • 13. DB2 & SQL Enhancements
    • 14. New Column Types & Attributes
      • Binary & VarBinary data types
      • Large Decimals - up to 63 digits precision
      • New Unicode support: UTF-16 & UTF-8 encodings
        • Enhances performance in unicode-based environments like Java by eliminating EBCDIC to Unicode conversion
        • Examples:
          • UTF-16: name GRAPHIC(10) CCSID(1200)
          • UTF-8: name CHAR(10) CCSID(1208)
          • UCS-2 : name GRAPHIC(10) CCSID(13488)
    • 15. New functions for Column Encryption/Decryption
      • Encrypt & Decrypt SQL scalar functions
        • Requires the IBM Cryptographic Access Provider 128-bit product
        • Column Requirements:
          • Data Type Requiremetns: BINARY/VARBINARY, CHAR/VARCHAR FOR BIT DATA, BLOB, and DDS CHAR/VARCHAR with CCSID(65535)
          • Length Requirements:
            • Extra 8 bytes & total length must be rounded to 8-byte boundary (replace 8 with 16, if BLOB or double-byte CCSID)
            • 32-byte hint can optionally be stored with encrypted value
            • Example: 6-byte employee id with no hint needs to be stored in a 16-byte column CREATE TABLE emp( id VARCHAR(16) FOR BIT DATA, name VARCHAR(50)) SET ENCRYPTION PASSWORD = 'protect‘ INSERT INTO emp VALUES(ENCRYPT('112233'), 'BOB SANDERS' ) SELECT DECRYPT_CHAR(id), name FROM emp
    • 16. New functions for Column Encryption/Decryption
      • Encrypt & Decrypt SQL scalar functions
        • Password management
          • When connected to remote databases, password is sent in the clear may consider using communication encryption (eg, IPSEC or SSL)
          • Best option would be to store the password in OS/400 validation list
            • Encryption password would be stored in the encrypted data value and the list entry name could be table name or some other identifier
            • Validation list suggestions:
              • Make Public authority *EXCL
              • Programs would need authority to access validation list, best to use program adopted authority
          • Password Hint (if stored) retrieved with GETHINT function SELECT GETHINT(id) FROM...
        • Native program access:
          • Encryption: Use Before or Instead Of Triggers to intercept write requests and then have the trigger execute the Encrypt function against sensitive columns
          • Decryption: Define SQL View containing decrypt and then open SQL View as a logical file to read unencrypted data
    • 17. Sequence Object
      • Another DB2 construct that supports the automatic generation of column values
        • Viewed as a superset of V5R2 identity columns
        • Generated values easily shared across tables
        • Can create constant sequence to be used as Global DB2 variables
      • Example: CREATE SEQUENCE order_seq START WITH 1 INCREMENT BY 1 NO MAX VALUE INSERT INTO orders(ordnum,custnum) VALUES (NEXT VALUE FOR order_seq, 123) VALUES NEXT VALUE FOR order_seq INTO :hostvar UPDATE orders SET ordnum = :hostvar WHERE custnum = 123
    • 18. Sequence Object
      • Sequence values can be used to generate non-numeric key CREATE SEQUENCE s START WITH 1001; ...
      • ID='N'||CAST(NEXT VALUE FOR s AS CHAR(4))
      • Customizable Sequence Attributes
        • START WITH & INCREMENT BY
        • MINVALUE & MAXVALUE
        • CYCLE & NO CYCLE
        • CACHE & NO CACHE - To improve performance, DB2 allocates a block of sequence values at the job/connection level.
        • ORDER & NO ORDER - ORDER ensures that values are returned in the actual order that they are requested independent of the job/connection. NO ORDER is the default. ORDER also disables caching.
      • Sequence attributes can be changed with the ALTER SEQUENCE statement
      CREATE SEQUENCE s1 CACHE 20 NO ORDER Job1: NEXT VALUE FOR s1 => VALUE = 1 Job 2: NEXT VALUE FOR s1 => VALUE = 21 Job 1: NEXT VALUE FOR s1 => VALUE = 2 Job 1: NEXT VALUE FOR s1 => VALUE = 3 Job 2: NEXT VALUE FOR s1 => VALUE = 22 CREATE SEQUENCE s1 NO CACHE ORDER Job1: NEXT VALUE FOR s1 => VALUE = 1 Job 2: NEXT VALUE FOR s1 => VALUE = 2 Job 1: NEXT VALUE FOR s1 => VALUE = 3 Job 1: NEXT VALUE FOR s1 => VALUE = 4 Job 2: NEXT VALUE FOR s1 => VALUE = 5
    • 19. INSERT & SELECT enhancements
      • INSERT row expression values for blocked inserts INSERT INTO table1 VALUES (11,'TESTING'), (2,'ADMINSTRATION')
      • EXCEPT & INTERSECT operators
        • Return all rows that are in t1, but not t2 (SELECT cusnum FROM orders2003) EXCEPT DISTINCT (SELECT cusnum FROM orders2004)
        • All rows that exist in t1 & t2 (SELECT cusnum FROM orders2003) INTERSECT DISTINCT (SELECT cusnum FROM orders2004 )
      • Named Column Joins SELECT * FROM t1 INNER JOIN t2 USING (c1, c2)
      • Lateral Correlation SELECT * FROM t1,TABLE(SELECT * FROM t2 WHERE t1.c1=t2.c1) AS t3
    • 20. Stored Procedure Enhancements
      • Faster call processing
        • Up to 50% performance improvement on repeated calls within a connection
        • Improved processing of long SQL procedure names
        • Improved procedure resolution with unqualified procedure calls & *SYS naming
      • External Procedure Enhancements
        • Support for Service Program Objects
        • Improved external program marking
      • More efficient code generation for SQL Procedure (function & triggers)
      • DB2 Family Compatability:
        • WITH HOLD clause for FOR loop FOR v1 AS c1 CURSOR WITH HOLD FOR SELECT firstname, lastname FROM emp DO SET fullname = firstname || ' ' || lastname; INSERT INTO namelist VALUES (fullname); ... END FOR;
    • 21. Stored Procedure Enhancements
      • Result Set Enhancements
        • Scrollable stored procedure result sets (cursor result sets only)
        • Result Set Consumer Control RETURN TO CLIENT DECLARE c1 CURSOR FOR WITH RETURN TO CLIENT SELECT * FROM t1 SET RESULT SETS WITH RETURN TO CLIENT FOR CURSOR x1 RETURN TO CALLER DECLARE c1 CURSOR FOR WITH RETURN TO CALLER SELECT * FROM t1 SET RESULT SETS WITH RETURN TO CALLER FOR ARRAY :array1 FOR :hv1 ROWS
      Proc B Proc A Proc B Proc A RETURN TO CLIENT RETURN TO CALLER
      • Now available on V5R2 - just load the next V5R2 Database Group PTF (#17)
    • 22. Richer SQL function set
      • Other new functions include: MULTIPLY_ALT, BIT_LENGTH, OCTET_LENGTH, DATABASE
      SELECT TIMESTAMP_ISO( datecol ) FROM t1 returns the timestamp from datecol . Returns a timestamp based on a date, time, or timestamp argument. TIMESTAMP_ISO SELECT RIGHT( 'ABCXYZ',3 ) FROM t1 returns 'XYZ'. Returns the rightmost N characters from a string. RIGHT SELECT MONTHNAME( datecol ) FROM t1 returns the name of the month from the date. Returns the month name from a datetime value. MONTHNAME SELECT DAYNAME( datecol ) FROM t1 returns the name of the day from the date Returns the name of the day of the week. DAYNAME SELECT REPEAT('ABC', 2) FROM t1 returns 'ABCABC'. Returns a string composed of another string repeated n times REPEAT SELECT INSERT( 'INSERTING',1,3,'XX' ) FROM t1 returns 'XXERTING' Returns a string where one substring is deleted and another substring is inserted. INSERT SELECT EXTRACT(YEAR FROM datecol ) FROM t1 returns the year from the date. Returns the specified portion of a datetime value. EXTRACT SELECT REPLACE('ABCXYZ','ABC','123') FROM t1 returns '123XYZ'. Returns a string where a given string is replaced with another string. REPLACE
    • 23. Miscellaneous DB2 Enhancements
      • DATE, TIME, & TIMESTAMP literals
      • LOCALTIME & LOCALTIMESTAMP special registers
      • Limit Improvements
        • 256 Tables in a View
        • 1.7 TB table size limit
      • CPYFRMIMPF support for BLOBs (V5R2 PTF available: SI08237)
      • Easier database creation script management with RUNSQLSTM
        • Severity level of 20 now causes DROP errors to be ignored
      • New Exit Point for Database Open: QIBM_QDB_OPEN
        • Offers more info & control than Object-Level Auditing
          • Exit Program can cancel the Open operation if it considers access to be unauthorized
          • Exit Program can differentiate between Opens caused by query versus application
        • Exit Point available on V5R2 PTF (SI17353 & SI17578)
    • 24. INSTEAD OF Triggers
      • New Trigger type can be used to change the semantics of INSERTs, UPDATEs, & DELETE operations against a view
        • Certain views contain transformations that make the view read-only, but application really wants to use the View for all I/O operations
        • Not part of V5R3 GA, delivered with V5R3 DB Group PTF #4 (ibm.com/iseries/db2/iot.html)
          • New trigger type not viewable with iSeries Navigator or DSPFD, etc in V5R3
          • All view types are NOT supported in V5R3 (eg, views referencing more than one table not supported until next release )
        • Example: CREATE VIEW my_logins(system, login, passwd) AS SELECT system,login,decrypt_char(passwd) FROM regusers WHERE userid=USER CREATE TRIGGER insert_my_logins INSTEAD OF INSERT ON my_logins REFERENCING NEW AS n FOR EACH ROW MODE DB2SQL INSERT INTO regusers VALUES (USER,n.system,n.login,Encrypt(n.passwd)) CREATE TRIGGER update_my_logins INSTEAD OF UPDATE ON my_logins REFERENCING OLD AS o NEW AS n FOR EACH ROW MODE DB2SQL UPDATE reguser SET system=n.system,login=n.login,passwd=Encrypt(n.passwd) WHERE system=o.system AND login=o.login AND userid=USER
    • 25. Performance Enhancements
    • 26. V5R3 DB2 Performance Enhancements
      • Enhanced SQE Capabilities
      • Caching of Deterministic UDF Calls - SQE Only
      • Faster Stored Procedure Call Processing
      • Improved SQL Function & Procedure Expressions
      • Faster DELETE without WHERE clause statements
        • CLRPFM used when used with "No Commit" isolation level
        • Special ALTER TABLE used when run with Isolation Level/Commit
      • Enhanced Database Monitor
        • Ability to suppress monitor records for short-running SQL requests
        • Filter to eliminate DB2 generated SQL statements
        • More diagnostic details on events that force Full Open/ODP Creation
      • Parallel Reorganize
    • 27. V5R3 SQE Enhancements
      • Elimination of the following V5R2 restrictions:
        • View References
        • UNION
        • Subqueries
        • Derived Tables & Common Table expressions
        • Update & Delete-capable statements
        • Remaining SQE restrictions:
          • LIKE Predicate
          • LOB columns
          • Sort sequences
          • UDTFs
          • ALWCPYDTA(*NO) & SENSITIVE Cursors
          • Logical File References
          • Select/Omit Logical Files
          • Non-SQL interface
    • 28. V5R3 SQE Enhancements
      • Star Join Recognition (ie, Lookahead Predicate Generation)
      • Check Constraint Awareness
        • SQE Stats Manager can use constraints to improve accuracy of Filter Factors & Cardinality
        • SQE Optimizer will rewrite query to avoid execution when input data is out of range Constraint Def: CHECK(col1 BETWEEN 1 AND 100) Original Query: SELECT * FROM t2 WHERE col1=:hv Rewritten Query: SELECT * FROM t2 WHERE (:hv BETWEEN 1 AND 100) AND col1 = :hv
      • RI Constraint Awareness
        • SQE Optimizer can rewrite query to eliminate join combinations
      • Immediate on-demand statistics generation
      • Result Set Caching
      • Customized Visual Explain for SQE access methods
      • “ Enhanced” Index Advisor (requires latest Database Group PTF)
    • 29. Performance - New QAQQINI Options * - Only available on V5R3, no PTFs for prior releases *SYSTEM , *JOB,*NONE Allows SQE to use cached results sets from previously run queries CACHE_RESULTS * *NONE, *OPTIMIZE , Integer Allows user to control when & how V5R3 SQL Fast Delete support is used SQL_FAST_DELETE_COUNT * *NO , *YES Allows SQE to process SQL statement even when an unsupported index type exists over the table(s) IGNORE_DERIVED_INDEX Integer(1-255, 2 ) Allows the user to adjust background access plan compression when using SQL packages SQL_STMT_COMPRESS_MAX* Possible values Description Option
    • 30. Performance - Enhanced DB Monitor capabilties
      • New options to make analysis & collection of monitor date more efficient
        • Only collect Monitor Data for long running SQL statements - based on
        • Optimizer's Estimated Runtime
          • QAQQINI Option: DATABASE_MONITOR_THRESHOLD (supported on V5R2) Only those queries whose estimated runtime exceeds this threshold value (in seconds) will be included in the database monitor collection Default Value : All Statements (ie, 2147483647 seconds)
        • Eliminate SQL statements generated by DB2
          • QAQQINI Option: SQL_DBMON_OUTPUT (supported on V5R2) Possible Values : *USER, *SYSTEM, *ALL Default Value : *USER
        • Table Filter - only collect statements referencing certain tables STRDBMON OUTFILE(o) COMMENT('TABLEFILTER(lib1/tab1,lib2/tab3)')
            • V5R2 PTFs: SI15035, SI15139, SI15140, SI15142, SI15143, SI15154, SI15155, SI15157
            • V5R3 PTFs: SI15955, SI16331, SI16332, SI16333
    • 31. OnDemand & Availability Enhancements
    • 32. Journal Enhancements
      • Ehanced Save While Active support - SAVACTWAIT(*NOCMTBDY)
      • New CHGJRNOBJ command to adjust journal attributes on the fly
      • New journal sequence maximum - *MAXOPT3
      • FRCAPPPTH(*YES) & JRNSTATE(*INACTIVE) settings are now ignored
      • RCVJRNE now supports 1024 journal receviers
      • NEW Defaults for Journal Commands & Settings
        • CRTJRNRCV : THRESHOLD default changes from *NONE to 1.5 GB
        • CRTJRN : MNGRCV default changes from *USER to *SYSTEM
        • APYJRNCHG/RMVJRNCHG: CMTBDY default changed to *YES
        • AUDIT Journal: Uses RCVSIZOPT(*MAXOPT1)
        • SMAPP(EDTRCYAP): *SYSDFT drops from 90 to 60 minutes
      • New Journal Minimal Data Checksum to increase data integrity of journal apply
      • Journal Performance Improvements
        • Faster long-running ROLLBACKs
        • Remote Journal Super Bundling
        • RCVJRNE Performance Improved 15-20%
    • 33. Online & Parallel Reorganize
      • New Reorganize capabilities activated with new parameter ALWCANCEL(*YES)
        • ALWCANCEL(*YES) requires file to be journaled
        • New parameter, LOCK, controls the concurrent access
        • If Exclusive lock not requested, then row order may be different & space may not be reclaimed
      • Parallel capabilities rely on DB2 SMP licensed feature being installed & activated
      • New Index Rebuild parameter RBDACCPTH
        • RI & Unique indexes always maintained
    • 34. Online & Parallel Reorg Comparison Most - journal entires for all rows moved Most - journal entires for all rows moved More - journal entires for all rows moved Minimal - one journal entry Minimal - one journal entry HABP replication cost No No No Yes Yes Allows QTEMP & Database Cross Ref Files No No No Yes Yes Allows referential integrity parents and FILE LINK CONTROL DataLinks Worse Worse Worse Good Good Variable length segment reorganize Most More Smallest Next smallest Smallest Amount of CPU & I/O used Only if LOCK(*EXCL) and not restarted Only if LOCK(*EXCL) and not restarted Only if LOCK(*EXCL) and not restarted Yes Yes Final row position exact Maintain indexes or synchronous or asynchronous rebuilds Maintain indexes or synchronous or asynchronous rebuilds Maintain indexes or synchronous or asynchronous rebuilds Synchronous or asynchronous rebuilds Synchronous or asynchr onous rebuilds Index processing (non-KEYFILE) Duplicate ordering preserved N/A N/A Duplicates reversed N/A LIFO KEYFILE index processing Journal receiver storage Journal receiver storage Journal receiver storage Double data storage Double data storage Temporary storage Slowest Slower Very fast Fast Very fast Non-parallel performance Data movement and index rebuilds Data movement and index rebuilds Data movement and index rebuilds Only index rebuilds Only index rebuilds Parallel processing Yes Yes Yes No No Concurrent Access Yes Yes Yes No No Cancel and restart KEYFILE (*FILE or keyfile) KEYFILE (*NONE) KEYFILE (*RPLDLTRCD) KEYFILE (*FILE or keyfile) KEYFILE (*NONE) ALWCANCEL(*YES) ALWCANCEL(*NO)
    • 35. Tools & Utilities
    • 36. iSeries Navigator Enhancements
      • Index Evaluator
      • DB2 Object Type Folders
      • Show Related (graphical DSPDBR)
      • Constraint Management Interface (graphical WRKPFCST)
      • Reorganize Table Manager
      • SQE Aware Visual Explain
      • Run SQL Enhancements
        • Font Chooser
        • Integrated support for Graphical Debugger
        • Sortable Explainable Stmts
        • Run & Explain support for Stored Proc calls
      • New Show Command
      • Improved Multi-tasking Support
    • 37. iSeries Navigator - Index Evaluator
      • Required PTFs:
      • V5R3 usage requires iSeries Access V5R3 Fixpak #2 and the
      • following V5R3 Server PTFs: SI12938 & SI12873
      • V5R2 usage requires iSeries Access V5R3 Fixpak #3 &
      • V5R2 Server PTF SI16313
    • 38. iSeries Navigator - Show Related
    • 39. iSeries Navigator - Graphical Procedure Debugger
    • 40. iSeries Navigator - RI Constraint Management
    • 41. Rational XDE Modeler & DB2 UDB for iSeries Rational Suite, v2003.06.12 - ibm.com/software/awdtools/developer/rosexde/
    • 42. DB2 MTK Enhancements
      • Migration Toolkit Enhancements
        • Support for V5R3 enhancements, Sequence objects big improvement for Oracle migrations
        • Re-engineering of existing SQL Server & Sybase Migration Tool into the "Oracle" MTK architecture and interface
        • Informix Database Support
        • Free Download at: ibm.com/servers/enable/site/db2/porting.html
    • 43. New Table Types for DB2 UDB
      • Materialized Query Tables (MQTs)
        • Only creation of MQTs supported with V5R3 GA
        • PTFs released in April 2005 (ibm.com/iseries/db2/mqt.html) enable query optimizer awareness of MQTs
          • MQTs must be maintained & refreshed by the user
          • Read white paper ( ibm.com/servers/enable/site/education/abstracts/438a_abs.html )
      • Partitioned Tables
        • ONLY should be used in cases where single table limit of 1.7 TB or 4.2 billion rows will be exceeded
        • Partition tables should not be used to improve performance
          • Limited optmizer awareness of partitions, especially the CQE query optimizer
          • Fast delete of rows in a partition is supported
        • If you are considering using partitioned tables in V5R3, then…
          • Read white paper ( ibm.com/servers/enable/site/education/abstracts/2c52_abs.html )
          • Contact the DB2 Solutions Enablement Team (rchudb@us.ibm.com)
    • 44. Additional Information
      • DB2 UDB for iSeries home page - ibm.com/iseries/db2
      • Newsgroups
        • USENET: comp.sys.ibm.as400.misc, comp.databases.ibm-db2
        • iSeries Network SQL & DB2 Forum - http://www.iseriesnetwork.com/Forums/main.cfm?CFApp=59
      • Education Resources - Classroom & Online
        • http://www.iseries.ibm.com/db2/gettingstarted.html
        • http://ibm.com/servers/enable/site/education/ibo/view.html?oc#db2
      • DB2 UDB for iSeries Publications
        • Online Manuals: http://www.iseries.ibm.com/db2/books.htm
        • Porting Help: http://ibm.com/servers/enable/site/db2/porting.html
        • DB2 UDB for iSeries Redbooks (http://ibm.com/redbooks)
          • Stored Procedures, Triggers, and UDFs on DB2 UDB for iSeries (SG24-6503)
          • Preparing for the V5R2 SQL Query Engine (SG24-6598)
          • Modernizing iSeries Application Data Access (SG24-6393)
        • SQL/400 Developer's Guide by Paul Conte & Mike Cravitz
          • http://as400network.com/str/books/Uniquebook2.cfm?NextBook=183
    • 45. DB2 UDB Family Certifications
      • Certified Database Associate - DB2 UDB Family (Test 700)
        • Website : ibm.com/certify/certs/dbdaudv81.shtml
        • Education Resources: ibm.com/certify/tests/edu700.shtml
        • Online Tutorial:
        • www7b.boulder.ibm.com/dmdd/library/tutorials/db2cert/db2cert_V8_tut.html
      • Certified Application Developer - DB2 UDB Family (Test 703)
        • Website : ibm.com/certify/certs/dbapudv81.shtml
        • Education Resources : ibm.com/certify/tests/edu703.shtml
      • Sample Tests: certify.torolab.ibm.com/ice
      • Exams were refreshed & updated for DB2 UDB for iSeries
    • 46. Education Roadmap ibm.com /iseries/db2/gettingstarted.html ibm.com /services/learning
      • Self-study iSeries Navigator tutorials for DB2 UDB at: ibm.com/servers/enable/site/education/ibo/view.html?oc#db2
      DB2 UDB for iSeries Fundamentals (S6145) DB2 UDB for iSeries SQL Advanced Programming (S6139) DB2 UDB for iSeries SQL & Query Performance Workshop ibm.com/servers/eserver/iseries/ service/igs/db2performance.html Accessing DB2 UDB for iSeries w/SQL (S6137) Developing iSeries applications w/SQL (S6138)
      • Piloting DB2 UDB with iSeries Navigator
      • Performance Tuning DB2 UDB with
      • iSeries Navigator & Visual Explain
      • Integrating XML and DB2 UDB for iSeries
    • 47. Trademarks and Disclaimers
      • © IBM Corporation 1994-2005. All rights reserved.
      • References in this document to IBM products or services do not imply that IBM intends to make them available in every country.
      • The following terms are trademarks of International Business Machines Corporation in the United States, other countries, or both:
      • Rational is a trademark of International Business Machines Corporation and Rational Software Corporation in the United States, other countries, or both.
      • Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
      • Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.
      • Intel, Intel Inside (logos), MMX and Pentium are trademarks of Intel Corporation in the United States, other countries, or both.
      • UNIX is a registered trademark of The Open Group in the United States and other countries.
      • SET and the SET Logo are trademarks owned by SET Secure Electronic Transaction LLC.
      • Other company, product or service names may be trademarks or service marks of others.
      • Information is provided "AS IS" without warranty of any kind.
      • All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer.
      • Information concerning non-IBM products was obtained from a supplier of these products, published announcement material, or other publicly available sources and does not constitute an endorsement of such products by IBM. Sources for non-IBM list prices and performance numbers are taken from publicly available information, including vendor announcements and vendor worldwide homepages. IBM has not tested these products and cannot confirm the accuracy of performance, capability, or any other claims related to non-IBM products. Questions on the capability of non-IBM products should be addressed to the supplier of those products.
      • All statements regarding IBM future direction and intent are subject to change or withdrawal without notice, and represent goals and objectives only. Contact your local IBM office or IBM authorized reseller for the full text of the specific Statement of Direction.
      • Some information addresses anticipated future capabilities. Such information is not intended as a definitive statement of a commitment to specific levels of performance, function or delivery schedules with respect to any future products. Such commitments are only made in IBM product announcements. The information is presented here to communicate IBM's current investment and development activities as a good faith effort to help with our customers' future planning.
      • Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore,
      • no assurance can be given that an individual user will achieve throughput or performance improvements equivalent to the ratios stated here.
      • Photographs shown are of engineering prototypes. Changes may be incorporated in production models.
      iSeries IBM (logo) eServer i5/OS IBM AS/400e OS/400 e-business on demand AS/400

    ×