IBM Systems Tecdhnical University
Transcription
IBM Systems Tecdhnical University
What’s New in DB2 for i 7.2 © Copyright IBM Corporation 2015 Technical University/Symposia materials may not be reproduced in whole or in part without the prior written permission of IBM. 9.0 DB2 for i Strategy • Simplicity • Integration • Robust scalability • Trusted security & availability • Strategic solutions with open standards IBM Systems Tecdhnical University Linda M Swan DB2 for i SQE Optimizer Team IBM Application Development Advancements SQL Routine Enhancements –Constants –Autonomous procedures –Enhanced Debug* –Pipelined table functions* Trigger Obfuscation Compatibility with DB2 Family & Oracle –Timestamp precision –Regular expressions* –Truncate statement –Function parameter defaults –Transfer Ownership statement Linux ODBC driver* JDBC & .NET enhancements** Improved Security & Reliability RCAC Separation of duties Remote Journal SSL Deferred Journal Restore* Journal viewer* Enhanced Performance & Scalability Plan Cache self-management* Enhanced I/O Costing 1.7 TB Indexes* Reuse Deleted Rows VLDB awareness* Enhanced storage management for LOB & Variable-length & LOB columns* Simplified Management Enhanced Plan Cache Metrics & Controls* Generate SQL – improved DDS conversion* Health Center System Limits tracking* Dynamic Compound statement* DB2 for i Services** * - Also available on IBM i 7.1 ** - Also available on IBM i 6.1 & 7.1 ibm.com/developerworks/ibmi/techupdates/db2 Application Development Enhancements IBM Systems Tecdhnical University DB2 for i 7.2 Enhancements • IBM i Client Access drivers & providers (ODBC, ADO.NET, OLE DB) – New offering for Windows middleware: IBM i Access Client Solutions Windows Application Package* – New Linux ODBC driver: IBM i Access Client Solutions Linux Application Package* – IBM i Access Client Solutions consolidates the most commonly used tasks for managing your IBM i into one simplified location. • SQL CLI – Timestamp precision support • Toolbox JDBC – – – – Timestamp precision support QueryTimeoutMechanism connection attribute Faster blocked inserts* JTLite for mobile devices* • Native JDBC Driver – Timestamp precision support • DB2 Connect 10.5 (includes ADO.NET provider, JDBC, & ODBC support) – *SYS naming support + additional DB2 for i connection attributes* – Add-in support for Visual Studio 2013* – Entity framework support** Procedural SQL Enhancements • Parameter defaults • Routine constants • Obfuscation • Simplified management of Routines with CL commands (MOVOBJ, RNMOBJ, CPYLIB, CRTDUPOBJ)* • Enhanced debug capabilities for SQL routines* – Single-step capability – Direct SQL variable evaluations: EVAL %%VarName • Trigger enhancements – Multi-action triggers* – Alter Trigger statement for Enable/Disable • UDF enhancements – ARRAY parameter support – Function resolution casting rules – Pipelined table functions* • Autonomous procedures IBM Systems Tecdhnical University Middleware enhancements • Defaults can be used to minimize code changes when new parameters are added to an existing routine – Parameters can be omitted from invocation when default value defined – Parameters may be specified in any order by specifying the parameter name in the call – Support: • SQL & External user-defined functions • SQL & External stored procedures* CREATE FUNCTION New_Prescription ( drugName CHAR(40), prescID INTEGER DEFAULT (VALUES(NEXT VALUE FOR idSequence)), refils INTEGER DEFAULT 0) ... Omitting parameters – defaults used New_Prescription(‘Accutane') Using a named parameter New_Prescription(‘Accutane', Refils=>3) Routine constants • Provides variables that are guaranteed not to change – Prevent accidental assignments – Prevent value from being changed in debugger session CREATE PROCEDURE Increase_Credit ( ClientID CHAR(8), CreditAmnt DECIMAL(8,2)) LANGUAGE SQL BEGIN DECLARE max_allowed DECIMAL(8,2) CONSTANT 75000; IF CreditAmnt > max_allowed THEN SIGNAL SQLSTATE 38001 SET MESSAGE_TEXT = 'Request exceeds maximum limit'; END IF; ... IBM Systems Tecdhnical University Parameter defaults Obfuscation – By default, DB2 catalog stores routine source code for anyone to see – intellectual asset exposure for software providers – With obfuscation, routine source code can be masked for Triggers, Stored Procedures*, and User-Defined Functions* – Two methods: WRAP function: Generate obfuscated version of CREATE statement to run on customer system VALUES( SYSIBMADM.WRAP (‘CREATE PROCEDURE chgSalary(IN empno CHAR(6)) LANGUAGE SQL BEGIN UPDATE employee SET empsal = empsal*(1 + .05*empjobtype) WHERE empid = empno; END’) ); CREATE PROCEDURE chgSalary ( IN EMPNO CHAR (6)) WRAPPED QSQ07010 aacxW8plW8FjG8pnG8VzG8FD68Fj68:Hl8:dY_pB2qpdW8pdW8pdW_praqebaqebaGEMj_vs PBs5bOJUUqnHVayEl_ogAlGWqz2jJCIE1dQEjt33hd5Sps5cYGViD1urv7vGKeOcC4CwpCibb CREATE_WRAPPED procedure – create obfuscated version of routine CALL SYSIBMADM.CREATE_WRAPPED (‘ CREATE PROCEDURE chgSalary(IN empno CHAR(6)) LANGUAGE SQL BEGIN UPDATE employee SET empsal = empsal*(1 + .05*empjobtype) WHERE empid = empno; END’); Multi-action SQL Triggers* • A single SQL Trigger can be created to handle multiple database operations Enables centralization of all trigger logic Can be used to simplify management and installation of triggers CREATE TRIGGER employee_monitor AFTER INSERT OR DELETE OR UPDATE OF salary ON employee REFERENCING NEW AS n OLD AS o FOR EACH ROW BEGIN IF INSERTING THEN UPDATE company_stats SET nbremp=nbremp + 1; END IF; IF DELETING THEN UPDATE company_stats SET nbremp=nbremp - 1; END IF; IF UPDATING AND (n.salary > 1.1 * o.salary) THEN SIGNAL SQLSTATE '75000' SET MESSAGE_TEXT = 'Salary increase > 10%' END IF; END IBM Systems Tecdhnical University • Enables the body of SQL routine to be protected • Enables a stored procedure’s database changes to be executed independently of the calling application Without Autonomy, Commit/Rollback includes database changes made by calling application DB2 automatically issues Commit/Rollback for autonomous procedure CREATE PROCEDURE update_agency(IN agencyVID INTEGER, IN agencyNUM INTEGER, IN agencyID INTEGER, IN agentNID) LANGUAGE SQL AUTONOMOUS BEGIN UPDATE agency SET agency_vid=agencyVID, agency_num=agencyNUM, agent_NID=agentNID, updated_date=CURRENT_TIMESTAMP WHERE agency_ID = agencyID; INSERT INTO agency_log VALUES(USER, CURRENT_TIMESTAMP, agencyVID, agencyNUM, agentNID); END Pipelined SQL Table Functions* • More flexibility for SQL UDTFs – Same flexibility offered by External UDTF with simpler coding – Returned data no longer limited to a single SELECT statement • Ability to handle errors & warnings • Ability to customize join behavior • Auditing/logging of individual rows returned CREATE FUNCTION getPatients(i_code VARCHAR(3)) RETURNS TABLE(pID CHAR(6), treatDate DATE) LANGUAGE SQL MODIFIES SQL DATA DETERMINISTIC NOT FENCED EXTERNAL ACTION CARDINALITY 500 BEGIN FOR cur1 CURSOR FOR SELECT pID, treatDate FROM patient, treatment WHERE pID= treatPID AND treatCode=UPPER(i_code) DO INSERT INTO audit_patient_access VALUES(pID, USER, CURRENT TIMESTAMP); PIPE(pID, treatDate); END FOR; RETURN; END IBM Systems Tecdhnical University Autonomous Procedures • Timestamp precision controls CREATE TABLE tstab(tscol1 TIMESTAMP(0),tscol2 TIMESTAMP(12)) • RPAD & LPAD functions* (right/left pad string functions) • Regular expressions* • Check Constraint violation controls …CHECK(row_status IN ('A', 'I') ON INSERT VIOLATION SET row_status=DEFAULT ON UPDATE VIOLATION PRESERVE row_status) • Expressions in PREPARE & EXECUTE IMMEDIATE • HTTP functions for integration with REST & SOAP web services* https://ibm.biz/BdD24s • Built-in global variables Regular Expressions* • Delivers powerful pattern matching search capability to SQL – Regular expression patterns like those supported by grep, awk, etc. – Much richer expressions than LIKE predicate – Searches are not indexed like IBM OmniFind searches • Example: Identity phone numbers that don’t match (123) 123-1234 format (111-555-2222, (111)555-2222, …) SELECT custID, custPhone FROM customer WHERE NOT REGEXP_LIKE(custPhone,'\([0-9]{3}\) [0-9]{3}-[0-9]{4}') REGEXP_LIKE Predicate that searches for expression pattern in string REGEXP_COUNT Returns count of occurrences of expression pattern REGEXP_INSTR Returns start or end position of matched substring REGEXP_SUBSTR Returns occurrence of substring that matches pattern REGEXP_REPLACE Returns modified version of source string where matched pattern occurrences replaced with the replacement string IBM Systems Tecdhnical University Additional App Development Enhancements • Can be referenced like user-defined variables to take an action based on a job’s current environment – – – – Located in SYSIBM Read-only, maintained by system Easy to access current value with SELECT INTO or VALUES statements Useful for RCAC definitions, Triggers, and More Variable Name Schema Data Type Size JOB_NAME QSYS2 VARCHAR 28 SERVER_MODE_JOB_NAME QSYS2 VARCHAR 28 CLIENT_IPADDR SYSIBM VARCHAR 128 CLIENT_HOST SYSIBM VARCHAR 255 CLIENT_PORT SYSIBM INTEGER - ROUTINE_SPECIFIC_NAME SYSIBM VARCHAR 128 ROUTINE_SCHEMA SYSIBM VARCHAR 128 ROUTINE_TYPE SYSIBM CHAR 1 PACKAGE_NAME SYSIBM VARCHAR 128 PACKAGE_SCHEMA SYSIBM VARCHAR 128 PACKAGE_VERSION SYSIBM VARCHAR 64 SQL Development Tools • Application development – Rational Developer for i – Data Studio (free download – SQL procedures & functions) Report writing – DB2 Web Query – Rich set of graphical data presentation formats – Simplifies report management IBM Systems Tecdhnical University Built-In Global Variables Separation of Duties • Greater emphasis on separation of duties across IT functions – Restrict the amount of power held by one individual – Restrict IT Security personnel from having the ability to both control data access and perform data access • New security administration function usage (QIBM_DB_SECADM) enables security personnel to be limited to just controlling data access – Example: Security Administration Function User can grant SELECT privilege on table, but cannot read the contents of the table – Interface: CHGFCNUSG FCNID(QIBM_DB_SECADM) USER(SECUSR) USAGE(*ALLOWED) – Considerations: • Security Administrator can only grant data access to others, not themselves • Only QSECOFR or another security administrator can add users to the security administrator function usage • Existing grant privilege requirements (Object Owner, Object Management, or *ALLOBJ special authority) also still apply • Security Administrator function usage complements function usage IDs created for System i Navigator: QIBM_DB_SYSMON & QIBM_DB_SQLADM IBM Systems Tecdhnical University Security Enhancements Table Access: ALL or NOTHING • No easy way to restrict access to a specific set of rows or values within a column • Government regulations and corporate policies aggressively pushing IT to restrict user/application access to sensitive data A Solution…. Row and Column Access Control (RCAC) What is RCAC? • Additional layer of data security available with DB2 • Complementary to table level security • Subsetting access to only the required data for a task • Controls access to a table at the row, column, or both • Two sets of rules – Permissions for rows – Masks for columns • Delivered with IBM Advanced Data Security for i feature – No-charge feature, option 47 – Required on development & production systems IBM Systems Tecdhnical University The Business Problem… • Currently, data access is restricted with application logic or views • Users with direct access to DB2 objects can bypass these layers – Example: Users with *ALLOBJ authority can still view all data • DB2 RCAC enables all data access (SQL, CL, native record-level, etc.) be controlled at row/column level How can we ensure that managers only see data for their own employees? User with *ALLOBJ access to – Set up rich security policies – Prevents security administrators authority from accessing all data in a database – No dependency on application logic – Allows for data masking (column) – Facilitates table level multi-tenancy Scenario: Healthcare Insurance Industry How can we ensure that a social security number column is masked out for unauthorized users? IBM Systems Tecdhnical University Why Use RCAC? • Scenario has the following permissions attached 1 2 3 – Patients • Can only access their own data – Physicians • Can only access their own patients’ data – Membership officers, Accounting, Drug researchers • Can access all data – Nobody else sees any data Scenario: Create Permission 1 2 3 CREATE PERMISSION access_to_row ON patient FOR ROWS WHERE ( VERIFY_GROUP_FOR_USER(SESSION_USER,’PATIENT’) = 1 AND patient.userid = SESSION_USER ) OR ( VERIFY_GROUP_FOR_USER (SESSION_USER,’PCP’) = 1 AND patient.pcp_id = SESSION_USER ) OR ( VERIFY_GROUP_FOR_USER (SESSION_USER,’MEMBERSHIP’) = 1 OR VERIFY_GROUP_FOR_USER (SESSION_USER,’ACCOUNTING’) = 1 OR VERIFY_GROUP_FOR_USER(SESSION_USER,’RESEARCH’)=1 ) ENFORCED FOR ALL ACCESS ENABLE; ALTER TABLE patient ACTIVATE ROW ACCESS CONTROL; IBM Systems Tecdhnical University Scenario: Create Permission UPDATE patient SET pharmacy = ‘codeine’ WHERE name=‘Sam’ PID USERID NAME ADDRESS PHARMACY ACCT_BALANCE PCP_ID 123 551 234 MAX Max First St. hypertension 89.70 LEE 123 589 812 MIKE Mike Long St. diabetics 8.30 JAMES 123 119 856 SAM Sam Big St. codeine 12.50 LEE 123 191 454 DOUG Doug Good St. influenza 7.68 JAMES 123 456 789 BOB Bob 123 Some St. hypertension 9.00 LEE Successful UPDATE statement! Scenario: Update Table with Permissions UPDATE patient SET pharmacy = ‘codeine’ WHERE name=‘Doug’ PID USERID NAME ADDRESS PHARMACY ACCT_BALANCE PCP_ID 123 551 234 MAX Max First St. hypertension 89.70 LEE 123 589 812 MIKE Mike Long St. diabetics 8.30 JAMES 123 119 856 SAM Sam Big St. codeine 12.50 LEE 123 191 454 DOUG Doug Good St. influenza 7.68 JAMES 123 456 789 BOB Bob 123 Some St. hypertension 9.00 LEE • Unsuccessful UPDATE statement – Row not found for UPDATE – SQLSTATE=02000, SQLCODE=100 • If you cannot view a row, you cannot update (or add) the row either IBM Systems Tecdhnical University Scenario: Update Table with Permissions SELECT * FROM patient PID USERID NAME ADDRESS PHARMACY ACCT_BALANCE PCP_ID 123 551 234 MAX Max First St. hypertension 89.70 LEE 123 119 856 SAM Sam Big St. codeine 12.50 LEE 123 456 789 BOB Bob 123 Some St. hypertension 9.00 LEE • Row Access Control – Doctors can only see the data of their own patients Scenario: Select from Table with Permission SELECT * FROM patient PID USERID NAME ADDRESS PHARMACY ACCT_BALANCE PCP_ID 123 551 234 MAX Max First St. hypertension 89.70 LEE 123 589 812 MIKE Mike Long St. diabetics 8.30 JAMES 123 119 856 SAM Sam Big St. codeine 12.50 LEE 123 191 454 DOUG Doug Good St. influenza 7.68 JAMES 123 456 789 BOB Bob 123 Some St. hypertension 9.00 LEE • Row Access Control – Accounting, drug researchers and membership officers can see all data IBM Systems Tecdhnical University Scenario: Select from Table with Permission • Scenario has the following permission attached – PID number column • Patients can see full Patient ID number • Everyone else sees ‘XXX XXX ‘ + last three digits of PID CREATE MASK pid_mask ON patient FOR COLUMN pid RETURN CASE WHEN VERIFY_GROUP_FOR_USER(SESSION_USER,‘PATIENT’) = 1 THEN pid ELSE ‘XXX XXX ‘ || SUBSTR(pid, 8, 3) END ENABLE; ALTER TABLE patient ACTIVATE COLUMN ACCESS CONTROL; Scenario: Select from Table with Mask SELECT * FROM patient PID USERID NAME ADDRESS PHARMACY ACCT_BALANCE PCP_ID XXX XXX 234 MAX Max First St. hypertension 89.70 LEE XXX XXX 856 SAM Sam Big St. codeine 12.50 LEE XXX XXX 789 BOB Bob 123 Some St. hypertension 9.00 LEE • Column Access Control – Doctors cannot see PID numbers • Row Access Control – Doctors can only see the rows of their own patients IBM Systems Tecdhnical University Scenario: Create Column Mask SELECT * FROM patient PID USERID NAME ADDRESS PHARMACY ACCT_BALANCE PCP_ID 123 456 789 BOB Bob 123 Some St. hypertension 9.00 LEE • Column Access Control – Patients can see PID numbers • Row Access Control – Patients can only see their own data RCAC Considerations • Only those users with security administration function usage (QIBM_DB_SECADM) are allowed to add RCAC rules to a table • RCAC rules stored in the table object • Access control rules automatically applied to SQL Views that reference an RCAC table • UDFs and Triggers must be altered to specify the SECURED option once RCAC rules added to associated table • Native query interfaces (OPNQRYF, RUNQRY, etc.) may return slightly different results • Following interfaces will NOT work when referencing table with RCAC rules – Multi-format logical files – Tables with Read Triggers – File/query specifying ICU 2.6.1 sort sequence IBM Systems Tecdhnical University Scenario: Select from Table with Mask • TRANSFER OWNERSHIP statement – SQL equivalent of CHGOBJOWN TRANSFER OWNERSHIP OF TABLE testlib.orders TO USER newpgmr PRESERVE PRIVILEGES • GROUP and USER keywords for more accurate security implementation – GRANT ALL ON sales_tab TO USER frank – GRANT ALL ON sales_tab TO GROUP marketing • CURRENT_USER special register – Returns adopted user profile for program’s that adopt authority – When multiple user profiles have been adopted, most recently adopted profile is returned • New HOSTVAR(*SECURE)* parameter to prevent Database Monitor from capturing sensitive data values used in comparisons Manageability Enhancements IBM Systems Tecdhnical University Additional security enhancements • System i Navigator improvements • Performance Data Investigator – new DB2 reports & perspectives • SQL scripting with Dynamic Compound statements • TRUNCATE statement • SQL Package Management • DB2 for i Services • Availability & Recovery enhancements Graphical management - System i Navigator Enhancements Performance Tools Improved Plan Cache metrics & controls* Exact Plan Cache filtering for advised indexes* Enhanced monitor comparison* Rich format reports – charts & graphs* Management Tools Generate SQL – enhanced DDS conversion* SQL routines single-step debug* Obfuscation integration* Saving of stored procedure result sets* Enhanced journal entry analysis* Health Center – System limits* IBM Systems Tecdhnical University Manageability Enhancements • New controls* – Maximum size for automatic sizing – Hit Ratio – Number of longest runs for a statement Generate SQL – Enhanced DDS conversion New options for converting keyed LFs & PFs to SQL* – Generate index – Generate view & index Programmatic interface – GENERATE_SQL procedure* IBM Systems Tecdhnical University Plan Cache – Enhanced Metrics & Controls Performance Data Investigator (PDI) • Updated DB2 performance reports & perspectives • PDI available through IBM Navigator for i browser client IBM Systems Tecdhnical University Health Center – System limits analysis What are the choices? IBM System i Navigator IBM Navigator for i Where does it run? Windows PC Install Browser Served from IBM i 6.1 and forward Interface similarities Most features are identical, including TR enhancements Most features are identical, including TR enhancements Interface differences Run SQL Scripts Visual Explain Time-based performance metrics for SQL(PDI) OmniFind external object collection administration Latest functionality Apply latest IBM i Access for Windows 7.1 service pack Apply latest IBM HTTP SERVER for i Group PTF Launch URL: https://<ibmi>:2005/ibm/console/logon.jsp SQL Scripting with Dynamic Compound Statement* • Dynamic Compound Statement provides ability to have rich SQL scripting language for database setup & management – Conditional logic & error handling – Input values with Global Variables – Without creating a SQL routine – on the fly execution BEGIN DECLARE CONTINUE HANDLER FOR SQLSTATE '42704' BEGIN /* Table may or may not already exist*/ INSERT INTO error_log VALUES(SESSION_USER, CURRENT TIMESTAMP, '42704'); END; IF SESSION_USER <> ' DBADMIN' THEN SIGNAL SQLSTATE '38001' SET MESSAGE_TEXT='Unauthorized User'; END IF; IF Setuplib.Create_Var=‘YES’ THEN DROP TABLE orders; CREATE TABLE orders(ordID CHAR(6), ordQty INTEGER, ordCustID CHAR(5)); END IF; END; IBM Systems Tecdhnical University Browser client – IBM Navigator for i • Easy to integrate with CL programs – RUNSQL & RUNSQLSTM CL commands – Usage of Global Variables requires ILE CL programs PGM PARM(&CRTMOD) DCL &CRTMOD TYPE(*CHAR) LEN(10) DCL &SQLSTMT TYPE(*CHAR) LEN(256) CHGVAR VAR(&SQLSTMT) + VALUE('SET SETUPLIB.CREATE_VAR = '''|| &CRTMOD||'''' ) RUNSQL SQL(&SQLSTMT) NAMING(*SQL) /* DBCREATE contains Dynamic Compound Statement Source */ RUNSQLSTM SRCFILE(SETUPLIB/SRC) SRCMBR(DBCREATE) NAMING(*SQL) ENDPGM Additional Management Enhancements • TRUNCATE statement – Delete all rows from a table – Additional configuration options: • • • Prevent if Delete Triggers exist of ignoring Reuse storage instead of dropping Restart Identity column instead of continuing • Improved Identity column management with RESTART_IDENTITY utility* • Simplified SQL package management with SYSPACKAGESTAT view* • Queued exclusive locks for ALTER TABLE, LOCK TABLE, and RENAME TABLE (QAQQINI option: PREVENT_ADDITONAL_CONFLICTING_LOCKS) • DB2 for i – Services** – Provide easy SQL-based access to retrieve system information (security, storage, work management, etc.) – Utilities to perform DB2 administrative & management tasks IBM Systems Tecdhnical University SQL Scripting with Dynamic Compound Statement* SELECT user_name, usage, user_type FROM qsys2.function_usage WHERE function_id = ‘QIBM_SQL_SECADM’ SELECT bucket_current_size "Current Temp Storage", bucket_peak_size "Peak Temp Storage", job_number FROM qsys2.systmpstg WHERE job_status = '*ACTIVE' ORDER BY bucket_current_size DESC DB2 for i Services Complete listing found on IBM i developerWorks: https://ibm.biz/DB2Services Service objects found in QSYS2, unless otherwise noted • System Services – – – – – – – – – SYSTEM_VALUE_INFO GET_JOB_INFO, JOBLOG_INFO PTF_INFO, GROUP_PTF_INFO GROUP_PTF_CURRENCY(SYSTOOLS) TCP_INFO SYSDISKSTAT USER_STORAGE ENV_SYS_INFO(SYSIBMADM) SYSLIMITS • Security Services – – – – – Performance Services FUNCTION_INFO FUNCTION_USAGE USER_INFO GROUP_PROFILE_ENTRIES SQL_CHECK_AUTHORITY – – – – – – – DUMP_PLAN_CACHE DUMP_PLAN_CACHE_TopN DUMP_PLAN_CACHE_PROPERTIES EXTRACT_STATEMENTS RESET_TABLE_INDEX_STATISTICS HARVEST_INDEX_ADVICE (SYSTOOLS) ACT_ON_INDEX_ADVICE (SYSTOOLS) IBM Systems Tecdhnical University DB2 for i Services - Examples • SSL support for Remote Journal • Deferred processing for Journal Restores* – Journaling automatically started once dependent journal restored – Extends V6R1 support delivered for Indexes & Views that DFRID parameter & RSTDFROBJ command • Journal viewer – data & audit journals – Programmatic interface**: DISPLAY_JOURNAL table function https://ibm.biz/BdD8U6 – Graphical viewer* - Navigator clients Availability & Recovery Enhancements • Graphical Journal entry viewer: – Filtering & ordering – Customize columns displayed from journal entry IBM Systems Tecdhnical University Availability & Recovery Enhancements Performance & Scalability Enhancements • SQL Query Engine(SQE) Enhancements – In-Memory Database: Tables & Indexes • KEEP IN MEMORY clause • CHGPF/CHGLF parameter* – – – – Enhanced I/O Costing & IN list processing Plan Cache Size recall on IPL** Auto Adjust Plan Cache Sizing* Native Query support • Enhanced Scalability – – – – – – – 1.7 Terabyte Indexes* Live movement of DB2 objects to SSDs** Row movement between table partitions Reuse Deleted Rows algorithm VLDB awareness* Improved storage management for Variable-length & LOB columns* Simplified blocking with OVERRIDE_TABLE procedure** ALTER TABLE performance improvements** IBM Systems Tecdhnical University Performance & Scalability Enhancements • By default, SQE now attempts to process native queries (OPNQRYF, RUNQRY, etc.) and native opens of SQL views – Traditional native queries will be taking a new code path – Testing & benchmarking highly recommended • Users might want to change value of the SQE_NATIVE_ACCESS QAQQINI option to *NO due to the following reasons: – Different results may be returned • • • • • • • Results in different order Different values for null columns or columns with errors Suppression of some mapping error messages Loss of RRN positioning capabilities Duplicate key processing behavior differences Missing key feedback Larger open feedback record counts • … (reference 7.2 Memo To Users for complete details) – Creation of new indexes to tune performance of native queries – SQE Plan Cache contention with SQL workloads In-Memory Database Enablement • Boost performance of SQL & analytic workloads by further exploiting your investments in memory – Leverage tight integration between DB2 for i & operating system – Identify key table & index objects – DB2 manages memory for tagged objects using advanced parallel techniques • In-Memory attribute only honored for SQL interfaces • SQL Interface – 7.2 support – KEEP IN MEMORY clause • • CREATE statements ALTER TABLE statement • CL interface - starting with 7.1 – KEEPINMEM parameter • • CHGPF command CHGLF command IBM Systems Tecdhnical University SQE Native Query Support DB2 for i Websites – Home Page: ibm.com/systems/i/db2 – Technology Updates: ibm.com/developerworks/ibmi/techupdates/db2 – Blog db2foriblogspot.com – Porting Zone: ibm.com/partnerworld/i/db2porting Forums and Education resoures – DB2: https://ibm.biz/db2iforum – IBM i: https://www.ibm.com/developerworks/forums/forum.jspa?forumID=2675 – ibm.com/systems/power/software/i/db2/gettingstarted.html – ibm.com/partnerworld/wps/training/i5os/courses DB2 for i Publications – White Papers: ibm.com/partnerworld/wps/whitepaper/i5os – Online Manuals: ibm.biz/db2iBooks – DB2 for i Redbooks (ibm.biz/db2iRedbooks) • Getting Started with DB2 Web Query for System i (SG24-7214) • OnDemand SQL Performance Analysis … in V5R4 (SG24-7326) • Preparing for and Tuning the SQL Query Engine on DB2 for i (SG24-6598) • Modernizing IBM i Applications from the Database Up (SG24-8185) • IBM i 7.1 Technology Overview with Technology Refresh Updates (updated 12/2014) Continue growing your IBM skills career all ibm.com/training provides a comprehensive portfolio of skills and accelerators that are designed to meet your training needs. • Training in cities local to you - where and when you need it, and in the format you want – Use IBM Training Search to locate public training classes near to you with our five Global Training Providers – Private training is also available with our Global Training Providers • Demanding a high standard of quality – view the paths to success – Browse Training Paths and Certifications to find the course that is right for you • If you can’t find the training that is right for you with our Global Training Providers, we can help. – Contact IBM Training at [email protected] Global Skills Initiative 54 © Copyright IBM Corporation 2015 IBM Systems Tecdhnical University Additional Information