Vous êtes sur la page 1sur 85

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


ISO/ANS SQL Standard - Core Ease of Use - Self Managing
Typical DBA Tasks DB2 for i
Manage DASD Space Allocation Automated
Oracle 11g Review Table Space Allocations & Extents Automated
Review & Balance Indexes Automated
Application Rebinding Automated
Microsoft SQL Server 2008 Maintain Database Integrity Automated
Update Database Statistics Automated
Synchronized OS & DB User Security Automated
DB2 for z/OS 10 Reload Data for Hardware & Software Upgrades Automated
Load Data into Data Base Parallel Data Import/Export
Build and Manage DB Backup & Recovery System i Navigator
DB2 for LUW 9.7 Create & Review Indexes for Tables System i Navigator
Performance Analysis & Tuning (DB & System) System i Navigator
Create and Maintain DB Schema System i Navigator & 3rd Party Tools (Infosphere
DB2 for i 7.1 Data Architect, ERwin, PowerDesigner,
Embarcedero,etc.)
Automated DB Performance Profiling Centerfield HomeRun

0 10 20 30 40 50 60 70 80 90 Advanced DB Performance Analysis & Tuning System i Navigator - Certerfield HomeRun

Data Replication & Consolidation Multiple IBM & 3rd Party Products

IBM Power Systems Platform Leader


Integrated Security
in SAP Query Performance
SAP BI Mixed Load Benchmark

Self-protecting Encryption
Query Navigation Steps/hour

300000
User profiles integration 128-bit encryption (3DES &
250000 AES)
(IBM i and SQL)
SSL communications
200000 Object & column level CGA Cryptographic Service
privileges Provider
150000 IBM i 7.1 and
POWER7 deliver
Row-level authority via Interfaces
100000
80% Improvement views, table functions, Java Cryptography
POWER7 and/or exits Extension
50000
delivers 56% Authorization lists CCA Hardware APIs
0 improvement Cryptographic Services APIs
POWER6 8-Core POWER7 8-Core POWER7 8-Core Program adopted authority SQL ENCRYPT / DECRYPT
IBM i 6.1 IBM i 6.1 IBM i 7.1 Extensive auditing Key Management
3
Kerberos & EIM Field Procedures
2012 IBM Corporation
Ease of Use Self Managing

Integration yields significant operational advantages

Typical DBA Tasks DB2 for i


Manage DASD Space Allocation Automated
Review Table Space Allocations & Extents Automated
Review & Balance Indexes Automated
Application Rebinding Automated
Maintain Database Integrity Automated
Update Database Statistics Automated
Synchronized OS & DB User Security Automated
Reload Data for Hardware & Software Upgrades Automated
Load Data into Data Base Parallel Data Import/Export
Build and Manage DB Backup & Recovery IBM i Navigator
Create & Review Indexes for Tables IBM i Navigator
Performance Analysis & Tuning (DB & System) IBM i Navigator
Create and Maintain DB Schema IBM i Navigator & 3rd Party Tools (Infosphere Data
Architect, ERwin, PowerDesigner, Embarcedero,etc.)

Automated DB Performance Profiling Centerfield HomeRun


Advanced DB Performance Analysis & Tuning IBM i Navigator - Certerfield HomeRun
Data Replication & Consolidation Multiple IBM & 3rd Party Products

4 2013 IBM Corporation


Navigator & the On Demand Performance Center
Tools to Control Resource Intensive Queries
Resource Governor
Governor Exit Point
System i Navigator.lnk
Tools to Manage Indexes and MQTs
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 IBM Navigator for i


Database users will find (aka System
reasons i Navigator)
to use
both Navigator
Where options Windows PC Install
does it run? Browser
Served from IBM i 6.1 or
7.1
Minimum service level? IBM i Access Windows Service IBM HTTP SERVER FOR i
Pack PTF Group:
7.1 - SI47412 7.1 - SF99368 Level 16
6.1 - SF99115 Level 28
Database commonality Most features are identical, Most features are identical,
including TR5 enhancements including TR5
enhancements
Database differences Run SQL Scripts SQL Performance Metrics
Visual explain

IBM i Navigator.lnk IBM Navigator for i.lnk

6 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.
Examples: User Authorization Commands:
- QUSRJOBI for SQL information CHGFCNUSG FCNID(QIBM_DB_SQLADM)
- Show SQL Information for Jobs USER(userid) USAGE(*ALLOWED)
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.


Some new functions available
Works fine with down level servers

11 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?


Its 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?


its 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
Show Command displays command syntax in Run SQL Scripts

30 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 Start the reorg


here

6.1 7.1
fragmentation DB2 PTF Group DB2 PTF Group
SF99601 Level 29 SF99701 Level 21

41 2013 IBM Corporation


IBM Power Systems

Manage Index Rebuilds

Manage index re-creation after Reorgs,


Database Restores, etc
Priority Adjusting
Monitor Progress

GUI version of EDTRBDAP system


command

42 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

6.1 7.1
DB2 PTF Group DB2 PTF Group
SF99601 Level 29 SF99701 Level 22

48 2013 IBM Corporation


IBM Power Systems

Tracking Important System Limits (phase 2)


DB1002

File System category: Journal category:


Maximum size of the object information in a library Maximum size of a journal receiver
Database category: Maximum number of objects that can be
Maximum number of all rows in a partition associated with a *MAX250K journal
Maximum number of valid rows in a partition
Maximum number of deleted rows in a partition Maximum number of objects that can be
Maximum number of overflow rows in a partition associated with a *MAX10M journal
Maximum number of variable-length segments Maximum sequence number for a *MAXOPT1
Navigator: or *MAXOPT2 journal
Add System Limits to DB2 for i Health Center 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

6.1 7.1

DB2 PTF Group DB2 PTF Group


SF99601 Level SF99701 Level
31 25
2013 IBM Corporation
49
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

Whos Got Those Table Rows Locked?

See what jobs have which rows locked for a given table
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

53 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,
b) That referenced the target table launch Show Statements
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 cant


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 optimizers 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 post-


filters

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 optimizers 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?


Its 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

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

Need help?
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

Vous aimerez peut-être aussi