Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Information Management
An IBM Proof of Technology
IBM DB2 10.1 Administration
for the Experienced Oracle DBA
Presentations
An IBM Proof of Technology
PoT.IM.06.1.027.14
Copyright IBM Corporation, 2004, 2012
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Version 7.0 December 7, 2012
Burt Vialpando & Vikram Khatri
DB2 10.1 Administration for the Experienced Oracle DBA Proof of Technology Announcement
DB2 10.1 Administration
for the Experienced Oracle DBA
A Proof of Technology
IBM
DB2
10.1 comes with many powerful features that help ease the day-to-day activities all DBAs
must perform in every IT shop. In this Proof of Technology, specific comparisons with Oracle are made
throughout to help customers better understand the feature and function differences between DB2 and
the competitive Oracle product. This session consists of both presentation and hands-on lab exercises.
Objective
This session enables customers to gain an understanding of IBM DB2 10.1 administration, evaluate the
DB2 10.1 administration vs. Oracle administration, and expedite their purchasing decision process. In
brief, DBAs already working with Oracle, or those considering adding Oracle to their repertoire, will be
able to see just how easy and yet powerful DB2 administration can be.
Audience
This Proof of Technology is for Data Management Architects, Database Administrators and Database
Developers and other decision influencers evaluating IBM technologies either from an Oracle shop or
from those considering Oracle as an alternative.
Core Topics
Introduction & Overview
DB2 vs. Oracle product offering comparison.
Instance Exploration & the CLP
Instance management, Command Line Processor usage & registry variables.
Database Exploration
Create & manage databases, key database features
Data Studio
The IBM DBA and developer Eclipse based GUI tool
CLPPlus & Oracle compatibility
The new DBA command line tool and creating PL/SQL objects and more.
Security Concepts
Authorities, privileges, groups, roles, encryption, label security and more.
Autonomic Computing
Auto memory management, parameter configuration, storage management
and utility throttling, intelligent backup, REORG & RUNSTATS.
Elective Topics
Deep Compression
DB2s industry leading, deep compression capability.
Explain Facilities & the optimizer
Learn the basics of the DB2 optimizer and make your queries run better.
DB2 Workload Manager (WLM)
Meet service level agreements by intelligently sharing all your database
resources between disparate resources
Monitoring (DB2 core capabilities)
Core engine snapshots, SQL functions, db2pd and event monitors
pureXML
What the DBA needs to know about pureXML, an industry unique approach.
Multidimensional Clusters (MDCs)
Maximize query performance with row co-location unique to the industry.
Data Movement Utilities
Core engine load, import, export, db2move, db2look, db2relocatedb & more.
Backup, Restore & Recovery
Core engine functionality for keeping your data safe.
Additional Misc. Topics
Temporal data management, multi-temperature storage, federation, DB2
Cloud offerings
Length
2 full days, 9:00 AM to 5:30 PM
DB2 10.1 Administration for the Experienced Oracle DBA
An IBM Proof of Technology
DETAILED AGENDA
I. CORE TOPICS
Introduction and Overview 10 minutes
Presentation - 10 slides 10 minutes
This covers IBM DB2 and Oracle product offerings. Highlighted is the fact that DB2 offers a complete and
robust set of products for any and every IT shop.
01 - Instance Exploration and Using the CLP 1 hour 30 minutes
Presentation 20 slides 35 minutes
This covers environment and registry variables as well as parameters. This is followed with a lesson on
using the DB2 Command Line Processor to facilitate the labs. Highlighted is ease of instance creation
and ease of CLP use.
Lab 01 Exercises 55 minutes
Operating system directories and files
Start and stop a DB2 instance
CLP introduction
Create a new DB2 instance
Catalog a DB2 instance
Extra exercises: db2support, instance administrative views, db2diag, db2pd, db2cfexp,inspect & the
Generic Control Facility
02 Database Creation and Exploration 1 hour 15 minutes
Presentation 21 slides 45 minutes
This covers the Oracle vs. DB2 system catalog, table space and storage handling differences. It also
discusses some basic administration differences between the two databases. Highlighted is ease of
database creation and basic maintenance.
Lab 02 Exercises 35 minutes
General database commands
DB2 system and local database directories
Creating a database
Exploring various functionality features: database administration views, memory tracking, event
monitoring, database size/capacity
Extra exercises: Altering a table
DB2 10.1 Administration for Experienced DBAs Page 2 of 7 PoT Detailed Agenda
03 Data Studio 1 hour 10 minutes
Presentation 27 slides 35 minutes
IBM Data Studio is the latest in a complete tool for both DBA and developers. Its graphical user interface
is easy to use and powerful. Many of its features will be shown in this presentation and lab topic.
Lab 03 Exercises 45 minutes
Launching Data Studio
Connecting to and managing a database (instance and database management and running SQL)
Exploring tables, overview diagrams, editing and sampling data, generating DDL and table
maintenance
Extra Exercise: Debug a stored procedure
Extra Exercise: Performance profile a stored procedure
04 CLPPlus and Oracle Compatibility 1 hour 5 minutes
Presentation 17 slides 30 minutes
First, the presentation gives an overview of how the new command line interface called the CLPPlus
works. Then a demonstration of Oracle compatibility features is done.
Lab 04 Exercises 40 minutes
Logging on to CLPPlus
Interactive CLPPlus commands
Running a script file in CLPPlus batch mode
Oracle compatibility examples (SQL and PL/SQL examples, migrating an Oracle schema, auto_reval,
currently committed, anonymous block PL/SQL)
05 - Security Concepts 1 hour 10 minutes
Presentation 19 slides 30 minutes
This covers the basic Oracle vs. DB2 security approach differences as well as common terminology. It
also covers DB2 privileges and authorities. Highlighted is ease of use and reasons why DB2s security
approach is a highly affective one.
Lab 05 Exercises 40 minutes
Instance level security
Database level security
Object level security
Using the system catalog security views
User and group overview
Schemas
Viewing database authorities
Column and row level security
Schemas
Extra exercise: db2audit and AUDIT POLICY (instance and database level auditing examples)
Extra exercise: LBAC quick look
DB2 10.1 Administration for Experienced DBAs Page 3 of 7 PoT Detailed Agenda
06 Autonomic Computing 1 hour 20 minutes
Presentation 28 slides 45 minutes
This covers what autonomic computing is and how the following autonomic features work in DB2: Self
Tuning Memory Manager (STMM) Automatic Storage, Utility Throttling and the Configuration Advisor.
Finally, automatic maintenance for RUNSTATS, REORGS and backups is shown. Highlighted are all the
reasons Oracle DBAs will be delighted with the ease of use and power of these features as compared to
Oracle.
Lab 06 Exercises 25 minutes
Self-Tuning Memory Manager (STMM)
Automatic Storage
Autoconfigure
Extra exercise: Automatic Maintenance
Extra exercise: Statistic Profiling
Extra exercise: SYSTOOLS setup
DB2 10.1 Administration for Experienced DBAs Page 4 of 7 PoT Detailed Agenda
II. ELECTIVE TOPICS
07 Deep Compression 60 minutes
Compression - 16 slides - 20 minutes
Lab 07 Exercises - 25 minutes
Compression - 20 minutes
Estimating compression
Full REORG compression
REORG with sample data compression
Automatic dictionary compression
Index Compression
08 - Explain Facilities and the Optimizer 1 hour 10 minutes
Presentation 15 slides 25 minutes
This presentation quickly compares Oracle and DB2 explain facilities, but then dives into discussing the
various DB2 explain utilities and what each is best suited for. An overview of the DB2 optimizer is also
given.
Lab 08 Exercises 45 minutes
Create explain tables
Set up explain example using a UNION ALL view (sub lesson)
Visual Explain in Data Studio
Visual Explain tuning a query (design change example, SQL change example)
Using db2exfmt explain multiple queries at once
Extra exercise: Using db2expln (static mode and dynamic mode examples)
Extra exercises: REBIND and ROW MOVEMENT
09 DB2 Workload Manager (WLM) - 1 hour 40 minutes
Presentation - 38 slides - 60 minutes
The DB2 Workload Manager can manage and control all work executed in your DB2 database. Each
user that requests work is mapped to a workload that in turn controls the amount of CPU, prefetch and
buffer pool used. In addition, thresholds can limit or remap activities dynamically. This allows different
users to get different amounts of resource in the database, even if when executing identical workloads.
Lab 09 Exercises - 40 minutes
Setting up a custom workload manager environment
Setting up and running a simulated workloads (three different users with different WLM capabilities)
Using db2pd for monitoring and reporting
Working with WLM event monitors
Misc WLM lessons
DB2 10.1 Administration for Experienced DBAs Page 5 of 7 PoT Detailed Agenda
10 Monitoring 1 hour
Presentation 15 slides 30 minutes
This topic covers all the DB2 core engine monitoring capabilities: snapshots, SQL table functions, event
monitors, usage lists, db2pd, db2top
Lab 15 Exercises 30 minutes
Snapshot monitoring switch use and a snapshot example
Event monitoring using a statement event monitor to break down the execution of SQL in a stored
procedure
Data Studio stored procedure profiling
Lightweight monitoring using SQL table functions and db2pd
11 DB2 pureXML 1 hour
Presentation 16 slides 30 minutes
This covers what a DBA needs to know about XML in DB2: What XML is, why it is used in the industry
and how to use it in a DB2 database. Highlighted is the fact that DB2 uses a unique hybrid hierarchical
and relational database engine that handles XML in a pure, native format.
Lab 11 Exercises 30 minutes
Creating an XML supporting database and an XML supporting table
Inserting and exploring XML data
Importing & Exporting XML data
Creating indexes on XML data
Extra exercises: Registering and validating with an XSR
12 Multidimensional Clusters (MDCs) 1 hour
Presentation 18 slides 30 minutes
DB2 MDCs can define a table in such a way as to have it clustered on more than one dimension which
can give performance benefits for many query scenarios as well as alleviating the need to reorganize the
data. Since there is nothing like this in Oracle, this flagship DB2 feature is described and an overview is
given of how it works as well as when and why you would use it.
Lab 12 Exercises 30 minutes
Set up CARS and CARS_MDC table example
Explore MDC table space, table and index usage through the catalog
Explore MDC table organization, visually with Data Studio
Use db2batch to test MDC performance
Extra exercise: MDC performance timing tests using stored procedures
DB2 10.1 Administration for Experienced DBAs Page 6 of 7 PoT Detailed Agenda
13 - Data Movement Utilities 1 hour 30 minutes
Presentation 33 slides - 60 minutes
A quick comparison of Oracle vs. DB2 data movement utilities is made. Then DB2 utilities are focused on
by giving an overview of them and their usages. Then each of these is described: export, import, load,
db2move, backup, restore, standby, transportable database, and replication. Emphasis is on showing
rich selection and variety of data movement utilities and options in DB2
Lab 13 Exercises 30 minutes
db2relocatedb
db2move and db2look
SYSPROC.ADMIN_MOVE_TABLE
Data ingest
14 - Backup, Restore & Recovery 2 hours
Presentation - 26 slides 45 minutes
This covers architecture and training comparisons between Oracle and DB2. It then hones in on DB2
functionality for the following: offline backup, history file, offline restore, configure database logging, online
backup, online restore, incremental backup & restore and recover dropped tables. Though powerful in
scope, DB2 ease of use is highlighted.
Lab 14 Exercises 75 minutes
Create test database
Offline backup & restore
Configure database logging
Online database backup
Database restore (recovery mode)
Recover dropped table
Extra exercise: Restore history file
Extra exercise: Move table space location (redirected restore)
Extra exercise: Online table space backup & restore
Extra exercise: Incremental and Delta backup & restore
16 Additional Misc. Topics 1 hour 30 minutes
All topics presentations
Temporal data management - 12 slides - 20 minutes
Multi-temperature storage - 4 slides - 10 minutes
Federation - 4 slides - 10 minutes
DB2 Cloud offerings - 4 slides - 10 minutes
Temporal data management, time travel query Lab - 20 minutes
Temporal data management, build, insert, update, delete
Time travel query examples
Federation Lab - 20 minutes
Show federation through a pre-built script
Show federation through a GUI
DB2 10.1 Administration for Experienced DBAs Page 7 of 7 PoT Detailed Agenda
PoT Revision History
Version Revision Description By Whom When
4.1 PoT update for DB2 9.7 (Cobra) Release
Burt Vialpando
Vikram Khatri
09/01/2009
4.2 PoT update for DB2 9.7 Fix Pack 1 Burt Vialpando 04/05/2010
5.0
PoT update for DB2 9.7 Fix Pack 3, Data Studio
2.2.0.2 and VM image on Windows 7 Enterprise
Burt Vialpando 09/23/2010
5.1 PoT update for DB2 9.7 Fix Pack 5, Data Studio 3.1 Burt Vialpando 10/21/2011
6.0 PoT update for DB2 10.1, Data Studio 3.1.1 Burt Vialpando 04/15/2012
6.1 Minor corrections to materials Burt Vialpando 08/25/2012
7.0 Rewritten for SUSE Linux Burt Vialpando 12/07/2012
2012 IBM Corporation
An IBM Proof of Technology
IBM DB2 10.1 Administration
For the Experienced Oracle DBA
Part 1 Core Topics
Version 7.0 December 7, 2012
Burt Vialpando & Vikram Khatri
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Welcome to the Technical Exploration Center
Introductions
Access restrictions
Restrooms
Emergency Exits
Smoking Policy
Breakfast / Lunch / Snacks location and times
Special meal requirements?
2
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Proof of Technology (PoT) Overview
Part 1 Agenda Core Topics
IBM
DB2
- Lab 11
DB2 Multidimensional Clusters - Lab 12
DB2 Data Movement Utilities (core engine) - Lab 13
DB2 Backup, Restore & Recovery (core engine) - Lab 14
Additional Misc. DB2 Topics - Lab 15
Core Topics
Elective Topics
3
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Proof of Technology
Schedule
Activity
Session
Length
Hour:Mins
Running
Total
Hour:Mins
Start
Time
End
Time
Day 1 PoT greetings, intro and logistics 0:10 0:10 9:00 AM 9:10 AM
DB2 Introduction & overview 0:10 0:20 9:10 AM 9:20 AM
Instance and the CLP presentation 0:35 0:55 9:20 AM 9:55 AM
break 0:10 1:05 9:55 AM 10:05 AM
Lab 01 0:55 2:00 10:05 AM 11:00 AM
Database presentation 0:45 2:45 11:00 AM 11:45 AM
lunch 0:45 3:30 11:45 AM 12:30 PM
Lab 02 0:40 4:10 12:30 PM 1:10 PM
Data Studio presentation 0:35 4:45 1:10 PM 1:45 PM
Lab 03 0:45 5:30 1:45 PM 2:30 PM
break 0:10 5:40 2:30 PM 2:40 PM
CLPPlus & Oracle Compatibility presentation 0:30 6:10 2:40 PM 3:10 PM
Lab 04 0:40 6:50 3:10 PM 3:50 PM
Security presentation 0:30 7:20 3:50 PM 4:20 PM
Lab 05 0:40 8:00 4:20 PM 5:00 PM
Day 2 Autonomic Computing presentation 0:45 0:45 9:00 AM 9:45 AM
Lab 06 (or finish up any other core labs) 0:45 1:30 9:45 AM 10:30 AM
Elective topics 5:25 6:55 10:30 AM 3:55 PM
wrap up and surveys 0:05 7:00 3:55 PM 4:00 PM
4
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
PoT Overview
Scope, assumptions and icons
The scope is for DB2 for Linux
UNIX
and Windows
(LUW)
The goal is to demonstrate specific IBM DB2 methodologies for implementing your current
DBA skill set in DB2
The target audience is the experienced Oracle database administrator (DBA)
Reasonably deep knowledge of relational database principles is assumed
With a technical knowledge of Oracle specifics
The target audience should know the operating system (OS) reasonably well
The labs will be done in a SUSE Linux environment
Knowing how to get around in Unix will be important to the labs
5
Slide with a focus on DB2 only
Slide with an extra cost feature or product
DB2 10.1 latest feature
Presentation icons
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
PoT Overview
Using Vmware Stay in full screen mode
If you ever get out of full screen mode click on this icon
6
2012 IBM Corporation
An IBM Proof of Technology
IBM DB2 Introduction & Overview
10 slides
Burt Vialpando
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 for Linux UNIX and Windows Packaging
DB2 editions
DB2 10.1 Editions
DB2 Express-C (no cost download and deploy - optional license available)
Windows, Linux, Solaris
4 GB memory, 2 cores
DB2 Express Edition
Windows, Linux, Solaris, IBM AIX
(System i
, System p
, and POWER
Systems that support Linux)
IBM System z196
IBM OmniFind
InfoSphere Streams
IBM Smart Analytics System
Data mining
XT = Extra tool that comes with the Core Engine
16
2012 IBM Corporation
An IBM Proof of Technology
Lab 01 INSTANCE
20 slides
Burt Vialpando
DB2 Instance Exploration and Using
the Command Line Processor (CLP)
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Server Architecture
The DB2 instance overview
A DB2 Instance is also called a Database Manager or DBM
An instance performs the following (for the databases they manage):
Overall database memory usage & defaults:
Utility impact limits
Sort, hash, Java and other heap limits and defaults
Monitoring:
Health
Snapshot
Auditing (instance level)
Diagnostic & notification logging
Connection management
User authentication
Communication protocols
Agents & pooling management
Transaction management
Workload Management dispatcher service
Federation control
Distributed transaction management (DPF)
Inter-partition communication (DPF)
18
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Server Architecture
The Oracle unique System ID (SID)
An Oracle SID is a logical access to database physical structures
An Oracle SID in a (non-RAC) environment can
Access only one database at a time
Oracle terms " instance" & " database" often used interchangeably by DBAs &
users, however:
Instance is logical and related to memory and processes
Database is persistent and related to files
19
pfile / spfile
Data
files
Redo log
files
Buffer
Pools
Data
cache
Dictionary
Database 2
Oracle Instance 2
Processes
Archived
Log files
Redo log
files
Control file
Password file pfile / spfile
Data
files
Redo log
files
Buffer
Pools
Data
cache
Dictionary
Database 1
Oracle Instance 1
Processes
Archived
Log files
Redo log
files
Control file
Password file
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Server Architecture
The DB2 instance
A DB2 instance is a logical access to database logical and physical structures
A DB2 instance (non pureScale) can access more than one database at a time
Note: most production instances manage only one database
In a DB2 instance
Many Engine Dispatchable Units (EDUs) are shared by all databases
Instance configuration parameter (dbm cfg) affects all databases in that instance
Database configuration parameters (db cfg) exist for each database
DB2 terms " instance" & " database" have very distinct meanings
20
DBM config
Data
Files
Log files
DB Thread
EDUs
Buffer
Pools
Buffer
Pools
Catalog DB config
Database 1
Log files
Data
Files
DB Thread
EDUs
Buffer
Pools
Buffer
Pools
Catalog DB config
Database 2
DB2 Instance
Process
EDUs
DBM
Thread
EDUs
Archived
Log files
Archived
Log files
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Server Architecture
Oracle processes list (not exhaustive)
* Can be many
Level Process Purpose
Required Server Server processes - Either dedicated or shared, performs requests for the client
SMON System monitor - Space maintenance & crash recovery agent
PMON
CKPT
Process monitor - Cleans up failed user processes and frees of resources of these processes
Check point - Flushes modified data from the buffer cache to the disk and updates the control
file and data files by doing a header update (DBWn actually does the data file write)
DBWn * Database writer - Writes the dirty buffers from the database buffer cache to the data files on disk
LGWR Log Writer - Performs sequential writes from the redo log buffer to the redo log files on disk
Optional MMAN Memory Manager - SGA & PGA memory broker
MMOM Manageability Monitor - AWR problem detection and self tuning
MMNL Manageability Monitor Light - Transfer statistics AWR collects to disk
RECO Resolve for distributed databases - (DISTRIBUTED_TRANSACTIONS mode)
ARCn * Archive log monitor - Writes redo logs to archive areas (in ARCHIVE LOG mode)
SNPn * Snapshot & job scheduler
Dnnn * & Snnn * Dispatchers - shared server processing agent
CTWR Change Tracking Writer - RMAN support
CJQ0, J000 Job Coordinator & Scheduler - assigns jobs to the job queue processes
DBRM Resource Manager
DIA0 Diagnosability Process Zero - hand detection and deadlock resolution
DIAG Diagnostic Dumps
SMCO Space Management Coordinator - proactive space allocation and reclamation
ASM Automatic Storage Management - related processes are ASMB, ARB, RBAL
EMNC Event Monitor - event management coordination
FBDA Flashback Data Archive
DMON Data Guard Broker
21
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Server Architecture
DB2 Engine Dispatchable Unit list (not exhaustive)
* Can be many
Level EDU Purpose Similar to in
Oracle
Instance
db2sysc Main System controller Server
PROCESS db2wdog Watchdog - UNIX systems only, handles abnormal termination PMON & SMON
db2fmp Fenced process executes stored procedures and user defined functions
db2acd Autonomic computing for health monitor and automatic maintenance MMOM & MMNL
Instance
db2resync Re-sync agent - scans the global re-sync list RECO
THREAD db2cart Invokes user exits to archive or retrieve log files (Archive Log) ACRn
db2fmd Fault Monitor keeps instances and monitoring up
db2ipccm Inter-process listener - handles local client programs Listener
db2tcpcm, &
others *
TCP/IP remote communication listener, & other listeners (depending upon which
protocols are specified in the DB2COMM variable)
Listener
db2disp Client connection concentrator dispatcher Dnnn & Snnn
db2wlmd
db2wlmt
db2wlmtm
Workload Manager collects Workload Manager statistics
Workload Manager Dispatcher scheduling thread
Workload Manager Dispatcher timer thread
DBRM
Database
db2loggr Log reader - manipulates log files to handle transaction processing & recovery PMON
THREAD db2loggw Log writer flushes logs from log buffer to transaction logs on disk LGWR
db2stmm Self-tuning memory manager MMAN
db2uext2 Archive log monitor ARCn
db2pfchr* Buffer pool pre-fetcher
db2pclnr* Buffer pool page cleaner DBWn & CKPT
db2taskd Background database tasks SNPn
db2logts Table space tracking logs which table spaces are in which logs CTWR
db2hadrp/s High Availability and Disaster Recovery primary and secondary server threads DMON
Application
db2agent * Various agent threads Server
22
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Server Architecture
DB2 listing EDUs (processes and threads)
db2pd -edus
Oracle note:
On the OS use: ps ef | grep [SID]
or
in SQL*Plus use: v$bgprocess
23
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Memory Architecture (with background processes)
Oracle Linux/UNIX example
Redo Log
Buffer
SGA
Oracle Instance
Shared Pool
Library Cache
Dictionary Cache
PMON DBWR SMON CKPT LGWR others others others
User
Process
Server
Process
PGA
Oracle Database
Oracle Session *
sort_area_size
hash_area_size
bitmap_merge_area_size
create_bitmap_area_size
MMAN MMOM CKPT ARCn SNPn ASM
* Dedicated Server example
Java Pool
(optional)
Large Pool
(optional)
Data Buffer Cache
db_2k_cache_size
db_4k_cache_size
keep recycle
db_cache_size - default
(e.g. db_block_size = 8k)
db_16k_cache_size
db_32k_cache_size
Streams Pool
(optional)
Other
PL/SQL Area
SQL Area
Control Structures
Latches / locks
Background processes
pfile, control files, data files, etc.
Result Cache
BV
24
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Memory Architecture (with background EDUs)
DB2 Linux/UNIX example
* Database Partitioning Feature ** Can be controlled by DB2 Self-Tuning Memory Manager
DB2 Instance
Monitor Heap
mon_heap_sz
db2agent
DB2 Database
DB2 Application
App. Shared Memory
aslheapsz dir_cache
App. Private Memory
agent_stack_sz
applheapsz
sortheap
App. Global Memory
app_ctl_heap_sz (WF *)
Audit Buffer
(optional)
audit_buf_sz
db2fmtlg
db2wdog
db2gds
db2ipccm
db2dlock db2pclnr db2loggr db2loggw
Buffer Pools **
4k buffer pool
8k buffer pool
16k buffer pool
4k buffer pool
4k buffer pool
32k buffer pool
Database Heap
logbuffsz
catalog_cache_sz
Utility Heap
util_heap_sz
Package
Cache **
pckcachesz
Lock List **
locklist
Sorting **
sheapthres_shr
8k buffer pool
Other memory
areas
db2pfch
db2resyn
db2tcpcm
db2sysc
others
others
local
remote
db2syslog
db2rebal
FCM Buffs (DPF *)
(optional)
fcm_num_buffers
rqrioblk
sortheap
database_memory
java_heap_sz
stmtheap
stat_heap_sz
Instance processes & threads
Database threads
BV
25
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Parameter Configuration
Comparison
Oracle Parameter Fact DB2 Parameter Fact
300+ parameters for 11g 120+ DB and 90+ DBM parameters for 10.1
PFILE required at database creation Generates parameters on its own at instance and
database creation
DBAs use templates or pre-created PFILEs to
create a database
DBAs use AUTOCONFIGURE to generate at
database creation
DBAs need to convert PFILE to SPFILE at
some point manually
The DB and DBM have SPFILE like functionality
by default
DBAs need to know those parameters that are
static as they can only be changed with
SCOPE=SPFILE
An instance restart is needed to make this take
affect
DBAs do not concern themselves with scope as
they can change any parameter any time
Those parameters that require an instance restart
or a database reactivation will display a message
stating this
DBAs check for scope change by looking in two
dynamic views:
v$parameter (current instance setting)
v$spparameter (spfile values)
DBAs see parameters that have not been changed
(deferred value) in the current instance and
database by using two administrative views:
sysibmadm.dbcfg
sysibmadm.dbmcfg
26
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Registry / Environment Variables
DB2s unique approach
DB2 registry variables
Manage DB2 customization without the need for many OS environment variables simplify
your .profiles
Allow for changes to DB2 without a system reboot
Use db2set or use the Configuration Assistant to manage
DB2 uses only 2 specific environment variables (OS controlled): db2path, db2instance
Oracle environment variables
Variable example Function
db2adminserver
db2comm
db2include
db2instance (e)
db2instdef
db2owner
db2path (e)
db2system
Specifies which instance runs the admin. server
Started communications manager
Path to include in SQL searches
Current instance
Default instance
Instance owning machine
Directory where product is installed
Server name id
Variable example Function
ora_cwd
ora_sid_pfile
oracle_home
oracle_sid
oracle_base
nls_lang
rdbms_archive
rdbms_control
sqlpath
Current Oracle directory
Path to init.ora file
Environment where products run
Default Instance (SID)
Root of the Oracle directory tree
Language, character & territory set
Location of backup database files
Location of backup database control files
Location of SQL scripts
27
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
> db2set all [displays all set variables, including global ones]
> db2set h [displays help detail on this command]
> db2set lr [displays all available variables, set or not]
> db2set db2bqtime=2 [sets a particular variable to a particular value]
> db2set db2bqtime= [resets the value to its default]
db2 => !db2set all [interactive CLP mode requires OS ! invocation method]
[i] DB2COMM=TCPIP
[i] DB2AUTOSTART=YES
[g] DB2SYSTEM=potserver
[g] DB2ADMINSERVER=dasusr1
db2set
The profile Registry Variable interface
28
LEGEND
[e] Environment Variables OS controlled
[g] Global Registry Variables effects entire server
[i] Instance Registry Variables effects current instance
[n] Node Registry Variables (not shown) node controlled
[u] User Registry Variables (not shown) user controlled
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Command Line Processor (CLP)
The three modes
The CLP has three modes:
Mode Comments
Command OS prompt, prefaced with a db2 before each command
OS commands can be mixed with DB2 commands:
> db2 get dbm cfg | grep AUTO
> db2 select * from mytable > outfile.txt
Batch OS prompt, db2 and an -f option to designate the input file:
> db2 f inputfile.sql
Interactive CLP prompt, default: db2 =>
Can run OS commands with a !
> db2 [enter]
db2 => get dbm cfg
db2 => select * from mytable
db2 => !ls a
29
Windows Note:
The Windows operating system
requires an OS shell to run DB2
commands. It is invoked using
this: db2cmd
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
CLP Help
> db2 ?
db2 [option ...] [db2-command | sql-statement |
[? [phrase | message | sqlstate | class-code]]]
option: -a, -c, -d, -e{c|s}, -finfile, -i, -lhistfile, -o, -m, -n,
-p, -q, -rreport, -s, -t, -td;, -v, -w, -x, -zoutputfile.
db2-command:
ACTIVATE DATABASE GET CONTACTS REDISTRIBUTE DB PARTITION
ADD CONTACT GET/UPDATE DB CFG REFRESH LDAP
ADD CONTACTGROUP GET/UPDATE DBM CFG REGISTER LDAP
ADD DATALINKS MANAGER GET DBM MONITOR SWITCHES REGISTER XMLSCHEMA
etc.,
GET CONTACTGROUP RECONCILE XQUERY
GET CONTACTGROUPS RECOVER
Note: Some commands are operating system specific and may not be available.
For further help:
? db2-command - help for specified command
? OPTIONS - help for all command options
? HELP - help for reading help screens
The preceding three options can be run as db2 <option> from an OS prompt.
!db2ic - DB2 Information Center (Windows only)
This command can also be run as db2ic from an OS prompt.
> db2 ? sql0100 [this is an example of an SQL message help request]
Tip:
db2 ? help helps you
read and use help
screens
-----------------------------------
db2 help launches the
Information Center
Tip:
db2 ? help helps you
read and use help
screens
-----------------------------------
db2 help launches the
Information Center
Tip:
db2 ? help helps you
read and use help
screens
-----------------------------------
db2 help launches the
Information Center
30
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Command Line Processor Option Settings
Backend process wait time (seconds) (DB2BQTIME) = 1
No. of retries to connect to backend (DB2BQTRY) = 60
Request queue wait time (seconds) (DB2RQTIME) = 5
Input queue wait time (seconds) (DB2IQTIME) = 5
Command options (DB2OPTIONS) =
Option Description Current Setting
--------- ---------------------------------------------- --------------------
-a Display SQLCA OFF
-c Auto-Commit ON
-d Retrieve / display XML declarations OFF
-e Display SQLCODE/SQLSTATE OFF
-f Read from input file OFF
-i Pretty print XML data OFF
-l Log commands in history file OFF
-m Print number of rows OFF
-n Remove new line character OFF
-o Display output ON
-p Display interactive input prompt ON
-q Preserve whitespace for XML data OFF
-r Save output to report file OFF
-s Stop execution on command error OFF
-t Set statement termination character OFF
-v Echo current command OFF
-w Display FETCH/SELECT warning msgs ON
-x Suppress printing of column headings OFF
-z Save all output to output file OFF
db2 => list command options
CLP Options
Tip:
Leaving the interactive mode
turns off your db2option settings!
-------------------------------------------
? options is different from list
command options
-------------------------------------------
Most db2option switches can be
temporarily overridden in a batch
mode
Tip:
Leaving the interactive mode
turns off your db2option settings!
-------------------------------------------
? options is different from list
command options
-------------------------------------------
Most db2option switches can be
temporarily overridden in a batch
mode
Tip:
Leaving the interactive mode
turns off your db2option settings!
-------------------------------------------
? options is different from list
command options
-------------------------------------------
Most db2option switches can be
temporarily overridden in a batch
mode
Setting CLP option examples
db2 => update command options using a OFF [turns this off]
db2 => set DB2OPTIONS=+a [Windows alternative for the same thing]
db2 => export DB2OPTIONS=+a [UNIX alternative for the same thing]
31
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
CLP Prompt Customization
> db2set db2_clpprompt= DB2 CLP %da@%d: [sets the prompt to look like this]
Database Connection Information
Database server = DB2/LINUXX8664 10.1.2
SQL authorization ID = DBAPOT
Local database alias = SAMPLE
DB2 CLP DBAPOT @SAMPLE:
Variable Value Assigned During Runtime
%i The local alias of instance currently attached
%d The local alias of database currently connected
%ia The authid of the current instance attachment
%da The authorization ID of the current database connection
%n New line
> db2set db2_clpprompt =" Yes Master? "
> db2set db2_clpprompt=" (Instance: %i, Database: %d):"
CLP RUNTIME VARIABLES
32
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
CLP History and runcmd Commands
Command history [reverse] [n] displays the last commands cached
20 ascending is default display and 20 is the default cached
Set db2_clp_histsize registry variable to change cache size
runcmd runs the numbered command from the history cache
These ONLY work in interactive mode
db2 => history
db2 => runcmd 3
db2 => history
1 connect to sample
2 list command options
3 select * from sysibm.sysdummy1
AUTORESIZE YES
;
44
INHERIT means the table
space will get its behavior
from its storage group
CREATE STOGROUP sto-group-name
ON [path]
OVERHEAD no-of-milliseconds
DEVICE READ RATE no-megabytes-second
DATA TAG [integer / NONE]
;
The use of storage groups is
optional if automatic storage
is not used
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Physical Database Storage Model
DB2 container types for DMS & SMS
DMS is for database managed table spaces
All Oracle table spaces translate to DMS type
DMS is like an Oracle locally managed, uniform extent table space
Recommended for user data table spaces
Use AUTORESIZE is like Oracle AUTOEXTEND
Use ALTER TABLESPACEREDUCE to reclaim all space on table space
SMS is for system managed table spaces
Recommended for the catalog and temporary table spaces
Operating system controlled
No database alterations possible to the container(s)
More containers can be added to it only with a redirected restore
DMS - Database Managed SMS - System Managed
File Device
Directory
/database/tablespace/prod1
Oracle note:
Oracle has no equivalent of
an SMS table space
45
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Physical Database Storage Model Feature
Multi-Temperature Storage Support *
Maximize your newest and fastest storage for your most important data
e.g. keep only the data you need for instant access on your solid state storage
Extend the life of your older storage
e.g. keep infrequently used data on it
Utilize storage groups in the automatic storage pool to manage this with ease
Administrative commands make moving data between storage systems easy
Prioritize data by what it is and where it resides
Integrate fully with DB2 Workload Manager and InfoSphere Optim Data Growth solutions
46
Sto_Grp_Hot
SSD RAID
(Very Fast)
Fibre Channel / SAS RAID
(Fast)
SATA RAID
(Medium)
2012 Q1 2011 Q4 2011 Q3 2011 Q2 2011 Q1 2010 Q4 2010 Q1
DB2 Range Partitioned Table
Sto_Grp_Warm Sto_Grp_Cold
tbspc9 tbspc8 tbspc7 tbspc6 tbspc5 tbspc4 tbspc1
DB2
- Lab 11
DB2 Multidimensional Clusters - Lab 12
DB2 Data Movement Utilities (core engine) - Lab 13
DB2 Backup, Restore & Recovery (core engine) - Lab 14
Additional Misc. DB2 Topics - Lab 15
Core Topics
Elective Topics
2012 IBM Corporation
An IBM Proof of Technology
Lab 07 COMPRESS
16 slides
Burt Vialpando
DB2 Deep Compression
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Deep Compression
The nature of data
4
As data continues to grow, the cardinality of the data drops. As it turns out there
just are not that many truly "unique" things in the world. Now, they may be unique
when used in combination, like DNA, but the basic elements themselves are not all
that varied. Consider the Periodic Table of Elements - everything in our world is
made up of this rather small set of basic elements in combination. Apply the
concept to data, and you find the same is true.
There may be over 300 million people in the US, but there are only approximately
78,800 unique last names, producing very low cardinality, with huge "clumps" in
certain name sets. First name is even more severe, coming in at about 6,600
unique first names (4,400 for the females, 2,200 for males).
The names of cities and streets and their "normalized", address corrected
adornments (Street, Avenue, etc.) are also of very low cardinality.
The English language has about 64,000 words, and those in most common use
count less than 10,000.
Product names, descriptions and attributes (e.g. "Dolby Digital") also tend to be
highly redundant and of low cardinality.
DB2 uses the above principles: Symbol based compression works well over a large
domain of data first, since the data within the domain is statistically not that variant
The nature of data
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Deep Compression
Recap of feature highlights
Dictionary based symbol for compressing or decompressing data rows
Lempel-Ziv (LZ) based algorithm creates a static dictionary based at the table level
A single table dictionary is stored within the table object for recurring large domain patterns
Compression is also done adaptively at the page level
Smaller page stored dictionaries are for the ever changing page level patterns
Data resides compressed on pages
On the table space disk giving significant I/O bandwidth savings
In buffer pools giving memory savings & improvement in performance
In recovery log disk & archive log tape
Compression is easy to implement and use
DBA just uses these keywords: COMPRESS YES
Compression done during insert, update, import or load
Table dictionary is built on the fly with Automatic Dictionary Creation after a 1 MB sample
Page dictionaries are built adaptively any time repeating patterns are detected
Compression done in many ways:
5
Data
2 levels
Indexes
3 techniques
XML
XDAs
Temp tables
5 usages
Replicated
tables
Log
archives
Inline
LOBs
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Deep Compression
Static (or classic) Row Compression for data
Table level row compression for data
There is only one dictionary for the entire table or table partition
Contains values that appear frequently across the larger domain of the entire table
Uses a Lempel-Ziv algorithm to create a compression dictionary
Is called static because the dictionary is created in one of two ways
1. By default - with Automatic Dictionary Creation on the fly after a 1 MB sample is detected
This is the easiest to implement
But gives up some compression benefits
2. Purposefully - with a table REORG or an on line table move
This gives the best over all table level, large domain compression
But requires DBA work to attain
6
CREATE TABLE CUSTOMER_INFO
COMPRESS YES STATIC;
ALTER TABLE CUSTOMER_INFO
COMPRESS YES STATIC; (01) Vialpando
(02) Waterson
(03) 824 Lakeside Drive
(04) 101 Mill Creek Road
(05) Dallas Texas 75063
Uncompressed Rows
Compressed Rows
(01) (03) (05)
(02) (04) (05)
Vialpando 824 Lakeside Drive Dallas Texas 75063
Waterson 101 Mill Creek Road Dallas Texas 75063
Compression Dictionary
To enable static-only compression on a table:
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Deep Compression
Adaptive Row Compression for data
Page level row compression for data, compliments table level compression
A dictionary per page is created for this smaller domain
Adapts for changing data characteristics over time
Compression rates improve as data grows and changes
Improvements over table level (static only) compression are usually much higher
Occurs during: inserts, updates, imports, loads, reorgs, table-moves and redistributes
Key point: table REORGs are not required to maintain high compression
7
CREATE TABLE CUSTOMER_INFO
COMPRESS YES;
ALTER TABLE CUSTOMER_INFO
COMPRESS YES;
Adaptive compression on a table is the default if
using compression. Here are ways to enable this:
CREATE TABLE CUSTOMER_INFO
COMPRESS YES ADAPTIVE;
ALTER TABLE CUSTOMER_INFO
COMPRESS YES ADAPTIVE;
No compression Static table level
compression (only)
3x
With page level
adaptive
compression
7.4x
900
MB
300
MB
122
MB
DB2 compression examples
Or:
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Deep Compression
Data compression level and opportunity: DB2 vs. Oracle
8
DB2 compresses data at the entire table or table partition level
Example: your name randomly falls 1,000,000 times in a DB2 table, but if your name fell
only once per page or extent, you would still get it compressed 1,000,000 times
Oracle compresses data at the block level only
Example: your name randomly falls 1,000,000 times in an Oracle table, but if your name
fell only once per block, no compression would result!
DB2 adaptive compression will further compress at the page level
Adds the newly introduced data pattern compression benefits Oracle has
DB2 looks not only across multiple columns, but even on partial columns
Example: your Greek name is rare, but ends in opolous like many of your fellow Greeks.
The string opolous could be compressed thousands of times along with the ending of
many other Greek names.
Oracle only looks at entire columns for compression
Example: your Greek name ends in opolous, but is rare and only appears a few times in
the database. It will not be compressed at all.
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Deep Compression
Index compression: DB2 vs. Oracle
DB2: automatically chooses an appropriate index
algorithm with no work required by the DBA:
1. RID list compression
Instead of storing RIDs explicitly, only the first is stored and the
others are referenced as an offset of that RID.
2. Variable slot directory
The slot directory is not fixed and is dynamically adjusted to fit as
many index keys as it needs to so each two byte entry in the slot
directory corresponds to a different index key on the page.
3. Prefix compression
Keys are stored in sorted order and adjacent values of prefixes are
stored only once.
All the above automatically used by DB2 when you simply set
compression on for a table
<00 00 00 04, 00 00>,
<00 00 00 04, 00 01>,
<00 00 00 04, 00 02>,
<00 00 00 04, 00 00>,
<1>,
<1>,
(a, a, a),
(a, a, b),
(a, a, c),
(a, a, a),
(, ,b),
(, ,c),
AA 01 Burt
AA 02 Shen
AA
01 Burt
02 Shen
9
Oracle: only uses one algorithm and requires more work
Prefix compression - ONLY
Requires DBA work to implement by doing the following:
1. Select candidate indexes for prefix compression
2. Run script to analyze candidate indexes
3. Select the indexes that will achieve best compression
4. Run script to compress targeted indexes
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Deep Compression
DB2 index compression usage
Activated by default
When row compression is activated for the table
Exceptions: MDC blocks, XML meta and path
Opt in or out any index from compression if desired
CREATE INDEX with the COMPRESS [YES|NO] option
ALTER INDEX with the COMPRESS [YES|NO] option
followed by an index reorg
Savings information:
Function ADMIN_GET_INDEX_COMPRESS_INFO estimates compression savings for
uncompressed index
COMPRESS and PCTPAGESSAVED in the SYSINDEXES catalog table show if an index
is defined as compressed and the percentage saved respectively
Note: Oracle compression for indexes available with prefix key compression technique only
which is a subset of what DB2 offers. See:
http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_5011.htm#SQLRF01209
10
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Deep Compression
Index compression measurements
Index compression uses idle CPU cycles and
idle cycles spent waiting for I/O to compress
& decompress index data
Databases not CPU bound are able to
achieve better performance, especially in
inserts and updates
Simple Index Compression Tests - Elapsed Time
49.24
83.99
53.89
49.12
68.3
44.07
0 10 20 30 40 50 60 70 80 90
Si mpl e Sel ect
Si mpl e Insert
Si mpl e Update
Seconds
Wi thout Index Compressi on Wi th Index Compressi on
Simple Index Compression Tests - CPU Analysis
34.5
34.8
16.2
20.8
23.6
33.9
16.7
17.5
1.6
2.0
2.6
2.5
37.1
36.4
49.1
46.3
48.2
45.0
11.7
11.4
33.3
30.9
25.9
18.5
0% 20% 40% 60% 80% 100%
Sel ect: Base
Sel ect: Ixcomp
Insert: Base
Insert: Ixcomp
Update: Base
Update: Ixcomp
Machi ne Uti l i zati on
user system i dl e i owai t
22% Faster
23% Faster
Runs
As fast
* Lower is better
*
Index Compression Space Savings
31%
55%
16%
24%
20%
57%
50%
0% 10% 20% 30% 40% 50% 60% 70%
TD-EDW
SPAR
DDMV
SAP-ssqj
SAP-sd
SAP-bw
TPC-DS
T
y
p
e
o
f
D
a
t
a
b
a
s
e
Percentage Compressed
Average 36%
* Higher is better
*
11
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Deep Compression
XML Data Area (XDA) and LOB compression
12
Return compression information by using
Admin view:
ADMINTABCOMPRESSINFO
Function:
ADMIN_GET_TAB_COMPRESS_INFO_V97
When a table is set: COMPRESS YES
XML that is stored in-line (or in the base table row) is compressed with the data row
dictionary
LOBs that are stored in-line are compressed with the data row dictionary
XML that is stored in a separate XDA is compressed in its own XDA dictionary
CUSTOMER_ID CUSTOMER_DOC
12345 <cust>
<info>...</info>
</cust>
, MicroStrategy
For your middleware applications you can:
Use a native mechanism to set these fields - if available
Use sqleseti API
Use WLM_SET_CLIENT_INFO stored procedure - if SQL statements can be injected
40
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Workload
Examples of defining a DB2 workload
CREATE WORKLOAD Main_WL APPLNAME(Main_App);
All connections with application name of Main_App.
CREATE WORKLOAD Secondary_WL APPLNAME(Main_App)
SESSION_USER GROUP(OtherUsers)
POSITION BEFORE Main_WL ;
All connections with application name of Main_App
where session user belongs to group OtherUsers.
Always evaluated before workload Main_WL.
41
Main_WL
Workload
Secondary_WL
Workload
User requests
User requests
User requests
User requests
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Workload
Customized environment: how workloads fit Into DB2 workload manager
Main_WL , Secondary_WL and default workloads how they are evaluated
42
System Requests
Application Name = Main_Apps
and
Session User Group = OtherUsers
Application Name = Main_Apps
All other user requests
DB2 engine processes & threads
User Requests
Service Subclass
Default User Class
Default System Class
Default Maintenance
Class
DB2 Data Server
Default User
Workload
Service Super-class
Main_WL
Workload
#1
#2
#3
User requests
User requests
User requests
User requests
User requests
User requests
System requests
System requests
Maintenance
requests
Secondary_WL
Workload Service Subclass
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Service Class
Definition and customization options
A DB2 service class is the primary point of resource assignment to
all database requests
All work in a DB2 database executes in a service class
Acts as a unique execution environment for any grouping of work
Provides the ability to independently monitor and control this group of work
A service class modifies the resource priorities of that work:
CPU Shares [HARD/SOFT] CPU SHARES
CPU Limit CPU LIMIT
External WLM tag OUTBOUND CORRELATOR
Prefetch (I/O) Priority PREFETCH
Buffer pool Priority BUFFERPOOL
A service class can be created in a two-tier hierarchy:
Service superclass
Service subclass
These allow for more complex division of execution environment
and provide a better emulation of a real world model
There are three default service classes:
Default user class
Default system class
Default maintenance class
43
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Service Class
Examples of defining a service class
CREATE SERVICE CLASS Main_SC
HARD CPU SHARES 3000
PREFETCH PRIORITY MEDIUM
BUFFERPOOL MEDIUM;
CREATE SERVICE CLASS High_SC
UNDER Main_SC
SOFT CPU SHARES 6000
PREFETCH PRIORITY HIGH
BUFFERPOOL HIGH;
44
CREATE SERVICE CLASS Low_SC
UNDER Main_SC
HARD CPU SHARES 1000
PREFETCH PRIORITY LOW
BUFFERPOOL LOW;
High_SC
service sub-class
Main_SC
Service class
Low_SC
service sub-class
Note: Any activities that end up running in a
super service class (in this example Main_SC)
will actually run under its default service
subclass that uses all of its service class
settings.
CPU shares are controlled via
the WLM Dispatcher, which will
be discussed in detail later.
NOTE: There are four new DBM config. parameters that will control
the dispatching services in your database:
WLM_DISPATCHER: Starts/stops dispatcher services
WLM_DISP_CONCUR: Controls thread concurrency
WLM_DISP_CPU_SHARES: Enables/disables CPU shares
WLM_MIN_UTIL: Control minimum CPU utilization
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Service Class
Examples mapping workloads to service classes
ALTER WORKLOAD Secondary_WL
SERVICE CLASS Low_SC ;
45
ALTER WORKLOAD Main_WL
SERVICE CLASS High_SC ;
High_SC
service sub-class
Main_SC
Service class
Low_SC
service sub-class
Note: In this example, no work is
directly mapped to the service
superclass Main_SC, at least so ar.
It is possible to define super or sub
service classes that dont do any work,
so be careful about how you model
your environment.
User requests
User requests
User requests
User requests
Secondary_WL
Workload
Main_WL
Workload
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Service Class
WLM Dispatcher key concepts
46
The WLM Dispatcher
Is built-in technology to allocate CPU resources to work being executed in WLM
Controls CPU resources by using relative % shares and actual % limits
The shares approach maximizes usage of CPU
The limit approach ensures free CPU for other processing needs
Is self contained, platform independent, flexible and easy to implement
Soft CPU Shares
Relative CPU % usage that is enforced only when demand exceeds capacity
Gives the service class the ability to consume more than its share of CPU resources
The share amount is a maximum usage by percent, but only when the system is fully utilized
For high priority activities with preferential treatment
Hard CPU Shares
Relative CPU % usage is always enforced
Caps the service class ability to consume CPU resources by share
The share amount is the maximum usage by percent, regardless of system utilization
For lower priority activities (especially if they are high impact)
CPU LIMIT
Actual maximum CPU % resource usage, regardless of other activity
Can co-exist with Soft CPU Shares or Hard CPU Shares
Example of use: two departments share a database, each in different classes. Use CPU
LIMIT so that one class will not over allocate CPU away from another, for any reason.
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Service Class
WLM Dispatcher usage example
47
Service class A
starts out using its
allocation of shares,
which proportionally
is 60%. The others
are 30% and 10%.
The CPU is fully
utilized.
Service class A
doesnt have
enough work to
utilize all its shares
and begins to give
them up.
Service classes B
and C use soft
shares, so they
take up the slack
and split those
shares from A.
Soft CPU Shares Example
Service class A
starts out using its
allocation of shares,
which proportionally
is 60%. The others
are 30% and 10%.
The CPU is fully
utilized.
Service class A
doesnt have
enough work to
utilize all its shares
and begins to give
them up.
Service class C
uses soft shares
and takes all the
shares from A.
Service class B
uses hard shares
and was already at
its limit, so it gets
no more.
Hard CPU Shares Example
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Service Class
Integrating DB2 WLM and the AIX or Linux WLM
DB2 service classes offer the optional ability to tightly integrate DB2
processing with AIX WLM service classes
Each DB2 service class can be associated with a specific AIX or Linux WLM service class
All agents working in a DB2 service class will automatically be associated by DB2
with the identified AIX or Linux WLM service class
Adds chargeback capability based on CPU consumption
Example:
AIX and Linux WLM provides sophisticated management of CPU to
maximize utilization of that resource while respecting any explicit
allocations
Allocation of CPU done via CPU shares assigned to AIX WLM service classes
CPU shares can be adjusted dynamically using AIX WLM interfaces
Provides the ability to borrow unused CPU shares from other service classes
Provides Operating System (OS) level statistics per AIX service class
ALTER SERVICE CLASS Main_SC
OUTBOUND CORRELATOR _DB2_Main ;
48
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Service Class
Customized environment: AIX or Linux workload manager integration
49
AIX or Linux WLM
Environment
User requests
User requests
System requests
System requests
Maintenance
requests
Default User Class
Default System Class
Default Maintenance
Class
DB2 Data Server
Default User
Workload
_DB2_Main
_DB2_High
_DB2_default_user
_DB2_system
_DB2_maintenance
User requests
User requests
User requests
User requests
Secondary_WL
Workload
High_SC
service sub-class
Main_SC
Service class
Main_WL
Workload
Low_SC
service sub-class
_DB2_Low
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Threshold
Definition and customization options
A DB2 threshold is a way to define and enforce execution boundaries in the
database
Oversees different aspects within DB2, e.g.
connections, temp space used, SQL cost, rows returned, etc.
Provides support for common scenarios, e.g.
controlling rogue queries or concurrency control
Threshold domains:
Database applies to any activity in the database
Service Class applies only to activities in this service class or superclass
Workload applies to the workload or work action
Statement applies to a particular statement
Threshold enforcement:
Database
Database partition
Workload
Threshold action options:
Terminate the activity: STOP EXECUTION
An error is returned to the application
Allow activity to keep processing: CONTINUE
No error is returned to the application
Collect detailed activity information: COLLECT ACTIVITY DATA
50
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Threshold
Examples
Database Thresholds
CREATE THRESHOLD " Detect High Estimates"
FOR SERVICE CLASS " Marketing" ACTIVITIES
ENFORCEMENT DATABASE
WHEN ESTIMATEDSQLCOST > 100000
COLLECT ACTIVITY DATA WITHOUT DETAILS
CONTINUE;
CREATE THRESHOLD " Stop Long Queries"
FOR DATABASE ACTIVITIES
ENFORCEMENT DATABASE
WHEN ACTIVITYTOTALTIME > 10 MINUTES
COLLECT ACTIVITY DATA WITH DETAILS AND VALUES
STOP EXECUTION;
Service Class Thresholds
CREATE THRESHOLD MaxActivitiesInPayroll
FOR WORKLOAD PAYROLL ACTIVITIES
ENFORCEMENT WORKLOAD OCCURRENCE
WHEN CONCURRENTWORKLOADACTIVITIES > 10
STOP EXECUTION;
Workload Thresholds
CREATE THRESHOLD DBMAXTEMPSPACE
FOR DATABASE ACTIVITIES
ENFORCEMENT DATABASE PARTITION
WHEN SQLTEMPSPACE > 50 M
STOP EXECUTION;
CREATE THRESHOLD LONGRUNNINGQUERIES
FOR SERVICE CLASS MANAGERS ACTIVITIES
ENFORCEMENT WORKLOAD OCCURRENCE
WHEN ACTIVITYTOTALTIME > 10 HOURS
COLLECT ACTIVITY DATA WITH DETAILS AND VALUES
CONTINUE;
CREATE THRESHOLD STOPLARGEQUERY
FOR WORKLOAD Reporting ACTIVITIES
ENFORCEMENT WORKLOAD OCCURRENCE
WHEN ROWSRETURNED > 1000000
STOP EXECUTION;
51
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Threshold
Priority aging (AKA in-progress activity aging) using threshold remapping
Priority aging can automatically raise or lower the priority of in-progress
activities over time
e.g. use priority aging to control longer-running activities, so that throughput
for shorter-running activities can be improved
This is accomplished with service subclass thresholds that can remap one
service subclasses to another service subclasses
52
WORKLOAD User requests
User requests
CREATE THRESHOLD Bump_Slow_Activities"
FOR SERVICE CLASS LOW_SC
ENFORCEMENT DATABASE
WHEN CPUTIMEINSC > 60 MINUTES
REMAP ACTIVITY TO MED_SC
MAIN_SC
HIGH_SC
service subclass
MED_SC
service subclass Remapping threshold
LOW_SC
service subclass
Remapping threshold
CREATE THRESHOLD Bump_Med_Activities"
FOR SERVICE CLASS MED_SC
ENFORCEMENT DATABASE
WHEN CPUTIMEINSC > 30 MINUTES
REMAP ACTIVITY TO HIGH_SC
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Threshold
Data Tag remapping using thresholds
53
Similar to priority aging, only the threshold is not based on aging
Thresholds use Data Tags on tables spaces (or their storage groups) to
reactively remap running activities
Alter stogroup SG_HIGH DATA TAG 1;
Alter stogroup SG_MED DATA TAG 3;
Alter stogroup SG_LOW DATA TAG 5;
CREATE THRESHOLD REMAP_HIGH_TO_MED
FOR SERVICE CLASS HIGH_SC
UNDER MAIN_SC ACTIVITIES
ENFORCEMENT DATABASE PARTITION
WHEN DATATAGINSC IN (3,5)
REMAP ACTIVITY TO MED_SC;
CREATE THRESHOLD REMAP_MED_TO_LOW
FOR SERVICE CLASS MED_SC
UNDER MAIN_SC ACTIVITIES
ENFORCEMENT DATABASE PARTITION
WHEN DATATAGINSC IN (5)
REMAP ACTIVITY TO LOW_SC;
MAIN_SC
LOW_SC
MED_SC
HIGH_SC
Remapping threshold
Remapping threshold
SG_HIGH
Data Tag 1
SG_MED
Data Tag 3
SG_LOW
Data Tag 5
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Work Action Set
Definition and customization options
A DB2 work action set
Is an optional object where you can create and group work actions
Classifies activities based on what they are
based on attributes of the activity to apply different actions to different activity types
Contrast: workloads classify activities based on who submitted them
Contrast: thresholds control execution boundaries regardless of what or who
Work action set domains:
Database
Service Superclass
Workload
Work action sets actions:
WHEN a threshold for an activity
PREVENT EXECUTION stops an activity
COLLECT ACTIVITY DATA writes to an event monitor
COUNT ACTIVITY creates a turnstile counter
Work action set usage examples
Restrict the number of concurrent LOADs allowed to execute on the database
Put DML in a different service class than DDL
Put READ queries > 100 timerons in a different service subclass
54
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Work Action Set
Work class sets: required for work action sets
A DB2 work class set
Contains and manages a group of work classes
A DB2 work class
Is classified by work class types:
READ, WRITE, CALL, DML, DDL, LOAD and ALL
Provides predictive identification - the ability to take action before work is done
Work class set example #1:
Work class set example #2:
CREATE WORK CLASS SET Large_Queries
(WORK CLASS Large_Est_Cost WORK TYPE DML
FOR TIMERONCOST FROM 9999 TO UNBOUNDED,
WORK CLASS Large_Cardinality WORK TYPE DML
FOR CARDINALITY FROM 1000 TO UNBOUNDED);
CREATE WORK CLASS SET DML_Usage
(WORK CLASS READ_Class WORK TYPE READ)
(WORK CLASS WRITE_Class WORK TYPE WRITE);
55
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Work Action Set
Examples
Example #2 - Database Work Action Set
CREATE WORK ACTION SET DB_Actions
FOR DATABASE USING WORK CLASS SET Large_Queries
(WORK ACTION ONE_CONCURRENT_QUERY ON WORK CLASS Large_Est_Cost
WHEN CONCURRENTDBCOORDACTIVITIES > 1 AND QUEUEDACTIVITIES > 1
COLLECT ACTIVITY DATA CONTINUE,
WORK ACTION TWO_CONCURRENT_QUERIES ON WORK CLASS Large_Cardinality
WHEN CONCURRENTDBCOORDACTIVITIES > 2 AND QUEUEDACTIVITIES > 2
STOP EXECUTION);
See work class set
example #2
Example #1 - Service Class Work Action Set (Mapping to subclasses)
CREATE WORK ACTION SET Admin_Apps_Actions
FOR SERVICE CLASS Marketing
USING WORK CLASS SET DML_Usage
(WORK ACTION MAP_READS ON WORK CLASS READ_Class MAP ACTIVITY TO Users ,
WORK ACTION MAP_WRITES ON WORK CLASS WRITE_Class MAP ACTIVITY TO Managers );
See work class set
example #1
56
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Work Action Set
Using table space or storage group Data Tags
57
Alter or create a table space (or its storage group) to contain a data tag value
Data tags can be used predictively by a work action set to map activities
Alter tablespace TS_HIGH DATA TAG 1;
Alter tablespace TS_MED DATA TAG 5;
Alter tablespace TS_LOW DATA TAG 9;
CREATE WORK CLASS SET WCS_DATATAG
(WORK CLASS HIGH_WC WORK TYPE DML DATA TAG LIST CONTAINS 1,
WORK CLASS MED_WC WORK TYPE DML DATA TAG LIST CONTAINS 5,
WORK CLASS LOW_WC WORK TYPE DML DATA TAG LIST CONTAINS 9);
CREATE WORK ACTION SET MAIN_WAS FOR SERVICE CLASS MAIN_SC
USING WORK CLASS SET WCS_DATATAG
(WORK ACTION MAP_HIGH ON WORK CLASS HIGH_WC
MAP ACTIVITY TO HIGH_SC,
WORK ACTION MAP_MED ON WORK CLASS MED_WC
MAP ACTIVITY TO MED_SC,
WORK ACTION MAP_LOW ON WORK CLASS LOW_WC
MAP ACTIVITY TO LOW_SC);
The work action set Main_WAC is on
the super service class Main_SC.
It maps activities to a different sub-
service class depending upon the data
tag in the table spaces those activities
are accessing.
WORKLOAD
Main_SC
High_SC
Med_SC
Low_SC
Main_WAS
TS_HIGH
TS_MED
TS_LOW
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Work Action Set
Using a work action set for simple counts - scenario
Take advantage of the COUNT ACTIVITY action to create a turnstile
counter for different work types of interest
Very light-weight
Collects information prior to start of execution when work is analyzed by
Work Action Set
Activity information is gathered at end of execution
Basic Steps:
Create a Work Class Set to define the work types of interest
Create a Work Action Set on the database or a specific service super class
to count the things of interest using the COUNT ACTIVITY action
Report the statistics
58
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Work Action Set
Using a work action set for simple counts - solution
SELECT DBPARTITIONNUM,
SUBSTR(WORK_CLASS_NAME,1,18) AS WORK_CLASS_NAME,
ACT_TOTAL,
LAST_RESET
FROM TABLE(WLM_GET_WORK_ACTION_SET_STATS('Counting Things of Interest', -2))
ORDER BY DBPARTITIONNUM, WORK_CLASS_NAME;
DBPARTITIONNUM WORK_CLASS_NAME ACT_TOTAL LAST_RESET
--------------------------- -------------------------------- ------------------- --------------------------------------
0 * 2 2008-02-17-23.40.24.643394
0 Big Query 0 2008-02-17-23.40.24.643205
0 Moderate Query 4 2008-02-17-23.40.24.643279
0 Small Query 16 2008-02-17-23.40.24.643348
3 record(s) selected.
CREATE WORK ACTION SET Counting Things of Interest"
FOR DATABASE
USING WORK CLASS SET " How We See Things"
(WORK ACTION " Count Big Ones"
ON WORK CLASS " Big Query"
COUNT ACTIVITY,
WORK ACTION " Count Moderate Ones"
ON WORK CLASS " Moderate Query"
COUNT ACTIVITY,
WORK ACTION " Count Small Ones"
ON WORK CLASS Small Query"
COUNT ACTIVITY);
Notice work class
set defined with
work action set
59
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Workload Manager Monitor & Control Capabilities
Monitoring features
60
User requests
User requests
User requests
User requests
User requests
User requests
System requests
System requests
Maintenance
requests
Summary
Workload
Managers
service sub-class
Default User Class
Default System Class
Default Maintenance
Class
DB2 Data Server
Default User
Workload
Marketing
Service class
Reporting
Workload
Threshold
Work Action Set
Threshold
DB2PD utility
SQL table functions
SQL procedures
Event monitors
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Workload Manager Monitor & Control Capabilities
DB2PD: ADHOC real-time monitoring
db2pd -workloads [none/workloadID]
Returns a list of workload definitions in memory.
db2pd -serviceclasses [none/serviceclassID]
Returns information about the service classes for a database.
db2pd -workactionsets [none/workactionsetID]
Returns information about all enabled work action sets, as well as all the enabled
work actions in the enabled work action sets.
db2pd -workclasssets [none/workclasssetID]
Returns information about all work class sets that have been referenced by an
enabled work action set, as well as all work classes in those work class sets.
db2pd -thresholds [none/thresholdID]
Returns information about thresholds.
The db2pd utility is enhanced for DB2 Workload Manager to return operational
information from the DB2 database system memory sets at the time the command is run
The identifier (ID) parms are optional and if left out return all the values of that feature
61
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Workload Manager Monitor & Control Capabilities
Table functions: ADHOC SQL monitoring *
SQL Table Function Description
MON_GET_ACTIVITY_DETAILS Returns detailed information about a specific activity
WLM_GET_CONN_ENV Returns for a particular connection the values of settings
that control collection of activity data and section actuals.
WLM_GET_QUEUE_STATS Returns basic statistics of one or more concurrency
thresholds
WLM_GET_SERVICE_CLASS_AGENTS_V97 Returns a list of current agents in the specified service class
WLM_GET_SERVICE_CLASS_WORKLOAD
_OCCURRENCES_V97
Returns a list of workload occurrences in the specified
service class
WLM_GET_SERVICE_SUBCLASS_STATS Returns statistics of one or more service subclasses
WLM_GET_SERVICE_SUPERCLASS_STATS_V97 Returns statistics of one or more service superclasses
WLM_GET_WORK_ACTION_SET_STATS Returns basic statistics of one or more work action sets
WLM_GET_WORKLOAD_OCCURRENCE_
ACTIVITIES_V97
Returns a list of all activities for the given application on the
specified partition which have not yet completed
WLM_GET_WORKLOAD_STATS_V97 Returns basic statistics of one or more workloads
* Provides in memory information are not snapshots.
Supports single or multiple database partitions.
62
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Workload Manager Monitor & Control Capabilities
Lock wait example with database partitioning
1. Get a call from a user that their application appears hung
Determine in the conversation that their session authorization ID is BURT_V
2. Using the WLM_GET_SERVICE_CLASS_WORKLOAD_OCCURRENCES table
function, look up the application ID for all connections with the
SESSION_USER value of BURT_V
SELECT SESSION_USER,
COORD_PARTITION_NUM,
APPLICATION_HANDLE
FROM TABLE(WLM_GET_SERVICE_CLASS_WORKLOAD_OCCURRENCES('','',-2))
WHERE SESSION_USER = BURT_V;
SESSION_USER COORD_PARTITION_NUM APPLICATION_HANDLE
----------------------- -------------------------------------- -----------------------------------
BURT_V 2 131130
1 record(s) selected.
63
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Workload Manager Monitor & Control Capabilities
Control using workload manager stored procedures
DB2 Workload Manager Stored Procedures:
Stored Procedure Description
WLM_CANCEL_ACTIVITY Cancels a given activity
WLM_CAPTURE_ACTIVITY_IN_PROGRESS Gathers information for an activity, including any child
activities, and writes it to the active activities event monitor.
WLM_COLLECT_STATS Gathers and resets statistics on service classes, work
classes and threshold queues, and writes them to the
statistics event monitor.
WLM_SET_CLIENT_INFO Allows you to set the values of any of the client information
fields at the DB2 server by using a CALL statement.
WLM_SET_CONN_ENV Enables for a particular connection the collection of activity
data and measurement of section actuals.
Example: WLM_CANCEL_ACTIVITY
Call procedure to use DB2 internal interrupt mechanism to cancel the activity
Application receives a -4725 SQLCODE
db2 => call wlm_cancel_activity(131130,2,1)
Return Status = 0 Found in lock
wait example
64
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Workload Manager Monitor & Control Capabilities
Activity event monitor - workload capture support overview
65
User requests
User requests
User requests
User requests
User requests
User requests
System requests
System requests
Maintenance
requests
Secondary
WL Workload
High_SC
service sub-class
Default User Class
Default System Class
Default Maintenance
Class
DB2 Data Server
Default User
Workload
Main_SC
Service class
Main_WL
Workload
Threshold
Work Action Set
Threshold
Workload information
Service class information
Activity classification
Agent/Application info.
Execution statistics
Statement text
Compilation environment
Input data values
and more!
Activity Event
Monitors
Low_SC
service sub-class
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Workload Manager Monitor & Control Capabilities
Activity event monitor - definition and customization options
A DB2 Workload Manager event monitor is a created DB2 object that collects
information as events occur in the database
Contrast: DB2PD, table functions & procedures capture information when the
utility or SQL itself is executed
DB2 Workload Manager event monitor events:
ACTIVITIES Records event when an activity finishes executing or before the
completion of execution if event is triggered by WLM_CAPTURE_ACTIVITY_IN_PROGRESS
procedure.
STATISTICS Specifies that the event monitor records a service class, workload, or
work class event either every n minutes set by WLM_COLLECT_INT DB CFG parameter or
when the WLM_COLLECT_STATS procedure is called.
THRESHOLD VIOLATIONS Specifies that the event monitor records a threshold
violation event when a threshold is violated. Such events can be recorded at any point in
the life of an activity, not just at completion.
DB2 Workload Manager event monitor collection output:
TABLE If not specified, WLM will derive the table name and
table space
FILE OS file with .evt extension
PIPE Named Pipe or AIX FIFO
66
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Workload Manager Monitor & Control Capabilities
Activity event monitor workload capture support details
DB2 Workload Manager event monitor activities
Belong to a service class or workload with clause: COLLECT ACTIVITY DATA
Belong to a work class whose associated work action is: COLLECT ACTIVITY DATA
Identified as an activity that violates a threshold with clause: COLLECT ACTIVITY DATA
Prior to completing, have been identified in a call to the procedure:
WLM_CAPTURE_ACTIVITY_IN_PROGRESS
DB2 Workload Manager event monitor statistics
Collected on workloads, service classes, work classes and threshold queues
There are many and they differ depending upon DB2 Workload Manager object type
Histograms can be created to provide bins for discreet ranges of data (distribution information)
Example:
CREATE HISTOGRAM TEMPLATE LifetimeTemp
HIGH BIN VALUE 100000;
ALTER SERVICE CLASS Marketing
HISTOGRAM TEMPLATE LifetimeTemp;
67
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Workload Manager Monitor & Control Capabilities
Activity event monitor examples
Activities event monitor usage
Statistics event monitor usage
Threshold event monitor usage
CREATE EVENT MONITOR DB2Activities FOR ACTIVITIES WRITE TO TABLE;
SET EVENT MONITOR DB2Activities STATE 1;
ALTER WORKLOAD Reporting COLLECT ACTIVITY DATA ON COORDINATOR WITH DETAILS;
CREATE EVENT MONITOR DB2Statistics FOR STATISTICS WRITE TO FILE;
SET EVENT MONITOR DB2Statistics STATE 1;
ALTER SERVICE CLASS Marketing COLLECT AGGREGATE ACTIVITY DATA BASE;
CALL SYSPROC.WLM_COLLECT_STATS();
CREATE EVENT MONITOR DB2Threshvio FOR THRESHOLD VIOLATIONS WRITE TO TABLE
THRESHOLD VIOLATIONS (TABLE tb_viol IN myts_1) CONTROL (TABLE tb_ctrl IN myts_2);
SET EVENT MONITOR DB2Thtreshvio STATE 1;
68
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
69 69
DB2 Workload Manager Monitor & Control Capabilities
Historical monitoring
Historical Monitoring options:
Repetitive calls to table functions where output is stored in a table
Activity event monitors to capture details for each and every activity running on the
database and then analyze the results for activity type counts at a later time
Work action set usage
To gather detailed distribution information on work classes of interest:
COLLECT AGGREGATE ACTIVITY DATA
To gather simple counts on the different work classes:
COUNT ACTIVITY
Work action set approach can gather counts on activities
Can customize what activities of interest and group using additional attributes through
work class definitions
Can view current work action set statistics at any time via table function:
WLM_GET_WORK_ACTION_SET_STATS
Can use automatic collection mechanism to collect statistics from work action set at
regular intervals to create a history over time
69
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Workload Manager Monitor & Control Capabilities
Workload capture support monitoring and control possibilities
Use fishing for costly queries as possible performance tuning targets
As a light-weight way to keep an eye out for ones that get away (e.g. very large queries
that you might want to analyze in more detail)
Create database thresholds on estimated cost that collect information for later analysis
but use the CONTINUE option so as to not affect the running queries
Keep control of badly behaving applications connection growth
Some vendor applications manage a connection pool dangerously where if the response
time slows down on existing connections, more connections are opened
This often makes things worse for the database
Keep control on the number of connections by pointing these applications at a unique
workload and then using the number of workload occurrence limit to control how many
connections can be open at any one time
Use the default option in the Work Action Set to catch oddities
If you think you have a work class that defines everything you expect to see, add in a
default ALL Work Class and have your work action set list it as the last class considered
so that any activity not falling into the other classes falls into this work action
You can gather information on these unexpected visitors
Check the work action set statistics to see if there are any entries in the special * work
class reported
70
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Workload Manager
Summary diagram: an overview of workload manager concepts
71
User requests
User requests
User requests
User requests
User requests
User requests
User requests
User requests
System requests
System requests
Maintenance
requests
Workload A
Workload B
Workload C
Service Subclass A
Service Subclass B
Default User Class
Default System Class
Default Maintenance
Class
DB2 Data Server
Default User
Workload
WLM CLASS AIX2 (or Linux)
Service Super-class 1
AIX/Linux Workload Manager
Thresholds
Thresholds
Thresholds
Requests
Initiate all work in
DB2 (even system
and maintenance
work) which will be
mapped to a specific
service class.
Use default classes
if not defined.
Threshold
Establish limits of use over a
database, workload or service class
Workload
Is how work is routed
to a DB2 service
class.
Serves as primary
point of identity and
control for submitters
of work.
Uses attributes like
application name,
system or session
user, client
workstation and so
on, to map to each
connection
Work Action Sets
Work Action Sets
Work Action Set
Control specific types of activities
over a database or service class
Workload Manager Monitoring
db2pd, Event, SQL Functions & Procedures
Service Class
Is where the work for a
database is executed.
Is the primary point of
resource assignment,
control and monitoring.
Uses a 2-Tier hierarchy
which defines super-classes
to provide common
attributes across
subclasses. This provides a
more complex division of
execution.
Service Class
On AIX or Linux
Each DB2 service class can
be associated with an AIX or
Linux Workload Manager
service class for tight OS
integration.
Thresholds
WLM CLASS AIX1 (or Linux)
WLM CLASS AIX3 (or Linux)
Work Action Sets
BV
2012 IBM Corporation
An IBM Proof of Technology
Lab 15 MONITOR
15 slides
Burt Vialpando
DB2 Monitoring
(core engine)
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Database Monitoring
Overview of types of core engine monitoring techniques
Monitor
Type
Characteristics
Data
base
level
Appli-
cation
level
Control
by
Interfaces
Snapshot
Taken at specified time of invocation
Has a moderate performance cost
switch CLP
API
SQL function / procedure
Administrative view
Event
Taken automatically when the event occurs
Has a moderate performance cost
Is a created database object
start / stop SQL
db2evmon
Usage List
Taken automatically at DML operation time
Has a moderate performance cost
Is a created database object
SET USAGE
LIST
STATE
SQL Table Functions
SQL
Functions
Taken at a specified time of invocation
Has low performance cost
Query Any client that can run a
query
db2pd
Taken at a specified time of invocation
Has no performance cost
May return unknown results (uses a peek
into database system memory sets)
db2pd
invocation
db2pd itself
db2top
UNIX only, snapshot based utility db2top db2top itself
Data Studio
Web Console
(see Data Studio topic for details)
Start/Stop
server
Browser
73
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Snapshot Monitor
Instance control (default control)
Monitor Switch DBM Parameter Information Provided
BUFFER POOL DFT_MON_BUFPOOL Number of reads and writes, time taken
LOCK DFT_MON_LOCK Lock wait times, deadlocks
SORT DFT_MON_SORT Number of heaps used, sort performance
STATEMENT DFT_MON_STMT Start / stop time, statement identification
TABLE DFT_MON_TABLE Measure of activity (rows read / written)
UOW DFT_MON_UOW Start / end times, completion status
TIMESTAMP DFT_MON_TIMESTAMP Timestamps for all above switches and all active event monitors
Defaults for instance and database collection controlled with:
See what is set by default:
GET DBM MONITOR SWITCHES;
DBM System Monitor Information Collected
Switch list for db partition number 0
Buffer Pool Activity Information (BUFFERPOOL) = OFF
Lock Information (LOCK) = OFF
Sorting Information (SORT) = OFF
SQL Statement Information (STATEMENT) = ON 07-20-2009 16:04:30.070073
Table Activity Information (TABLE) = OFF
Take Timestamp Information (TIMESTAMP) = ON 07-20-2009 16:04:30.070073
Unit of Work Information (UOW) = OFF
74
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Snapshot Monitor
Application level control
GET MONITOR SWITCHES;
Monitor Recording Switches
Switch list for db partition number 0
Buffer Pool Activity Information (BUFFERPOOL) = ON 07-20-2009 16:04:30.070073
Lock Information (LOCK) = OFF
Sorting Information (SORT) = OFF
SQL Statement Information (STATEMENT) = ON 07-20-2009 16:04:30.070073
Table Activity Information (TABLE) = OFF
Take Timestamp Information (TIMESTAMP) = ON 07-20-2009 16:04:30.070073
Unit of Work Information (UOW) = ON 07-20-2009 16:04:30.070073
Individual applications can start a monitor switch, just for them, with *:
Where [switch-name] = BUFFERPOOL, LOCK, SORT, STATEMENT, TABLE, UOW, TIMESTAMP
To see which switches are on for your application, use *:
UPDATE MONITOR SWITCHES USING [switch-name] ON;
* API: db2MonitorSwitches
75
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Snapshot Monitor
GET SNAPSHOT
Instance level snapshot examples: *
Database level snapshot examples: *
GET SNAPSHOT FOR ALL DATABASES;
GET SNAPSHOT FOR DBM;
GET SNAPSHOT FOR ALL APPLICATIONS;
GET SNAPSHOT FOR ALL BUFFERPOOLS;
* API: db2GetSnapshot
GET SNAPSHOT FOR TABLES ON SAMPLE;
GET SNAPSHOT FOR DYNAMIC SQL ON SAMPLE;
GET SNAPSHOT FOR ALL ON SAMPLE;
GET SNAPSHOT FOR TABLESPACES ON SAMPLE;
GET SNAPSHOT FOR LOCKS ON SAMPLE;
GET SNAPSHOT FOR BUFFERPOOLS ON SAMPLE;
Database Snapshot
Database name = SAMPLE
Database path =
/home/dbapot/dbapot/NODE0000/SQL00001/MEMBER0000/
Input database alias =
Database status = Active
Catalog database partition number = 0
Catalog network node name =
etc.
Table Snapshot
Table List
Table Schema = SYSIBM
Table Name = SYSDBAUTH
Table Type = Catalog
Data Object Pages = 1
Index Object Pages = 5
Rows Read = 3
Rows Written = 0
Overflows = 0
Page Reorgs = 0
etc.
76
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Snapshot Monitor
Snapshot administrative views schema: SYSIBMADM
SYSIBMADM Administrative Views
SNAPAGENT SNAPAPPL SNAPAPPL_INFO SNAPDBM / SNAPDB
SNAPBP SNAPBP_PART SNAPCONTAINER SNAPSTMT
SNAPDYN_SQL SNAPFCM SNAPFCM_PART SNAPHADR
SNAPSUBSECTION SNAPSWITCHES SNAPTAB SNAPTAB_REORG
SNAPTBSP SNAPTBSP_PART SNAPTBSP_QUIESCER SNAPTBSP_RANGE
SNAPUTIL SNAPUTIL_PROGRESS SNAPSTORAGEPATHS SNAPDETAILLOG
Using administrative
views with a GUI
77
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Event Monitor
Catch events when they occur
Event Type When Collected
CHANGE HISTORY Any changes to: DB & DBM config, registry, DDL or utility execution
LOCKING At lock timeout, lock wait and deadlock time
STATEMENTS End of SQL statement
CONNECTIONS End of Connection
DATABASE Database deactivation
BUFFERPOOLS Database deactivation
TABLESPACES Database deactivation
TABLES Database deactivation
Activities WLM event (like completion of an activity in a Service class)
Statistics WLM_COLLECT_INT setting
Threshold Violations At detection of violation
Package cache At detection of package cache changes
Unit of work At completion of Unit of Work
An event monitor is a created object in a DB2 database that:
Returns information for events specified
Writes output to a TABLE, FILE or PIPE
Is started manually or automatically upon database activation
78
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Event Monitor
Examples
Deadlock event monitor - usage example
CREATE EVENT MONITOR MyDeadlocks FOR DEADLOCKS
WRITE TO TABLE
DEADLOCK (TABLE tb_deadlocks IN ts_deadlocks);
SET EVENT MONITOR MyDeadlocks STATE 1;
(workload runs deadlocks detected and captured)
SELECT * FROM tb_deadlocks;
db2evtbl utility - generate event monitor DDL example
db2evtbl -schema dbapot -evm
EvmonTables TABLES > OUT.DDL
CREATE EVENT MONITOR Evmon_Tables
FOR TABLES
WRITE TO TABLE
TABLE (TABLE dbapot.TABLE_Evmon_Tables
INCLUDES (DATA_OBJECT_PAGES,
DATA_PARTITION_ID,
EVENT_TIME,
etc.
OUT.DDL
db2caem utility example
db2caem d SAMPLE
-st select * from staff
This creates the activity event monitor and capture
information of details, section and values, as well as actuals
for the SQL statement "select * from staff".
79
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Usage List
The DML usage recorder
A usage list is a database object that
Records each DML statement section that references a particular table or index
Also captures statistics about how that section affects each object
All table types supported except:
Aliases, nicknames, views, created temporary tables, detached tables, hierarchy tables
Only the following index types are supported:
Regular, block, dimension block, clustering
Lists are stored in the monitor heap ( mon_heap_sz )
So increase if necessary
Tracks over 50 different metrics for tables, examples are:
Rows read/inserted/deleted/updated, number of references, last updated, wait times and more
80
CREATE USAGE LIST USL_MON_PAYROLL
FOR TABLE PAYROLL_TB
LIST SIZE 500
WHEN FULL DEACTIVATE
ACTIVE ON START DATABASE;
Table or index
Default is 100
Default is WRAP
Default is INACTIVE.
To activate, use:
SET USAGE LIST
STATE
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Usage List
Functions for retrieving information
Retrieve information from usage list using the following table functions:
MON_GET_TABLE_USAGE_LIST - Table usage list information
MON_GET_INDEX_USAGE_LIST - Index usage list information
MON_GET_USAGE_LIST_STATUS - The current status of the usage list
Example:
81
SELECT * FROM
TABLE( MON_GET_TABLE_USAGE_LIST(NULL, 'USL_MON_PAYROLL', 3));
USAGELISTSCHEMA USAGELISTNAME TABSCHEMA TABNAME MEMBER . . . LAST_UPDATED . . .
--------------- --------------- --------- ---------- ------ . . . -------------------------- . . .
ISAYYID USL_MON_PAYROLL ISAYYID PAYROLL_TB 3 . . . 2012-03-03-10.20.22.727803 . . .
ISAYYID USL_MON_PAYROLL ISAYYID PAYROLL_TB 3 . . . 2012-03-03-10.20.58.202161 . . .
2 record(s) selected.
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
SQL Built-in Function Monitoring
Lightweight approach to monitoring Schema: SYSPROC
Type DB Parameter SQL Output Function * XML Output Function
SYSTEM MON_REQ_METRICS MON_GET_UNIT_OF_WORK MON_GET_UNIT_OF_WORK_DETAILS
MON_GET_WORKLOAD MON_GET_WORKLOAD_DETAILS
MON_GET_CONNECTION MON_GET_CONNECTION_DETAILS
MON_GET_SERVICE_SUBCLASS MON_GET_SERVICE_SUBCLASS_DETAILS
MON_GET_FCM
MON_GET_FCM_CONNECTION_LIST
MON_GET_MEMORY_POOL
MON_GET_MEMORY_SET
ACTIVITY MON_ACT_METRICS MON_GET_PKG_CACHE_STMT MON_GET_ACTIVITY_DETAILS
MON_GET_PKG_CACHE_STMT_DETAILS
MON_GET_LOCKS
MON_GET_APPL_LOCKWAIT
OBJECT MON_OBJ_METRICS MON_GET_TABLE
MON_GET_BUFFERPOOL
MON_GET_CONTAINER
MON_GET_INDEX
MON_GET_TABLESPACE
SELECT * FROM TABLE(MON_GET_BUFFERPOOL(cast(NULL as bigint), -2)) AS t;
* These are examples and
is not an exhaustive list
82
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
db2pd
A quick and immediate memory set interface
Can see snapshot like information on instances, databases, objects, etc.
Without snapshot overhead, locking or latching
Can even see some information when a database is not activated
Database example:
Instance example:
db2pd db SAMPLE > output.txt
Database SAMPLE not activated on database partition 0.
Instance DB2 uses 32 bits and DB2 code release SQL09071
with level identifier 08020107
Informational tokens are DB2 v9.7.100.31, s090621,
NT3297, Fix Pack 1.
Operating System Information:
etc.
output.txt
db2pd memblocks file=out.txt
All memory blocks in DBMS set.
Address DataAddrss PoolID PoolName BlkAge Size
0x7A8B0068 0x7A8B0080 77 fcmsess 3 844800
0x7A8A0048 0x7A8A0060 77 fcmsess 2 6000
0x7A85FFC8 0x7A85FFE0 77 fcmsess 1 262144
0x7A7F0068 0x7A7F0080 79 fcmchan 3 94208
etc.
out.txt
83
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
db2top
A lightweight, UNIX only, snapshot based stand alone utility
Using snapshots, you can monitor the following with this utility:
Databases, table spaces, dynamic SQL, statements, HADR, skewing, sessions, buffer
pools, locks, partitions, federation, agents, memory, utilities and bottlenecks.
Interactive usage example:
db2top d SAMPLE
84
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
InfoSphere Optim Performance Manager
Browser based, time based, extended insight capable monitoring
85
Overview of capabilities
View Health Summary of multiple DB2 instances
Real-time view of currently open connections, current
table space states, and current running utilities
For single partition, multi-partition or pureScale
databases
With predefined monitoring templates for OLTP, BI,
SAP, development or test
End-to-end response time monitoring of
Application server
Database client
Database server
Network
Ask us about how to get
more information
on this product!
Integration capabilities
IBM DB2 Workload Manager
To create, alter and monitor your WLM environment
IBM Tivoli Composite Application Manager
To provide an enterprise consolidated view
IBM InfoSphere Optim Query Tuner and IBM InfoSphere
Optim pureQuery Runtime
To speed up and tune your applications
Browser based dashboards
Show performance overviews with health indicators
Easily flag problem spots with set indicator alerts
sent to the Web User Interface, n email account
or a page number
Drill down to display detailed metrics on:
Locking conflicts, deadlocks, timeouts
Long running or un-tuned SQL statements
Sorting or prefetching issues
Buffer pool, cache, heap size issues
Operating system memory or CPU shortages
Partition skews or overloaded partitions
Log performance issues
Review all of this information through a history time
slider
Show detailed or aggregate levels of information
Generate canned reports and more
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
InfoSphere Optim Configuration Manager *
Monitor and manage your clients and servers efficiently
86
Manage Servers
Discover and explore your servers
Keep a central repository for all
discovered information
Use a common data model to classify
and persist discovered information
Automatically find:
databases
subsystems
instances
Schedule jobs to monitor server side
changes
Track configuration changes
Integrate with InfoSphere Optim
Performance Manager
Ask us about how to get
more information
on this product!
Manage Clients
Discover and explore your clients
Automatically find:
Java clients
Non-Java clients (.NET, CLI)
Isolate applications - put them into a:
Penalty Box to throttle them
Proving Ground to test capabilities
before implementation
Tune Workload Balancing properties
Redirect database connections
easy application migration
Throttle database connections
* Available for Z/OS as well as LUW
2012 IBM Corporation
An IBM Proof of Technology
Lab 11 pureXML
16 slides
Burt Vialpando
DB2 pureXML
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 pureXML (part of the core engine capability)
XML in the industry
XML (eXtensible Markup Language) is
A hierarchical data model
A self describing data representation
Whereas HTML is display representation
Flexible
Used on any platform, with any OS or
programming language
Fully Unicode compliant
Used throughout the industry to provide information
interchange
XML usage is desirable when
Data is inherently hierarchical or nested in nature
Data sets have sparsely populated attributes
Schema changes occur frequently
Variable or many schemas exist for any given data
source
Combining structured & unstructured data is required
XML usage is driven by
Application architects & programmers
SOA implementation
Industry standards
DBAs will need to know
How to administer XML in their databases
What options they have for doing so
id=77
XML text document
well formed
book
title price
author
authors
author
keywords
keyword keyword
id=99 XML relational
Databases
DB2
Databases
59
Shen Wat Burt Vee
XML
Document Tree
<book>
<authors>
<author id= 77" >Shen Wat</author>
<author id= 99" >Burt Vee</author>
</authors>
<title>DB2 Databases</title>
<price>59</price>
<keywords>
<keyword>XML</keyword>
<keyword>relational</keyword>
</keywords>
</book>
88
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 pureXML
XML pure native storage what this means
DB2 stores XML in a parsed hierarchical format
Relational columns are stored in relational format
XML columns are stored natively in a hierarchical
format
Not as a LOB (CLOB or BLOB)
Not shredded into relational tables
As pure native XML!
DB2 is a hybrid data server
Has all the advantages of a relational database
Has all the advantages of a hierarchical
database
XML is a new SQL data type
No XML parsing for query evaluation
Efficient XML document tree storage
Hybrid queries now available using
SQL/XML or XQuery
Either can go after relational or hierarchical
data in the same query
CUSTOMER_ID CUSTOMER_DOC
12345 <cust>
<info>...</info>
</cust>
CUSTOMER_INFO
DB2 STORAGE DB2 STORAGE DB2 STORAGE
CREATE TABLE CUSTOMER_INFO
(CUSTOMER_ID INTEGER,
CUSTOMER_DOC XML, );
89
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 pureXML
XML storage parsing
DB2 puts XML data into the same table space with the relational data
DB2 uses a compression technique (Xerces) to parse and store XML data
Tag names are coded as unique integers
DB2 XML storage benefits
Comparisons & navigation are faster
Storage is reduced
XQuery model is persisted
0 dept
1 employee
2 id
3 name
4 phone
5 office
String Table
SYSIBM.
SYSXMLSTRINGS
Path Table
SYSIBM.
SYSXMLPATHS
0 /
1 /0
2 /0/1
3 /0/1/3
4 /0/1/4
5 /0/1/5
Xerces Parse
0
3
1
4 2=77
Shen Wat
5
888-555-1212 123
3
1
4 2=99
Burt Vee
5
888-555-9999 234
dept
employee
Shen Wat 888-555-1212 123
employee
Burt Vee 888-555-9999 234
id=77 name phone office id=99 name phone office
90
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 pureXML
XML nodes and regions
XML document tree hierarchy stored in DB2 pages by nodes (XDAs)
Nodes can be elements, attributes, text, etc.
Name, namespace, namespace prefix (stringIDs)
Type annotation (pathID)
Pointer" to parent
List of pointers to children
Inlined values (attribute/text values)
Documents that dont fit on one page are split into regions
DB2 automatically creates a regions index for you
To navigate XML data regions & nodes within regions
0
3
1
4 2=77
Shen Wat
5
888-555-1212 123
3
1
4 2=99
Burt Vee
5
888-555-9999 234
1 Table Space Page 1 Table Space Page
regions
index
XDA XDA
91
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 pureXML
XML basic DML usage
Create tables with XML data types
INSERT into and SELECT from these columns natively from within your applications
No LOBs involved
No shredding involved
CREATE TABLE CUSTOMER_INFO
(CUSTOMER_ID INTEGER, CUSTOMER_NAME CHAR(20), CUSTOMER_DOC XML);
INSERT INTO CUSTOMER_INFO VALUES
(12345, MYCO INC., :xmldoc );
SELECT CUSTOMER_ID, CUSTOMER_NAME, CUSTOMER_DOC
FROM CUSTOMER_INFO
WHERE CUSTOMER_NAME = MYCO INC.;
INSERT INTO CUSTOMER_INFO VALUES
(12345, MYCO INC.,
XMLPARSE (DOCUMENT '<?xml version=" 1.0" encoding=" UTF-8" ?><customerinfo>
<owner>Burt Vee</owner><addr country=" United States" ><street>1122 Lake Ave.</street>
<city>Dallas</city><prov-state>Texas</prov-state><pcode-zip>75063</pcode-zip></addr>
<phone type=" work" >8888-555-9999</phone></customerinfo>'
PRESERVE WHITESPACE));
OR
92
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 pureXML
Advanced XML table usage
XML inline storage for XML documents 32K or smaller
Define a table with column XML INLINE LENGTH n-bytes
This avoids storage in the XDA and the need for a regions index
Check constraints on XML columns during INSERT or UPDATE
Uses IS VALIDATED predicate against an XML-expression
Update or Modify XML documents
Uses TRANSFORM XML-expression
ALTER TABLE [table-name] ADD CONSTRAINT [constraint-name]
CHECK ([xml-column-name] IS VALIDATED ...);
UPDATE customer set [xml-column-name] = XMLVALIDATE(
XMLQUERY(' declare default element namespace
" http://[sample-namespace]" ;
TRANSFORM
COPY [xquery-expression];
CREATE TABLE [table-name] (
[xml-column-name] XML INLINE LENGTH [n-bytes] )
93
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 pureXML
Loading or importing XML
Loading XML in DB2 has a similar syntax to loading LOBs
Use XML FROM to point to XML subdirectory containing individual XML documents
Use XMLCHAR data modifier to activate XML FROM
Though the syntax is similar, this is not loading XML as LOBs!
Import syntax is the same as LOAD syntax
Input Data File:
s:\shared\cust_load.dat
LOAD FROM s:\shared\cust_load.dat OF DEL
XML FROM s:\shared\XMLdocs
MODIFIED BY XMLCHAR
REPLACE INTO XMLCUSTOMER;
Input data file, delimited format
Subdirectory where XML documents are located
s:\shared\XMLdocs\C1.XML
s:\shared\XMLdocs\C2.XML
XML documents:
s:\shared\XMLdocs\
CUSTOMER_ID CUSTOMER_NAME CUSTOMER_DOC
12345 MYCO INC. <XDS FIL=C1.XML/>
23456 YOURCO LTD. <XDS FIL=C2.XML/>
CUST_ID CUST_NAME CUSTOMER_DOC
12345 MYCO INC. <XDS FIL=C1.XML/>
23456 YOURCO LTD. <XDS FIL=C2.XML/>
pointer
94
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 pureXML
Other DB2 XML utility, command and functionality support
* Oracle note:
Oracle cannot create an index using any XMLPATTERN expression.
This can be a key differentiator in XML performance
EXPORT TO s:\shared\cust_exp.del
XML TO s:\shared\XMLdocs
MODIFIED BY XMLCHAR
XQUERY
EXPORT
CREATE INDEX [index-name]
ON [table-name][col-name]
ON ALL COLUMNS
EXCLUDING XML COLUMNS
RUNSTATS
DB2BATCH d [database-name]
-m <owner>Burt Vee</owner>'
DB2BATCH
DB2LOOK
DB2LOOK
-xs -xdir
DB2SUPPORT
- xml_generate
DB2SUPPORT
EXPLAIN
EXPLAIN PLAN
14
* Enterprise Server
Editions only
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
15
DB2 Multi-Temperature Storage Support
Two easy steps to implement
Step #1 - Create storage groups (this is all in automatic storage):
15
Create stogroup Sto_Grp_Hot on /prodpath1/ssddisk overhead 0.75 device read rate 500;
Create stogroup Sto_Grp_Warm on /prodpath2/sasdisk overhead 6.73 device read rate 100;
Create stogroup Sto_Grp_Cold on /prodpath3/satadisk overhead 12.75 device read rate 50;
Step #2a Alter (or create) automatic storage table spaces to use the storage
groups:
Create tablespace tbspc9 using stogroup Sto_Grp_Hot;
Alter tablespace tbspc8 using stogroup Sto_Grp_Warm;
Alter tablespace tbspc5 using stogroup Sto_Grp_Cold;
Step #2b or alter non-automatic storage table spaces this way:
Alter tablespace tbspc_dms managed by automatic storage using stogroup Sto_Grp_Hot;
Alter tablespace tbspc_dms rebalance;
The table space will inherit
overhead and transfer rates
from the storage groups
overhead and device read
rates respectively.
Table spaces already in automatic storage will
rebalance to the new storage automatically.
Table spaces not in automatic storage still
require you to rebalance when moving there.
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Multi-Temperature Storage Support
Rebalance considerations
Automatic rebalance occurs by default when altering storage groups
MON_GET_REBALANCE_STATUS table function shows status
Suspend or resume the rebalance this way:
16
Alter tablespace SALES_Q1_2011 rebalance suspend;
[let your system run until a better time for the rebalance]
Alter tablespace SALES_Q1_2011 rebalance resume;
select char(tbsp_name, 20) as tbsp_name,
rebalancer_status as status,
rebalancer_extents_remaining as extents_remaining,
rebalancer_extents_processed as extents_processed
from table (MON_GET_REBALANCE_STATUS(NULL, -1)) ;
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Multi-Temperature Storage Support
Other DB2 Storage Group capabilities
17
DB2 Storage Group Capability Description
SYSCAT.STOGROUPS
SYSIBM.SYSSTOGROUPS
SYSIBM.SYSTABLESPACES (SGID column)
System catalog views to get storage group information in the
database
ADMIN_GET_STORAGE_PATHS Table function to get storage group information in the database
ADMIN_LIST_DB_PATHS
MON_GET_TABLESPACE
MON_GET_CONTAINER
Other table functions to help manage storage
db2pd -storagegroup Utility option for seeing storage group information in the database
SET STOGROUP PATHS FOR command Use when performing a redirected restore of a database that
uses storage groups
Use in the same way you would for setting table space paths
DATA TAG [numeric-value] Create or alter a storage group (or table space) to contain this
optional characteristic
A table space can inherit its storage group DATA TAG value if
not specified
This value is used by the Workload Manager to influence how
queries will run, to give priority by the location of the data
(See the WLM topic for more details)
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Federation *
Definition and benefits
Federation is the concept of setting up DB2 as a distributed database source
that allows you to do the following:
Combine local and remote data from disparate sources into a single view
e.g. DB2, Oracle and SQL Server
Access, join, and manipulate data of different formats from the same interface
e.g. LUW relational, z/OS hierarchical and XML
Incorporate data from multiple sources with a single query
e.g. inventory, sales, and customer information
Insert, update or delete multiple data sources simultaneously regardless of location
Implement security policies throughout a unified view of your enterprise
Interface with standard SQL tools, development environments, web services and
other standard IT infrastructure components
Compensate for SQL limitations at the data source by processing parts of a
distributed request at the federated server
18
Note:
* The DB2 Advanced Enterprise Server Edition can perform federation to many sources, but in order to exploit
Federation to the greatest extent, ask your IBM representative about the InfoSphere Federation Server
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Federation
Overview
19
Components of a Federated System
DB2 family
Informix
SQL Server
Oracle
Sybase
Teradata
ODBC
J DBC
Relational sources
Non-relational sources
Text XML Excel
spreadsheet
WebSphere
MQ
Web
Services
Script Life sciences
URL
DB2 z/OS
VSAM
Adabas
IMS
CA-Datacom
CA-IDMS
z/OS sources
Unified SQL View
SQL, SQL/XML, XQuery
Federation Engine
Global catalog
Wrappers and functions
O
D
B
C
J
D
B
C
Federation Server
Classic
Federation
BV
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Federation
Basic components
A federated database has the following basic components
Wrapper
Mechanism (connector) by which the federated database interacts with data sources
The federated database uses routines stored in a library called a wrapper module
e.g. Net8 for Oracle or DRDA for DB2
Server definition
The definitions that point to the specific data source itself
Specifies the type and version of the data source and the database name if it is a
relational data source
e.g. a specific Oracle instance (which has only one database) or a specific DB2
database
User mapping
An association between an authorization ID on the federated server and the
information that is required to connect to the remote data source.
Nickname
An identifier of the specific data source object to be accessed.
e.g. a specific table in a specific schema in a SQL Server database
20
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Federation
Other objects and capabilities
A federated database can optionally have the following:
Alternate data type mapping
For relational data sources, wrapper default data type mapping can be overridden
For non-relational sources, data type mapping may not be done in the wrapper
Index specifications
Store information about the columns of remote indexes in the global catalog and to
ensure optimal performance
Federated Stored Procedure
Object that points to a procedure on the data source so it can be called there
Federated Materialized Query Tables
An MQT that is created locally on the federated server that is refreshed by one or more
remote objects serviced by nicknames
Federated function mapping
If the data source has the corresponding function available, processing of this function
can be pushed down, and it will help to improve performance
Federated two-phase commit
Enables data integrity and accuracy to be maintained by allowing the update of multiple
data sources simultaneously within a federated (distributed) system
21
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Cloud Offerings
Database as a Service (DBaaS)
22
Provisioning and management of a database
For simplicity and better control by
application developers and administrators
Less need to worry about:
Operating systems and hardware
Day-to-day maintenance
Version upgrades and fix packs
Security upgrades, backup strategies,
HA strategies
Escalating costs
DB2 Cloud offerings:
IBM Workload Deployer
IBM SmartCloud Enterprise
Amazon EC2 (w/ RightScale)
OS Image OS Image
HADR
2 Operating systems
OS configuration
OS maintenance
2 DB2 installations
DB2 configuration
DB2 maintenance
HA topology
Backup strategy
Security patches
DB2 and OS
Failure recovery
Usage based on DBA
skills
Traditional data base
environment
vs.
DBaaS
Using Automated Best Practices
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Cloud Offerings
IBM Workload Deployer The appliance to build your own private cloud
23
Overview of capabilities:
Provides access to IBM middleware virtual images and workload patterns
Easily, quickly and repeatedly create application environments that can be securely deployed and managed in a
private cloud
Capability to use multiple virtual images in a single pattern
Speeds application deployment and dramatically reduces setup time for WebSphere environments from weeks to
minutes with pre-defined patterns and virtual images
Enhanced deployment profile customization
Ensures security in a shared environment serving as a secured, tamper-resistant vault for images and credentials
Integration features:
Embeds Plug-in Development Kit (PDK) to enable customers to create custom plug-ins and patterns to be used by
virtual applications
Utilizes custom images created by IBM Image Construction and Composition tool, as part of virtual system patterns.
Broadens programming model support with J EE 6, OSGi, J PA, and other WebSphere Application Server v8
supported models
Integrates fully with development and service management tools from IBM Rational
and Tivoli
for end-to-end
support
Availability of WebSphere Application Server Hypervisor Edition - Intelligent Management Pack
Hardware support features:
Broadens the Virtual Application deployment to AIX on PowerVM
Provides reliability with added appliance failover POWER7 support
Support for WebSphere Application Server Hypervisor Edition on ESX, Power and System z
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Cloud Offerings
IBM SmartCloud Enterprise Infrastructure as a Service (IaaS)
24
Highlights:
An agile cloud computing IaaS designed to provide rapid access to security-rich, enterprise-
class virtual server environments
Well suited for development and test activities and other dynamic workloads.
Ideal for both IT and application development teams
Delivers cloud-based web services, systems and software to meet the needs of your
business
Use DB2 Enterprise or Express Editions for DBaaS
Licensing:
BYOL: Bring your own
Use your previously purchased IBM software license. You own a license and can apply it to the pre-built
image in the catalog.
PAYG: Pay as you go
Pay by the hour to use an IBM-owned license. You choose the software, accept the license terms online,
and receive a monthly usage bill.
DUO: Development use only
Use the software for development at no charge as an eligible Independent Solution Vendor or Systems
Integrator.
Pre-release:
Use on a temporary basis for test use only, at no charge.
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 Cloud Offerings
Amazon Elastic Compute Cloud (EC2) with RightScale
25
Amazon EC2 is a web service that provides resizable compute capacity in the cloud, designed to
make web-scale computing easier for developers
Amazon EC2 is a true virtual computing environment, allowing you to use web service interfaces
to launch instances with a variety of operating systems, load them with your custom application
environment, manage your networks access permissions, and run your image using as many or
few systems as you desire
Select a pre-configured, template based image to get up and running immediately or create an Amazon
Machine Image (AMI) containing your applications, libraries, data, and associated configuration settings
Configure security and network access on your Amazon EC2 instance
Choose which instance type(s) and operating system you want, then start, terminate, and monitor as many
instances of your AMI as needed, using the web service APIs or the variety of management tools provided
Determine whether you want to run in multiple locations, utilize static IP endpoints, or attach persistent
block storage to your instances
Pay only for the resources that you actually consume, like instance-hours or data transfer
RightScale is a Cloud Management solution for all of your clouds public, private and hybrid
Cloud-specific differences are abstracted so you can focus on running your applications
All of your resources are in one place and are organized for ease with logical groups of servers called
deployments
Provision, configure, and automate individual servers or entire deployments in minute
All of your resources are accessible on your terms from a RightScale Dashboard or via the RightScale API
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Locking
Factors that affect locking
26
Factor Examples
The type of processing
being performed
Read only
Includes all SELECT statements that are intrinsically read-only, have an explicit
FOR READ ONLY clause, or are ambiguous, but the query compiler assumes that
they are read-only because of the BLOCKING option value that the PREP or BIND
command specifies.
Intent to change
Includes all SELECT statements that have a FOR UPDATE clause, a USE AND
KEEP UPDATE LOCKS clause, a USE AND KEEP EXCLUSIVE LOCKS clause, or
are ambiguous, but the query compiler assumes that change is intended.
Change
Includes UPDATE, INSERT, and DELETE statements, but not UPDATE WHERE
CURRENT OF or DELETE WHERE CURRENT OF.
Cursor Controlled
Includes UPDATE WHERE CURRENT OF and DELETE WHERE CURRENT OF.
Data access method Index Scan
If an index scan is used to locate a specific row, the optimizer will usually choose
row-level locking (IS) for the table.
Table Scan
If an index is not used, the entire table must be scanned in sequence to find the
required rows, and the optimizer will likely choose a single table-level lock.
Parameters locktimeout
DB cfg: specifies number of seconds an application will wait for a lock
locklist
DB cfg: memory in KB for maintaining all current locks
maxlocks
DB cfg: percent of locklist requiredused to cause lock escalation
cur_commit
DB cfg: determines whether isolation level CS will use the log buffer to get data as it
is currently committed without a lock wait for the outcome of an update transaction
Various registry
variables
db2_evaluncommitted, db2_skipdeleted, db2_skipinserted, db2_keeptablelock
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Locking
Lock Mode summary
27
Lock Mode Applicable Object Type Description
IN (Intent None) Table spaces, blocks,
tables, data partitions
The lock owner can read any data in the object, including uncommitted data, but
cannot update any of it. Other concurrent applications can read or update the table.
IS (Intent Share) Table spaces, blocks,
tables, data partitions
The lock owner can read data in the locked table, but cannot update this data.
Other applications can read or update the table.
IX (Intent Exclusive) Table spaces, blocks,
tables, data partitions
The lock owner and concurrent applications can read and update data. Other
concurrent applications can both read and update the table.
NS (Scan Share) Rows The lock owner and all concurrent applications can read, but not update, the locked
row. This lock is acquired on rows of a table, instead of an S lock, where the
isolation level of the application is either RS or CS.
NW (Next Key Weak
Exclusive)
Rows When a row is inserted into an index, an NW lock is acquired on the next row. This
occurs only if the next row is currently locked by an RR scan. The lock owner can
read but not update the locked row. This lock mode is similar to an X lock, except
that it is also compatible with NS locks.
S (Share) Rows, blocks, tables,
data partitions
The lock owner and all concurrent applications can read, but not update, the locked
data.
SIX (Share with Intent
Exclusive)
Tables, blocks, data
partitions
The lock owner can read and update data. Other concurrent applications can read
the table.
U (Update) Rows, blocks, tables,
data partitions
The lock owner can update data. Other units of work can read the data in the
locked object, but cannot update it.
X (Exclusive) Rows, blocks, tables,
buffer pools, data
partitions
The lock owner can both read and update data in the locked object. Only
uncommitted read (UR) applications can access the locked object.
Z (Super Exclusive) Table spaces, tables,
data partitions, blocks
This lock is acquired on a table under certain conditions, such as when the table is
altered or dropped, an index on the table is created or dropped, or for some types
of table reorganization. No other concurrent application can read or update the
table.
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Locking
Lock Type compatibility
28
State of Held Resource
State Being Requested None IN IS NS S IX SIX U X Z NW
None yes yes yes yes yes yes yes yes yes yes yes
IN (Intent None) yes yes yes yes yes yes yes yes yes no yes
IS (Intent Share) yes yes yes yes yes yes yes yes no no no
NS (Scan Share) yes yes yes yes yes no no yes no no yes
S (Share) yes yes yes yes yes no no yes no no no
IX (Intent Exclusive) yes yes yes no no yes no no no no no
SIX (Share with Intent
Exclusive)
yes yes yes no no no no no no no no
U (Update) yes yes yes yes yes no no no no no no
X (Exclusive) yes yes no no no no no no no no no
Z (Super Exclusive) yes no no no no no no no no no no
NW (Next Key Weak
Exclusive)
yes yes no yes no no no no no no no
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
DB2 10.1 Fundamentals Test
Overview of Sections
29
Section Description Topic Review
#1 Planning (10%) Knowledge of DB2 products
Knowledge of database workloads
Knowledge of non-relational data concepts: XML, LOBs
Introduction and Overview
Introduction and Overview, Oracle DBA knowledge
XML topic and lab, Oracle DBA knowledge
#2 Security (15%) Knowledge of restricting data access
Knowledge of different privileges and authorities
Knowledge of DCL results from grants and revokes
Security topic and lab
Security topic and lab
Security topic and lab, Oracle DBA knowledge
#3 Working with DB
objects (20%)
Ability to create and connect to DBs
Ability to identify DB2 objects
Knowledge of characteristics / properties of DB2 objects
Knowledge of DDL
Knowledge of Temporal tables
Database topic and lab, many other labs
Database lab and many other labs
Many of the labs
Many of the labs, Oracle DBA knowledge
Additional Misc. Topics (Temporal Data Mgmt.)
#4 Working with
DB2 using SQL (20%)
Ability to use SQL to SELECT, SORT and GROUP data
Ability to use SQL to UPDATE, DELETE and INSERT data
Knowledge of transactions
Ability to create and call a stored procedure
Ability to use XQuery
Ability to use Time Travel queries
Many of the labs, Oracle DBA knowledge
Many of the labs, Oracle DBA knowledge
Many of the labs, Oracle DBA knowledge
Explain, MDC and Compression labs
XML lab
Additional Misc. Topics (Temporal Data Mgmt.)
#5 Working with
tables, views and
indexes (22%)
Ability to identify data types including XML and Oracle
Create a temporary table
Use Referential Integrity and other data constraints
Identify characteristics of tables, views and indexes
Knowledge of use of triggers
Knowledge of schemas
XML lab and the Oracle compatible topic
Oracle DBA knowledge
Oracle DBA knowledge
Many of the labs, Oracle DBA knowledge
Oracle DBA knowledge
Security topic and lab
#6 Data
Concurrency (13%)
Knowledge of factors that influence locking
Knowledge of which objects locks can be obtained on
Knowledge of lock types and characteristics of locks
Knowledge of isolation levels / Currently Committed
Additional Misc. Topics (Locking)
Additional Misc. Topics (Locking)
Additional Misc. Topics (Locking)
Oracle Compatibility topic and lab
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
We appreciate your feedback.
Please fill out the survey in order to improve this educational event.
SIMPLIFIED CHINESE HINDI J APANESE
ARABIC RUSSIAN TRADITIONAL CHINESE TAMIL THAI
FRENCH
GERMAN
ITALIAN
SPANISH
BRAZILIAN PORTUGUESE
Thank you
30
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
End of Elective Additional Misc. Topics
Presentation by:
Burt Vialpando
IBM Executive IT Specialist, The Open Group Distinguished IT Specialist, IBM IT Certification Board
IBM Certified Database Administrator for DB2 10.1 for Linux, UNIX and Windows
IBM Certified Advanced Database Administrator for DB2 V9.7 for Linux, UNIX and Windows
IBM Certified Solutions Developer DB2 9.7 SQL Procedures
IBM Certified Application Developer DB2 9
IBM Certified Solutions Designer for DB2 Business Intelligence V8
IBM Certified Solutions Expert for DB2 UDB V7.1 Database Administration for IBM OS/390
Oracle 11g Database Administrator Certified Associate
IBM Plateau Level 1 Inventor
burt.vialpando@us.ibm.com
9L =.`-L
IBM Certified IT Specialist for DB2 Migrations
IBM Advanced Technical Expert DB2 for Clusters
IBM Certified Database Administrator for DB2 UDB V8.1 for Linux UNIX and Windows
IBM Certified Solutions Expert for DB2 UDB V8.1 Family Application Development
Project Management Professional Certified
IBM Plateau Level 1 Inventor
vikram.khatri@us.ibm.com
31
2012 IBM Corporation
IBM Software
DB2 10.1 Administration for the Experienced Oracle DBA - Proof of Technology
Notices and Legal
Copyright IBM Corporation 2012. All rights reserved.
The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or implied. IBM shall not be
responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have the effect of, creating
any warranties or representations fromIBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software.
References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. This information is based on current
IBM product plans and strategy, which are subject to change by IBM without notice. Product release dates and/or capabilities referenced in these materials may change at any time at
IBMs sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way.
IBM, IBM logo, AIX, Cube Views, DB2, DB2 OLAP Server, Informix, OmniFind, pureXML, WebSphere, z/OS, zSeries, and other IBM products and services are trademarks of the
International Business Machines Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others.
FileNet is a registered trademark of FileNet Corporation, in the United States, other countries, or both.
ALPHABLOX is a registered trademark of Alphablox Corporation in the United States, other countries, or both.
J ava is a trademark of Sun Microsystems in the United States and other countries.
Windows is a trademark of Microsoft corporation in the United States and other countries.
UNIX is a trademark of The Open Group in the United States and other countries.
Linux is a trademark of Linus Torvalds in the United States and other countries.
32
NOTES
NOTES
Copyright IBM Corporation 2012.
The information contained in these materials is provided for
informational purposes only, and is provided AS IS without warranty
of any kind, express or implied. IBM shall not be responsible for any
damages arising out of the use of, or otherwise related to, these
materials. Nothing contained in these materials is intended to, nor
shall have the effect of, creating any warranties or representations
fromIBM or its suppliers or licensors, or altering the terms and
conditions of the applicable license agreement governing the use of
IBM software. References in these materials to IBM products,
programs, or services do not imply that they will be available in all
countries in which IBM operates. This information is based on
current IBM product plans and strategy, which are subject to change
by IBM without notice. Product release dates and/or capabilities
referenced in these materials may change at any time at IBMs sole
discretion based on market opportunities or other factors, and are not
intended to be a commitment to future product or feature availability
in any way.
IBM, the IBM logo and ibm.comare trademarks of International
Business Machines Corp., registered in many jurisdictions
worldwide. Other product and service names might be trademarks of
IBM or other companies. A current list of IBM trademarks is
available on the Web at Copyright and trademark information at
www.ibm.com/legal/copytrade.shtml.