IBM® DB2® for i 7.1: DBA Tools with IBM i Navigator Linda M Swan (lmswan@us.ibm.com) DB2 for i Query Optimizer team DB2 for i – Explaining the technology • Enhancements delivered by PTF are documented here: www.ibm.com/developerworks/ibmi/techupdates/db2 • Some InfoCenter books, including the 7.1 SQL Reference, are updated on the same TR cadence: http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/db2/rbafz.pdf • The “IBM i 7.1 Technical Overview” Redbook gets updated with database enhancements: http://www.redbooks.ibm.com/abstracts/sg247858.html • We publish deep dive White Papers on some topics: HTTP functions & DB2 for i - http://bit.ly/httpAndDB2fori XML on DB2 for i - http://bit.ly/XMLonDB2fori • We explore some Technology topics with articles: www.ibm.com/developerworks/ibmi/library • http://ibm.com/systems/i/db2 2 © 2013 IBM Corporation DB2 for i - App Dev Update IBM Power Systems Leadership of DB2 for i Ease of Use - Self Managing ISO/ANS SQL Standard - Core Oracle 11g Microsoft SQL Server 2008 DB2 for z/OS 10 DB2 for LUW 9.7 DB2 for i 7.1 0 10 20 30 40 50 60 70 80 90 IBM Power Systems Platform Leader in SAP Query Performance Typical DBA Tasks DB2 for i Manage DASD Space Allocation Review Table Space Allocations & Extents Review & Balance Indexes Application Rebinding Maintain Database Integrity Update Database Statistics Synchronized OS & DB User Security Reload Data for Hardware & Software Upgrades Load Data into Data Base Build and Manage DB Backup & Recovery Create & Review Indexes for Tables Performance Analysis & Tuning (DB & System) Create and Maintain DB Schema Automated DB Performance Profiling Automated Automated Automated Automated Automated Automated Automated Automated Parallel Data Import/Export System i Navigator System i Navigator System i Navigator System i Navigator & 3rd Party Tools (Infosphere Data Architect, ERwin, PowerDesigner, Embarcedero,etc.) Centerfield HomeRun Advanced DB Performance Analysis & Tuning System i Navigator - Certerfield HomeRun Data Replication & Consolidation Multiple IBM & 3rd Party Products Integrated Security Query Navigation Steps/hour SAP BI Mixed Load Benchmark 300000 250000 200000 150000 IBM i 7.1 and POWER7 deliver 80% Improvement 100000 POWER7 delivers 56% improvement 50000 0 POWER6 8-Core IBM i 6.1 3 POWER7 8-Core IBM i 6.1 POWER7 8-Core IBM i 7.1 Self-protecting User profiles integration (IBM i and SQL) Object & column level privileges Row-level authority via views, table functions, and/or exits Authorization lists Program adopted authority Extensive auditing Kerberos & EIM Encryption – 128-bit encryption (3DES & AES) – SSL communications – CGA Cryptographic Service Provider – Interfaces • Java Cryptography Extension • CCA Hardware APIs • Cryptographic Services APIs • SQL ENCRYPT / DECRYPT – Key Management – Field Procedures © 2012 IBM Corporation Ease of Use – Self Managing Integration yields significant operational advantages 4 Typical DBA Tasks Manage DASD Space Allocation Review Table Space Allocations & Extents Review & Balance Indexes DB2 for i Automated Automated Automated Application Rebinding Automated Maintain Database Integrity Automated Update Database Statistics Synchronized OS & DB User Security Automated Automated Reload Data for Hardware & Software Upgrades Automated Load Data into Data Base Parallel Data Import/Export Build and Manage DB Backup & Recovery Create & Review Indexes for Tables IBM i Navigator IBM i Navigator Performance Analysis & Tuning (DB & System) Create and Maintain DB Schema IBM i Navigator IBM i Navigator & 3rd Party Tools (Infosphere Data Architect, ERwin, PowerDesigner, Embarcedero,etc.) Automated DB Performance Profiling Advanced DB Performance Analysis & Tuning Centerfield HomeRun IBM i Navigator - Certerfield HomeRun Data Replication & Consolidation Multiple IBM & 3rd Party Products © 2013 IBM Corporation Navigator & the On Demand Performance Center • Tools to Control Resource Intensive Queries – Resource Governor – Governor Exit Point • Tools to Manage Indexes and MQTs – – – – System i Navigator.lnk Show Indexes Show Materialized Query Tables Manage Index Rebuilds Index Advisor • Tools to Monitor and Analyze SQL Performance – – – – Performance monitor filtering Show Statement filters Analyze Compare monitors • Tools to Monitor and Analyze the SQL Plan Cache – – – – Filter and Show SQL Plan Cache SQL Plan Cache Snapshots Analyze Event Monitor • Tools to Show Current Activity – Statistics Requests – Current SQL for a Job • Tools to Show Current Database Limits and Sizes – Health Center 5 © 2013 IBM Corporation DB2 for i - App Dev Update Navigator – what database users need to know What are the choices? IBM i Navigator System i Navigator) Database users will find (aka reasons to use both Navigator options Windows PC Install Where does it run? Browser Served from IBM i 6.1 or 7.1 IBM i Access Windows Service Pack IBM HTTP SERVER FOR i PTF Group: 7.1 - SI47412 7.1 - SF99368 Level 16 6.1 - SF99115 Level 28 Database commonality Most features are identical, including TR5 enhancements Most features are identical, including TR5 enhancements Database differences Run SQL Scripts Visual explain SQL Performance Metrics Minimum service level? IBM i Navigator.lnk 6 IBM Navigator for i IBM Navigator for i.lnk © 2013 IBM Corporation IBM Power Systems Several Ways to get to the Database Tools IBM i Navigator included in IBM i Access for Windows – – – – – This will be the interface used in this presentation Windows based interface – Windows “look and feel” Full and rich set of database administration tools Manages multiple systems Windows install required IBM Navigator for i – Web browser based tool for managing IBM i – Alternative to IBM i Navigator – More than 90% IBM i Navigator function with over 300 web-enabled tasks – Not including Mgmt Central, Run SQL Scripts, Visual Explain, Database Navigator • Manages single system • Automatically installed with IBM i – ex: https://yoursystem:2005/ibm/console/logon.jsp 7 © 2010 IBM Corporation IBM Power Systems IBM Navigator for i 8 © 2010 IBM Corporation IBM Power Systems What tool should I use ? IBM i Navigator – Users 1. DB Engineers 2. Programmer that wants to do deep DB and SQL Analysis (Which more of them SHOULD do) 3. Systems engineers that wants to identify and drill into problem areas – The Keys pieces • Visual Explain • RUN SQL Scripts IBM Navigator for i – Most DB tools are available • DB monitor, Plan Cache, Object Information – Key system performance tools - Performance Data Investigator – No client software to install – Users • Systems Engineers • Programmers 9 © 2010 IBM Corporation IBM Power Systems DB2 OnDemand Performance Center – User Authority Simplification *JOBCTL (Job Control Authority) Whatever worked with *JOBCTL in IBM i 6.1 will continue to work QIBM_DB_SQLADM – Database Administrator This is a database specific alternative to *JOBCTL. It is a superset of the function authorized by QIBM_DB_SYSMON. Examples: - Change parallel degree for DB2 SMP feature - Work with Plan Cache - Work with OmniFind Text Search Server QIBM_DB_SYSMON – Database Information This allows a user to view some system level details, but not specifics about operations or anything related to changing or controlling the database. User Authorization Commands: Examples: CHGFCNUSG FCNID(QIBM_DB_SQLADM) - QUSRJOBI for SQL information USER(userid) USAGE(*ALLOWED) - Show SQL Information for Jobs CHGFCNUSG FCNID(QIBM_DB_SYSMON) USER(userid) USAGE(*ALLOWED) No Special Authority required when using OnDemand Performance Center with own job Starting and ending SQL Performance Monitors on your own job Analysis of SQL Monitor data and Plan Cache snapshots Visual Explain in Run SQL Scripts 10 © 2013 IBM Corporation IBM Power Systems About IBM i Navigator IBM i Navigator ships with IBM i Access for Windows – The database graphical user interface is a component of IBM i Navigator – IBM i Navigator comes with the base operating system for no extra charge • None of the database GUI support requires an IBM i Access License – When installing IBM i Access on your PC • Database is not selected by default. Select “Custom" install For general information on IBM i Access Express for Windows check our web site at: – http://www-03.ibm.com/systems/i/software/access/ • (PTFs are available from a link off the above page) We recommend the latest version of the client be installed. • • 11 Some new functions available Works fine with down level servers © 2010 IBM Corporation IBM Power Systems User Interface to the Database 12 © 2010 IBM Corporation IBM Power Systems Explorer-like Interface New in i 7.1 Global Variables Types XML Schema Repository OmniFind Text Indexes If product installed DB Maintenance Folders under each Schema (Library), for each object type. 13 © 2010 IBM Corporation IBM Power Systems Starting Run SQL Scripts 14 © 2010 IBM Corporation IBM Power Systems Creating a Schema CREATE SCHEMA MYSCHEMA; – Organizational construct – Library/Folder A stored procedure is shipped with IBM i that can create sample schemas – CALL CREATE_SQL_SAMPLE(‘CORPDATA’); – Contains tables (including sample data), views, aliases, indexes, and RI – CORPDATA is used in the SQL manuals and labs 15 © 2010 IBM Corporation IBM Power Systems Database Object creation Create database objects with no storage considerations (including tables!) Browse function for reusing existing column definitions Robust Alter Table support – No need for special utilities How do I rebalance indexes? It’s simple! The database does it for me. New index create options for specifying parallel degree and page size Can create SQL versions of DDS logical files 16 © 2010 IBM Corporation IBM Power Systems Run SQL Scripts Create/save scripts for repetitive tasks Both SQL statements and CL commands View and Save output for SQL queries – Save to Options Call stored procedures with result sets and/or OUTput parameters and launch iSeries System Debugger Do Visual Explain on queries, for performance analysis and tuning Syntax error highlighting and font chooser SQL state errors in message box, including second level text Prompting of CL commands Ignore drop error messages Support for Global Variables 7.1 (new tab) 17 © 2010 IBM Corporation IBM Power Systems Run SQL Scripts CHK SQL portability Save to SRCPF Save to IFS file Save to UTF8 file Save output to Spread sheet Toggle output to use display heading Undoc result window Launch directly from SQL IFS object Print results Font applies to output Save as for output 18 © 2010 IBM Corporation IBM Power Systems Save Results 19 © 2010 IBM Corporation IBM Power Systems Save Results cont. 20 © 2010 IBM Corporation IBM Power Systems Save Results cont 21 © 2010 IBM Corporation IBM Power Systems Show SQL statement from create dialogs SQL statement is recorded as you fill in dialog Option to show the SQL statement being built Great for learning SQL syntax Allows for statement customization 22 © 2010 IBM Corporation IBM Power Systems Keeping schema source DDS - source files - (object source file info maintained) SQL - Run SQL Statements PC or IFS files SQL - RUNSQLSTM source files - (object source file maintained) 23 © 2010 IBM Corporation IBM Power Systems Generate the SQL – Regenerate SQL CREATE/ALTER statements directly from the existing objects • Helpful for when the original statements are no longer available • Teach programmers about SQL syntax of objects See what the SQL form of my DDS-created files would be like Include generating short names of objects Do not generate RI and triggers for tables Include SET OPTIONS statement V6R1: Now supported at folder level versus schema or object 7.1 includes privileges 24 © 2010 IBM Corporation IBM Power Systems Data Dictionaries DDS File Field Reference Files SQL CREATE TABLE AS (subselect) Ex: CREATE TABLE SalesByRegion AS (SELECT region, SUM(to_sales) FROM sales GROUP BY region) WITH NO DATA User-defined types 25 © 2010 IBM Corporation IBM Power Systems Journaling Default journal automatically created and started when creating a schema Journal receivers contain journal entries for recovery 26 © 2010 IBM Corporation IBM Power Systems Table Description Answers questions like: How big is this table/file getting anyway? – Works for indexes and views too! 27 © 2010 IBM Corporation IBM Power Systems Table Description Activity 28 © 2010 IBM Corporation IBM Power Systems How do I synch up my DB and OS userids? it’s Simple! Group and user authorizations are managed by operating system SQL syntax maps to IBM i security types Column level security Program vs. object level security Views Exits Auditing 29 © 2010 IBM Corporation IBM Power Systems Database Loading Parallel Data load (Import)– Wizard based on CPYFRMIMPF and CPYTOIMPF CL commands – 30 Show Command displays command syntax in Run SQL Scripts © 2010 IBM Corporation IBM Power Systems New in 7.1 Database Maintenance folder 31 © 2010 IBM Corporation IBM Power Systems Constraint Repair Works for both check constraints and referential integrity constraints Show problem rows in table Able to update column values or delete entire rows Quick access to check constraint definition for check constraint repair Quick access to parent table rows for RI constraint repair 32 © 2010 IBM Corporation IBM Power Systems Index Builds in progress 33 © 2010 IBM Corporation IBM Power Systems Right click on build in progress 34 © 2010 IBM Corporation IBM Power Systems Alter Table Status 35 © 2010 IBM Corporation IBM Power Systems Reorganize Table 36 © 2010 IBM Corporation IBM Power Systems Reorganize Table Progress Monitoring New reorganize table options: – Allow suspend (cancel) – Allow online access – Allow changes – Influence when to rebuild access paths Allow reorganize to be suspended and resumed later 37 © 2010 IBM Corporation IBM Power Systems From the maintenance folder 38 © 2010 IBM Corporation IBM Power Systems Right Mouse click on the reorg to see status 39 © 2010 IBM Corporation IBM Power Systems Reorganize index build Phase 40 © 2010 IBM Corporation Database Reorganization – User specified starting point Availability and Recovery improvement: • New option on Reorganize Physical File Member to initiate the reorganize starting at a point within the table instead of starting at the beginning of the file. Most helpful in cases where most of the deleted rows are at the end of the table (especially when reorganizing to preserve arrival sequence) The reorganize will start at that location and proceed to the end of the file Makes it easier to finish incomplete reorganizes or target the reorganize at the most highly fragmented portion of the table SALES_FACT dense data fragmentation 41 Start the reorg here 6.1 7.1 DB2 PTF Group SF99601 Level 29 DB2 PTF Group SF99701 Level 21 © 2013 IBM Corporation IBM Power Systems Manage Index Rebuilds 42 Manage index re-creation after Reorgs, Database Restores, etc • Priority Adjusting • Monitor Progress GUI version of EDTRBDAP system command © 2010 IBM Corporation IBM Power Systems Starting Health Center – Right Mouse Click on DB name 43 © 2010 IBM Corporation IBM Power Systems Health Center Overview to see database object counts by category View database wide or schema specific – % wildcards can be used Capture to history file View history of counts for trending Environmental Limits 44 © 2010 IBM Corporation IBM Power Systems Environmental Limits • DB limits within Jobs • Lob Locators • Active Descriptors • Max SQL STMT Size •SQL 901 category 45 © 2010 IBM Corporation IBM Power Systems Health Center Size and Design Limits views – Size limits are things that change by normal operations – Design limits are things that change by application design View database wide, schema specific or by object name – % wildcards can be used Categorized by limit type, includes system limit! Status indicator for “within percent of limit” – Changeable threshold Capture to history file View history of limits for trending 46 © 2010 IBM Corporation IBM Power Systems Additional Activity counters in i 7.1 47 © 2010 IBM Corporation Tracking Important System Limits In production environments a new type of health indicator is needed to understand when the system is trending towards an outage or serious condition. Automatic tracking of System Limits enables you to: a) Understand when an application is trending towards a failure b) Identify applications which are operating inefficiently c) Establish a general use mechanism for communicating limit information -- How close am I coming to hitting the Maximum Active jobs limit? SELECT SBS_NAME, SIZING_NAME, CURRENT_VALUE, MAXIMUM_VALUE , A.* FROM QSYS2.SYSLIMITS A WHERE LIMIT_ID = 19000 ORDER BY CURRENT_VALUE DESC 48 6.1 7.1 DB2 PTF Group SF99601 Level 29 DB2 PTF Group SF99701 Level 22 © 2013 IBM Corporation IBM Power Systems ™ Tracking Important System Limits (phase 2) DB1002 File System category: Maximum size of the object information in a library Journal category: Database category: Maximum number of all rows in a partition Maximum number of valid rows in a partition Maximum number of deleted rows in a partition Maximum number of overflow rows in a partition Maximum number of variable-length segments Maximum number of objects that can be associated with a *MAX250K journal Navigator: Add System Limits to DB2 for i Health Center Maximum size of a journal receiver Maximum number of objects that can be associated with a *MAX10M journal Maximum sequence number for a *MAXOPT1 or *MAXOPT2 journal Maximum sequence number for a *MAXOPT3 journal -- See how the ITEM_FACT table is doing today… select lastchg, comments, current_value, user_name, job_name, client_applname from qsys2.syslimits where system_schema_name = 'STAR100M' and system_object_name = 'ITEM_FACT' order by lastchg desc 49 6.1 7.1 DB2 PTF Group SF99601 Level 31 DB2 PTF Group SF99701 Level 25 © 2013 IBM Corporation IBM Power Systems Work Management for Database Jobs Work with jobs – Find a job for which someone is reporting problems – Customize list by user, job information, and column filtering – Find SQL statement run by the job 50 © 2010 IBM Corporation IBM Power Systems SQL Details for Jobs 51 © 2010 IBM Corporation IBM Power Systems SQL Details for a Job Launched from Databases folder Find a job for which someone is reporting problems All columns are sortable Shows schema name and program name, service program name, or package name, IP Address, Can view job log, Show SQL Details, or end job Edit SQL launches SQL statement into Run SQL Scripts window, or can go directly to Visual Explain Can See Environment, Statement And Resource Details Refresh allows for monitoring Allows monitor start on a job in the list (New in 7.1) 52 © 2010 IBM Corporation IBM Power Systems Who’s Got Those Table Rows Locked? See what jobs have which rows locked for a given table – – – – 53 Shows the row number locked Current User column shows “real” userid if from a client Job information provided Viewing of row locks also available in Work Management folder for jobs and threads © 2010 IBM Corporation IBM Power Systems Database Performance Monitoring and Tuning 54 © 2010 IBM Corporation IBM Power Systems Live Analysis – Index Advisor Want DB2® to help with your Indexing Strategy? system-wide repository of DB2 Advised Indexes – System view makes it easier to create index with biggest impact – Gauge benefits of index creation based on frequency, last occurrence, common keys – Available at the database, schema, or individual table level Enhanced Index Advice (SQE-Only) Ability to view SQL statements that caused index advice (SQE-Only) Index Advice Condenser to ease DB2 Performance tuning – http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0701forstie/ 55 © 2010 IBM Corporation IBM Power Systems Index Advisor Show Statements - improved query identification • Launching into Show Statements from the Index Advisor has changed to use precise filtering of the SQL Plan Cache. • Prior to this enhancement, Table Match results were returned. Show Statements brought back all queries that matched this criteria: a) The plan is still in the Plan Cache To continue to use Table Match, launch Show Statements b) That referenced the target table outside of Index Advisor c) Caused any index advice to be generated • After this enhancement, Exact Match results are returned. Show Statements brings back all queries that match this criteria: a) The plan is still in the Plan Cache b) That referenced the target table c) The execution of the query results in generation of index advice that exactly matches the index advice filters provided by IBM i Navigator: Keys Advised, Leading Order Independent Keys, NLSS Table, NLSS Schema, Index Type, Partition name and Page Size 56 © 2010 IBM Corporation IBM Power Systems IBM i 7.1 – TR6 Candidate Condense Index Advisor Show Statements • We are planning to deliver this additional enhancement in TR6: • Launching into Show Statements from the Condensed Index Advisor is changed to use Key Match filtering of the SQL Plan Cache. • Condensed advice is unique in that the Leading Order Independent Key information is used and discarded while collapsing advice into the smallest possible set. • Instead of using Table Match or Exact Match, launching Show Statements from Condensed index advice will return queries that match every order combination of keys. a) The plan is still in the Plan Cache b) That referenced the target table c) The execution of the query results in generation of index advice that exactly matches the index advice filters provided by System i Navigator: NLSS Table, NLSS Schema, Index Type, Partition name and Page Size d) The advice matches any combination or subset of the Key columns 57 © 2010 IBM Corporation IBM Power Systems Index Advisor Show Statements - improved query identification • An advanced form of the SQL Plan Cache Statements filter is populated by Navigator. • These attributes can’t be directly modified by the user. 58 © 2010 IBM Corporation IBM Power Systems Index Advisor cont – scroll to the right 59 © 2010 IBM Corporation IBM Power Systems Live Analysis – SQL Plan Cache Easy analysis of current SQL workloads … Without overhead of database monitor Advanced filtering to quickly narrow focus to the most interesting SQL – By number of executions – By DB2 object – … Easy access to Visual Explain for detailed analysis Archive capability into snapshot for future comparisons SQE-Only Capability to have HVs inserted into statement 60 © 2010 IBM Corporation IBM Power Systems 61 © 2010 IBM Corporation IBM Power Systems SQL Performance Monitor Toolset Have an existing application and want to capture the SQL activity and analyze it? Start / Stop database monitor – Pre & Post-Filtering – Detailed – Import data from other systems Areas to watch: – Index advised – Full opens vs. pseudo opens – Access plan rebuilds – Index creates – Table scans on big tables – Index Scans over large number of keys Recommended during application tuning & problem determination Keep a baseline monitor run for comparison 62 © 2010 IBM Corporation IBM Power Systems SQL Performance Monitor Filtering Minimize system-impact by reducing amount of data collected – – – – Collect data for a specific user Collect data for a collection of jobs (QZDASO*) Collect data for longer-running SQL requests … Enables quicker analysis & identification of SQL performance bottlenecks Post-Filtering available for Visual Explain interface 63 © 2010 IBM Corporation IBM Power Systems SQL Performance Monitor Analysis Summary view to more simply decide, if the monitor has attributes that require deeper analysis Integrated analysis with ability to launch other performance tools from current analysis view Dashboard Summary Drill-Thru Analysis 64 © 2010 IBM Corporation IBM Power Systems SQL Performance Monitor Comparison Want to know if an application change, system change or PTF altered your DB2 performance? – Compare current SQL performance “profile” with archived monitor data – See if the optimizer’s implementation of an SQL statement has changed – Can be long-running operation for large database monitor collections – Can do High level compare of two or more monitors 65 © 2010 IBM Corporation IBM Power Systems Analyze SQL Performance Monitors with Visual Explain Select existing detailed SQL Performance Monitor Show list of SQL statements captured by the monitor Can import monitor data from other systems Can narrow down analysis with postfilters 66 © 2010 IBM Corporation IBM Power Systems Visual Explain Active window - Look at DB objects (indexes, constraints, etc.) involved Attributes show all the settings that impact query optimizer – Labels include optimizer’s estimates – SQE plans show decomposed SQL statement for each operation Icon Highlighting to speed analysis – Expensive nodes – Index Advised nodes Debug messages help bridge to picture 67 © 2010 IBM Corporation IBM Power Systems VE Explain While Running Allows you to see actual runtime feedback in VE diagram THIS IS VERY COOL!! 68 © 2010 IBM Corporation IBM Power Systems Index Advisor Advisor shows indexes that would help specific query (if any) Use advice along with Index Analyzer for the table to determine if index would be helpful Create button prompts Create Index dialog with recommended columns pre-filled 69 © 2010 IBM Corporation IBM Power Systems Statistics Advisor in Visual Explain shows statistics that would help specific query How do I run statistics? – It’s simple! Statistics automatically created/maintained by database Cardinality, Most common values 70 © 2010 IBM Corporation IBM Power Systems Statistics requests running in the background 71 © 2010 IBM Corporation IBM Power Systems Stats requests for QDBFSTCCOL job 72 © 2010 IBM Corporation IBM Power Systems Show Indexes 73 © 2010 IBM Corporation IBM Power Systems Evaluating your Indexes & MQTs Is an Index or MQT providing value? Launch Evaluators by right-clicking on table and select Show Index or MQT Scroll Right to find the interesting query optimizer usage statistics – Stats updated for all query interfaces – MQTs are SQL-only – Includes all objects the optimizer evaluates whether created by DDS or SQL 74 © 2010 IBM Corporation IBM Power Systems Enhanced Index management From Index Folder I can now: See Owning Index Name See/ Reset Query Usage Stats Show Statements from plan cache that use this index 75 © 2010 IBM Corporation IBM Power Systems Database Application Design 76 © 2010 IBM Corporation IBM Power Systems SQL and External Triggers Easily create External and SQL Triggers with new wizard Also added Instead of triggers over views 77 © 2010 IBM Corporation IBM Power Systems SQL Graphical Debug Starts with SQL *SOURCE Debug View – Specifying DBGVIEW=*SOURCE on the SET OPTION clause in your SQL procedure, function, or trigger – Specify a *SOURCE value for DBGVIEW parameter on the RUNSQLSTM (Run SQL Statements) CL command Graphical iSeries System Debugger – Part of the Toolbox for Java – Typical debugger capabilities – Can debug SQL procedures, functions, and triggers that run on System i5 family 78 © 2010 IBM Corporation IBM Power Systems iSeries System Debugger - example 79 © 2010 IBM Corporation IBM Power Systems DB2 OnDemand Performance Center & Sensitive Data – SECURE columns Prevents sensitive data values from being displayed in DB2 performance tools – Database Monitor & Plan Cache (5.4 & 6.1 PTFs) – Only security officer will be able to see sensitive values, ‘*SECURE’ value presented to normal users (… WHERE cardnumber=:hostvar1 ) – User must register sensitive columns with DB2 tooling Registration interface is system stored procedure: SET_COLUMN_ATTRIBUTE – Procedure parameter descriptions Table_Schema - System name of a table's schema Table_Name - System name of a table Column_Name - System column name being secured. Attribute - Secure attribute setting for column » SECURE NO » SECURE YES – Example: CALL SYSPROC.SET_COLUMN_ATTRIBUTE (‘MYLIB1', 'ORDERS', ‘CARDNUMBER', 'SECURE YES'); 80 © 2013 IBM Corporation IBM Power Systems Performance Data Investigator http://www.ibm.com/developerworks/ibmi/library/i-pdi/i-pdi-pdf.pdf This enhancement provides the ability to view several high-level charts for specific SQL performance monitors, SQL plan cache snapshots, or SQL plan cache event monitors. Starting the Investigate Performance Data action from IBM i Navigator or IBM Navigator for i displays the new graphical interface for SQL Performance monitors, as shown in Figure 6-9. Figure 6-9 Start the “Investigate Performance Data” action from IBM i Navigator or IBM Navigator 81 © 2013 IBM Corporation IBM Power Systems 82 © 2013 IBM Corporation IBM Power Systems Are you experiencing performance problems? Are you using SQL? Are you getting the most out of DB2 for i? IBM DB2 for i Center of Excellence Need help? Database modernization DB2 Web Query Database architecture and design DB2 SQL performance analysis and tuning Data warehousing and Business Intelligence DB2 for i education and training Contact: Tom McKinley mac2@us.ibm.com IBM Systems and Technology Group Rochester, MN USA 83 © 2010 IBM Corporation IBM Power Systems Additional Information DB2 for i Websites – Home Page: ibm.com/systems/i/db2 – DeveloperWorks Zone: ibm.com/developerworks/db2/products/db2i5OS – Porting Zone: ibm.com/partnerworld/i/db2porting Newsgroups & Forums – USENET: comp.sys.ibm.as400.misc, comp.databases.ibm-db2 – DevloperWorks: https://www.ibm.com/developerworks/forums/forum.jspa?forumID=292 – System i Network DB2 Forum: http://forums.systeminetwork.com/isnetforums/ Education Resources - Classroom & Online – ibm.com/systemi/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.com/systems/i/db2/books.html – DB2 for i Redbooks (http://ibm.com/redbooks) • 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 i5/OS (SG24-6598) • Modernizing iSeries Application Data Access (SG24-6393) 84 © 2010 IBM Corporation IBM Power Systems Trademarks and Disclaimers Adobe, Acrobat, PostScript and all Adobe-based trademarks are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, other countries, or both. Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. Linux is a registered trademark of Linus Torvalds 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. IT Infrastructure Library is a registered trademark of the Central Computer and Telecommunications Agency which is now part of the Office of Government Commerce. ITIL is a registered trademark, and a registered community trademark of the Office of Government Commerce, and is registered in the U.S. Patent and Trademark Office. UNIX is a registered trademark of The Open Group in the United States and other countries. Cell Broadband Engine and Cell/B.E. are trademarks of Sony Computer Entertainment, Inc., in the United States, other countries, or both and are used under license therefrom. Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others. Information is provided "AS IS" without warranty of any kind. The 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. 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. Prices are suggested U.S. list prices and are subject to change without notice. Contact your IBM representative or Business Partner for the most current pricing in your geography. 85 © 2010 IBM Corporation