Vous êtes sur la page 1sur 84

DB2 Information Management Software

Osnove DB2
na Linux, Unix, Windows operacijskih sistemih

FRI, Univerza v Ljubljani


25.5.2005

klemen.kobilica@si.ibm.com

© 2005 IBM Corporation


DB2 Information Management Software

Agenda
 Pregled IBM Information Management programske opreme
 Arhitektura DB2 in objekti v bazi
 Orodja za delo z DB2
 Integracija informacij

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

IBM Software Overwiew

Processes

Applications

Middleware
Lotus WebSphere DB2 Tivoli Rational
Environment

Linux Unix Windows OS/400 z/OS


Systems
Environment
Servers Storage

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

IBM Software Overwiew


 Lotus
– Collaborative portal
– Document and Web content management
– e-Learning
– Real-time and team collaboration (instant messaging, web conferencing)
 WebSphere
– Application and transaction infrastructure
– Application transformation & integration
– Commerce
– Mobile and speech middleware
 Tivoli
– Application Management, Availability
– Orchestration and provisioning management
– Security (automated identity management and security event management)
– Storage and optimization
 Rational
– Software Development

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Information Management on one slide

Database Servers Enterprise Content Mgmt.


Build the foundation for Manage volume and capture
information on demand to meet the value of all information
the full range of your business contained within multiple
needs. content types.

Business Intelligence Data Management Tools


Gather, manage & Enhance the performance
analyze data, of IBM IMS and DB2 using
generating information tools designed to meet
to develop insight for your needs.
Information Integration
informed decisions.
Collect and integrate diverse and
distributed information in real time
across your enterprise.

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Information Management capabilities: products

Database Servers Enterprise Content Mgmt.


DB2 UDB DB2 Content Manager
Informix IDS, XPS DB2 CM OnDemand
Cloudscape DB2 Common Store
IMS DB2 Document Manager
… …

Business Intelligence Data Management Tools


DB2 Warehouse DB2 Performance expert
Manager Information Integration DB2 Recovery Expert
DB2 OLAP Server DB2 Information Integrator DB2 Test Generation Tool
DB2 Cube Views DB2 Information Integrator …
DB2 Intelligent Miner Content Edition
DB2 Alphablox DB2 Information Integrator
… OmniFind
...
DB2 Fundamentals © 2005 IBM Corporation
DB2 Information Management Software

Information Management Software

Database Servers
 DB2
– Database management system that delivers a flexible and cost-effective database
platform to build robust on demand business applications.
 Informix IDS
– Delivers superior application performance for transaction intensive environments.
 Cloudscape
– Provides developers a small footprint, standards-based Java database that can be
tightly embedded into any Java based solution.

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

DB2 UDB Database Servers


Enterprise-
 OLTP & Analytical Applications Server Edition
 High Performance & Scale + DPF
 High Availability, Security Enterprise-
Server Edition
 Platform Optimization

Multi-terabyte
Workgroup clustered
Edition data warehouses
s es
Express in es
s
Edition Bu
Personal
a rge
Edition , L
e ss
u sin & Cross Platform
Everyplace B t,
d i u m
l, te s s AIX, Solaris, HP/UX,
& Me enta ystem Linux & Windows
a ll
a rt m er s zSeries, iSeries,
S m de p el o p VSE and VM
v
de

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

DB2 UDB Database Servers


 DB2 Universal Database V8.2
– IBM's relational database management system for AIX, Linux, HP-UX, Sun,
and Windows.
 DB2 Universal Database for z/OS
– Use DB2 on the mainframe to run powerful enterprise applications, and
make e-commerce a reality.
 DB2 Universal Database for iSeries
 DB2 for VM and VSE
 DB2 Everyplace
– DB2 relational database and enterprise synchronization architecture for
mobile and embedded devices.

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

IBM Cloudscape V10.0

 open source-based Java relational database management system that can be


embedded in Java programs and used for online transaction processing.
 A platform-independent, small-footprint (2MB) database.
 IBM is open sourcing Cloudscape as Derby available on the Apache Incubator
Project site.
 Runs on any standard Java Virtual Machine (JVM), allowing developers to
"write once, deploy anywhere."
 Embeddable inside Java applications on the server, desktop or in pervasive
devices.
 Includes Cloudscape Network Server - providing multi-user connectivity to IBM
Cloudscape databases within a single system or over a network using standard
Distributed Relational Database Architecture™ (DRDA®) protocol.
 Delivers zero-administration functionality to eliminate the need for a dedicated
database administrator.

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

IBM Cloudscape & Derby

 Single code line, at Apache


IBM Cloudscape is snapshot of Derby
+ Service & Support
+ Windows, Linux or Java installer
+ Packaging of DB2 Universal JDBC Driver
+ Translated documentation & error messages
+ Sample database
 IBM Cloudscape team continues development on Derby

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

IBM Cloudscape V10.0

IBM Cloudscape is DB2 UDB Compatible

 Compatible at the programming model level


– SQL
– Cloudscape’s syntax is a subset of the DB2 UDB syntax
– Application’s written against Cloudscape can be migrated to DB2 UDB,
when required
– JDBC
– Built-in embedded driver for Cloudscape
– DB2’s JDBC driver used for network connectivity
– Cloudscape & DB2’s JCC (Java Common Client) teams work together

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Informix Dynamic Server (IDS)


Delivers superior application performance
for transaction intensive environments.

Target: applications built for zOS


DB2zOS
zOS Target: applications built for zOS
DB2

Target: the most challenging


V DB2&&IDS
IDS Target: the most challenging
DB2 database problems, on any size
database problems, on any size
Enterprise system
A Enterprise system
L
U DB2&&IDS
DB2 IDS Target: 2-4 way mid-level systems,
Target: 2-4 way mid-level systems,
Workgroup requiring advanced high availability
E Workgroup requiring advanced high availability

$
DB2&&IDS
IDS Target: Entry-level 2-way systems,
DB2 Target: Entry-level 2-way systems,
requiring base database capability
Express requiring base database capability
Express

Entry Mid-Level Any Size

Product Flexibility
Increasing Capability, Performance, Scalability & Control
DB2 Fundamentals © 2005 IBM Corporation
DB2 Information Management Software

Business Intelligence: Adding Insight to Information


…CRM…Financial Management…Work Force Analysis…Procurement Analysis…

Analysis
Analysis
Transactions Applications
Applications

Legacy Warehouse
Systems Access &
Transformation Portals
Portals&&
Dashboards
Dashboards
Processes
Data Marts
Financials

Real-time Analysis
Analysis
Information Tools
Tools
+++

Diverse Information Real-time Analysis User Tools


DB2 Fundamentals © 2005 IBM Corporation
DB2 Information Management Software

Enterprise Content Management


Invoices, Financial and
Tax Statements

Orders,
Confirmations

Instant messages,
e-mail @
Customer/
Business
Supplier
Records Content Wireless
Business & PDA
Content
Customer Create
Correspondence, Search Kiosk
Reports Store
Manage
Distribute
Retain
Photos, Videos, Portal /
Audio (Phone Browser
Conversations)

Web Content Call Center

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

What is Enterprise Information Integration?


Enterprise information integration refers to a category of
middleware which lets applications access data as though it were in
a single database, whether or not it is.
Any data -- Multiple access paradigms -- Multiple integration disciplines
Search SQL XQuery Content

Find Federate Transform Place Publish

Data and Content Access

Metadata Management

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Agenda
 Pregled IBM Information Management programske opreme
 Arhitektura DB2 in objekti v bazi
 Orodja za delo z DB2
 Integracija informacij

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

DB2 Architecture
Hardware Server
DBMS Instance DBMS 2

DBM Cfg
DBM Cfg

DB Cfg System DB Cfg System


Catalog Log Catalog
Log Database
Database
DB Cfg System
Log Catalog
DB Cfg System Database
Catalog
Log DB Cfg System
Database Log Catalog
Database

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Instance & Database


 A DB2 instance is an independent DB2 server "engine"
– It executes the SQL to update/insert/delete data, controls data access, etc.
– A DB2 instance is an environment where you store data and run applications.
– You may want to have more than one instance
– For example,
– Development
– Production
 A DB2 DATABASE is a self contained environment which is part of
a DB2 instance
– The database is able to store data and has it’s own control objects (called catalog)
that provide the metadata of the defined objects.
– One instance can contain multiple databases

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

DB2 Database Architecture

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

DB2 Storage Objects


 Tables, indexes, and catalogs reside in table spaces
 A table space consists of one or more containers
 A container is a file or (raw) device name and is assigned to a
table space
 A bufferpool caches the data in memory
 A table space is assigned to a bufferpool and a given
bufferpool can have multiple table spaces assigned to it

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Bufferpools

 The bufferpool is an essential element in managing database


performance
 By default each database has one bufferpool
– Database can have multiple bufferpools
 Each different page size requires a supporting bufferpool
 Each tablespace is assigned to a specific bufferpool

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Tablespaces

 DB2 supports two different types of tablespace


– System Managed (SMS)
– Database Managed (DMS)
 Consist of containers which map to physical storage
Page size for tablespaces may vary from 4K (default) to 32K
By default all new objects are created in the user tablespace
Most installations require a greater degree of control over physical
placement
Consider performance aspects including
Number of containers
Prefetch size

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

SMS Tablespace
Create regular tablespace TS00003
U managed by system
using ('c:\U\Databases\F1DB\SMS\’)
extentsize 16
Databases
prefetchsize 16

F1DB
SQL00001.DAT 4KB
SMS SQL00002.DAT 56KB
SQL00002.INX 16KB
SQL00003.DAT 4KB

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

SMS Tablespaces - Characteristics


 New containers cannot be added after an SMS table space has
been created
 Size of a container is the amount of disk space available to it
 Space is not pre-allocated - allocated on-demand (one page at a
time by default)
 SMS tablespaces can take advantage of OS file system caching
and pre-fetching
 The different objects associated with a table are stored in their
own separate files and the names of these files are determined by
the object ID and the object type

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

DMS Tablespace
Create regular tablespace TS00004
managed by database
using (file
U ‘c:\U\Databases\F1DB\Dev1\TS00004A’ 2048
,file
Databases ‘c:\U\Databases\F1DB\Dev2\TS00004B’ 2048)
extentsize 16
prefetchsize 16
F1DB bufferpool BP4KLG1

Dev1 TS00004A 8,192KB

Dev2 TS00004B 8,192KB

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

DMS Tablespaces - Characteristics


 DMS table space containers are file system files or raw devices
 New containers can be added or existing ones extended
 All space is pre-allocated at container creation/extension time.
 Table, index, and long objects can be in separate table spaces
for a table
 Space allocation is done a full extent at a time, and striping is
done at the extent level

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Tables

 Tables present data as a series of rows and columns


 Data held in tables has no inherent order
 Tables may be persistent or temporary
 Create table statement has an extensive range of options
– Simplest form defines table name and column specifications
 Create table statement also determines where indexes are
created
 Can model new tables on existing tables using the like clause

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Create Table Example

CREATE TABLE DRIVER


(DRIVER_ID INTEGER NOT NULL,
SURNAME VARCHAR(50),
FIRSTNAME VARCHAR(50),
DATE_OF_BIRTH DATE ,
GENDER CHAR(1) NOT NULL WITH DEFAULT ‘M’
CHECK (GENDER IN (‘M’,’F’),
NATIONALITY CHAR(15)
)
IN TS00004
INDEX IN TS00005
;
DB2 Fundamentals © 2005 IBM Corporation
DB2 Information Management Software

Table and Tablespaces


CREATE TABLE F1TEAM
(TEAM_ID INTEGER NOT NULL,
TEAM_NAME VARCHAR(50),
TEAM_PRINCIPAL_ID SMALLINT,
HQ_CITY CHAR(15),
COUNTRY CHAR(15)
)

F1TEAM
TEAM_
TEAM_ HQ_
TEAM_ID PRINCIPAL COUNTRY
NAME CITY
_ID

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Indexes
 Indexes provide more efficient access to rows in a table
 Constructed using columns from the related table
 Index keys are maintained in order
– The index may be used to influence order within the data pages
 Indexes can be used to enforce uniqueness
CREATE INDEX DRIVERPKI
ON DRIVER
(DRIVER_ID ASC)

 Physical characteristics inherited from the tablespace

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Columns
 Atomic unit of data
 Datatype specified at this level
 Constraints can be applied to restrict values
 Nullability specified for columns
 Data values can be supplied, generated internally or specified
defaults
Datatype Minimum Value Maximum Value Example

SMALLINT -32.768 32.767 12


INTEGER -2.147.483.648 2.147.483.647 39.892
BIGINT -9,22337E+18 9,22337E+18 7.894.273.932
FLOAT -1.79769E+308 1.79769E+308 2,17E+17
DECIMAL (precision of 31) (precision of 31) 49,99
CHARACTER 1 254 Robert
VARCHAR 1 32.672 Robert
DATE 0001-01-01 9999-12-31 1999-12-31
TIME 0:00:00 24:00:00 11:59:03
TIMESTAMP 0001-01-01-00.00.00.000000 9999-12-31-24.00.00.000000 -
CLOB - 2GB Chapter
BLOB - 2GB Video

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Database Structure

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Constraints

 Used to restrict the data values for a column


 Automatically applied at Insert and Update
 Can include range checks, list checks and other rules
 Constraint defined as a formula which must resolve to ‘true’

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Triggers

 A trigger defines a set of actions (business logic) that are


activated or triggered by an modification operation on a
specified base table
 Fired on Insert, Update or Delete
 A trigger can be fired BEFORE or AFTER an event
 May reference other tables
 Actions may
– cause other changes to the database
– Run UDF or Stored Procedure

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Triggers

 Example:
– We want to maintain the driver_standing table as results are
posted for each race

RACE DRIVER
RESULT STANDING

• Season • Season
• Race identifier • Driver identifier
• Driver identifier • Points total
• Position
• Points

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Triggers
Sample Code
We are interested in
capturing the event
CREATE TRIGGER POINTSUMI when a race result is
AFTER INSERT ON RACE_RESULT posted to the database
REFERENCING NEW AS N
FOR EACH ROW MODE DB2SQL
UPDATE DRIVER_STANDING D
SET POINTS_TOTAL = POINTS_TOTAL + N.POINTS
WHERE D.SEASON = N.SEASON
AND D.DRIVER_ID = N.DRIVER_ID
;

And make sure we only


Update the other table update the points for the
right driver and season

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Stored Procedures
 Business logic can be encapsulated in Stored Procedures (SP)
 SPs can be written in C, Java, COBOL, OLE, and SQL
 Execute on the DB2 server -> reducing network traffic
 Effective way of modularising code
 Centralized administration and maintenance
 Registered in the System Catalog and manipulated using SQL
commands

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

UDF (User Defined Functions)


 Provides the ability to add application logic to the database
– Function can be applied inside or outside the database
 Functions are called through SQL and are therefore reusable by all
authorized users, regardless of the interface
– IBM ships a lot of additional UDF’s through the Extender functionality
 The UDF can be either Scalar or Table
– Scalar functions return a value based on the input and the internal
processing.
– Table functions have the ability to return many rows and many columns in a
single invocation.
 The UDF has the ability to use non-DB2 resources such as OLEDB,
MQ series, or any kind of resource that is accessible from the
application you decide to use for the function
 The Development center provides assistance for building UDF
DB2 Fundamentals © 2005 IBM Corporation
DB2 Information Management Software

UDF
Sample:

create function multiply(i int, j int)


returns int
language sql contains sql
return( i * j );

values multiply(2,3);

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

UDF
Sample:

CREATE FUNCTION OLEDBRegion ()


RETURNS TABLE ("REGIONID" INTEGER,
REGIONDESCRIPTION" VARCHAR(50))
LANGUAGE OLEDB
EXTERNAL NAME '!dbo.Region!Provider=SQLOLEDB; Data
Source=dms-vm01; Initial Catalog=Northwind; User ID=sa;
Password=password;'

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

UDF: MQSeries Integration


 MQSeries provides a set of User Defined Functions and Stored
Procedures that will allow seamless messaging and database
access
 Functions facilitate sending, receiving and reading of data that
are contained in messages processed by the MQSeries Queues
 MQSeries Example
SQL can be used to manipulate MQSeries Queues
SELECT MQSend(EmpName) FROM employee;
SELECT MQSend(EmpName || ‘ ‘ || Dept) FROM employee
WHERE edlevel >= 18;
VALUES MQReceive();
SELECT * FROM TABLE (MQReceiveAll()) t

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

UDF & Web Servises

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

XML

 XML Extender provides the ability to


–store and access XML documents in tables
–generate XML documents from existing relational
data
–insert rows into relational tables from XML
documents
 XML Extender provides data types, functions,
and stored procedures to manage your XML
data in DB2 UDB )
 XML Extender is integrated part of DB2 V8.1
and above

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

XML Support – next version


 Native XML Document Storage & RDB
Integration
– New XML engine and datastore “I see a rich XML repository "I see a rich RDBMS
that also supports SQL!" that also supports XML!"
– DB2 will get a dual database engine to
deal with XML more efficiently
 Integrates access using XQuery, SQL …or
both
 Native storage leverages mature DBMS
services
– Backup / Recovery, Security
– Performance, Scale, Platform coverage
– Transaction Support (ACID), Views
– Administrative Skills, Privileges/Security
+++

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Agenda
 Pregled IBM Information Management programske opreme
 Arhitektura DB2 in objekti v bazi
 Orodja za delo z DB2
 Integracija informacij

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Accessing UDB from the Desktop

Command Line GUI Application Information

Information
Command Line Control Center APIs
Center
Processor
Command Editor Embedded SQL
Help
Task Center Call Level Interface

Journal Java

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Command Line Example

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

GUI Tools

 The UDB GUI tools are designed to support day to day


administration
 We will look at
– Control Center
– Command Editor
– Task Center
– Journal
 Other tools are available

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Control Center

 GUI management of UDB databases


 Uses familiar ‘Wintel’ look and feel
 Used for common administrative tasks
 Provides links to other GUI tools

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Control Center

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Command Editor
 Run SQL statements interactively and review output
 Scrollable results area allows simple analysis of results
 Command history maintained automatically
 Options to enable ‘auto commit’
 Alternative to CLP

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Command Editor

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Task Center
 Uses DB2’s notification ability to run other tasks, send
a pager or email
 Task can be run on any partition regardless of the
current partition you are connected to
 Tasks can be chained and grouped
 Manages execution of pre-written UDB scripts
 Allows scripts to be run now or scheduled to run at
pre-determined time
 Links into Journal to view results
 Can be useful for managing frequently used queries

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Task Center

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Journal

 Task History page


– Shows the task history records for each of the available scheduler systems.
 Database History page
– Shows the database recovery history records for each of the available
databases.
 Messages page
– Shows the message records issued by the DB2 administration tools on the
local system.
 Notification Log page
– Shows the notification log records for the selected instance.

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Journal – Database History

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Information Center
 Online or local HTML manuals for DB2
 Extended search capabilities
 Presents books in a browser window
 Includes task-oriented guidance and command-level
shortcuts
 Links direct to web resources

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Information Center

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Development Center

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Development Center
 MQSeries table function Wizard
– Creates table functions that allow you to read or write from a
MQSeries Queue using regular SQL. This function is invoked
from the stored procedure builder.

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Development Center
 OLE DB table function Wizard
Creates table functions that allow you interact with OLE DB
providers. This function is invoked from the stored procedure
builder.

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

DB2 Wizards

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Backup and Recovery

Policy Based Recovery

 Based on
– Amount of outstanding updates / log data
– Costed and/or historical rollforward speed
– Available storage resources
 Policy specifies
– Backup location
– Criteria for determining when a backup is required
– Maximum time between backups
– Maximum log space used between backups

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Performance Tuning and Management


Self-configuring Autonomic Capabilities

 Configuration Advisor
 Design Advisor

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Performance Tuning and Management


Configuration Advisor
 Tune your database in few seconds
 Automatic hardware characteristic detection
 User description of basic operational questions
 Combined with mathematical model of each configuration parameter, based on
expert heuristics.

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Design Advisor
 Goals
–Select a database design that provides the best workload average
response time.
–Ease of use
 Given
–A workload (user provided or system detected)
–System detected database characteristics
–System detected system characteristics
–Disk constraints (optional)
 Design Advisor includes
–Index selection
–Materialized Query Tables selection (MQT)
–Multidimensional Clustering selection (MDC)
–Partitioning selection (Partitioning Advisor)
–Industry leading sampling (statistics, column correlations)

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Self Management - Health Center


 Graphical interface that shows the overall state of the database environment and
all current alerts.
 Provides a central location to view the roll-up alert status of all instances and their
databases catalogued on the client
 Management-by-exception tool
–only health indicators in alert state are viewable
 Recommendation advisor
–Provides questions, when applicable, to help narrow down recommendation options

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Application Tuning
Activity Monitor
 Real-time application monitoring based on application performance issues
 Uses snapshot monitor to provide sorted reports on applications (eg.
Highest CPU usage, Longest time spent on locks)

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Agenda
 Pregled IBM Information Management programske opreme
 Arhitektura DB2 in objekti v bazi
 Orodja za delo z DB2
 Integracija informacij

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

What is Enterprise Information Integration


Enterprise information integration refers to a category of
middleware which lets applications access data as though it were in
a single database, whether or not it is.
Any data -- Multiple access paradigms -- Multiple integration disciplines
Search SQL XQuery Content

Find Federate Transform Place Publish

Data and Content Access

Metadata Management

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Information Integration
 Federation
featuring WebSphere Information Integrator Content Edition for
unstructured content and WebSphere Information Integrator
Standard Edition for structured data accesses and integrates
diverse and distributed stores in real time, regardless of where
they reside.
 Replication
distributes, consolidates, and synchronizes information across
complex, mulit-platform, multi-vendor IT environments.
 Enterprise Search
featuring WebSphere Information Integrator OmniFind Edition,
finds the most relevant corporate information with sub-second
response from vast enterprise data sources.
 Event Publishing
captures database changes, formats them into XML messages,
and publishes them for application integration.

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Federation
Access diverse and distributed information as if it were in one system

Single sign on – Unified views – Common language –


Web services or Java API Query and update – Optimized access
SQL

SQL Content

Mainframe Mainframe Relational XML Packaged Web Collaboration Content Workflow


databases files databases Web services applications Other Systems Repositories systems
and
Imaging Systems

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Integrating Mainframe Data


 Read from and write to mainframe data sources using SQL

 Standards-based access via ODBC, JDBC, or Call Level Interface

 Multi-threaded with native drivers for scalable performance

 Metadata-driven means:
– No mainframe programming required DB2 Information Integrator
– Fast installation & configuration Classic Federation for z/OS
– Ease of maintenance

 Works with existing and new:


– Mainframe infrastructure
DB2 UDB VSAM IMS Software AG CA CA
– Application infrastructure for z/OS Adabas Datacom IDMS

– Toolsets

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Federated Sources SQL

SQL Content

Mainframe Mainframe Relational XML Packaged Web Collaboration Content Workflow


databases files databases Web services applications Other Systems & Imaging systems

IMS VSAM DB2 UDB WebSphere BI OLE DB Lotus Notes DB2 CM WebSphere
Adabas Sequential Informix Adaptors Excel Microsoft Index Family FileNet
CA-Datacom Oracle SAP Flat files Server Domino.doc
CA-IDMS Sybase PeopleSoft IBM Lotus IBM Lotus Documentum
Teradata Siebel Extended Extended FileNet
Microsoft Search Search Open Text
SQL Server Web Sametime Stellent
ODBC search QuickPlace Interwoven
 LDAP Microsoft Hummingbird
Custom-built Exchange

Plus partner tools and custom-built connectors extend access to more sources

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Replication
Manage placement for performance and availability

Oracle DB2 DB2 DB2

Microsoft Microsoft
DB2

SQL Replication Q Replication


 Flexible scheduling, transformation,  Low latency, replica management
distribution
 Each message represents a transaction
 Typically used for business intelligence,
distribution and consolidation,  XML format option for publishing
application integration  Next versions will bring hererogenous Q
Replication

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

SQL Replication

Admin
IMS DB2
DB2
Log based Staging tables
CD
Control
Sybase Control
CD
Oracle SQL Sybase
Server
Capture CD Apply
Federation Oracle SQL
Informix Engine
Server
Informix
Trigger based Teradata

Any  Flexible topologies and scheduling


source Nicknames
choices
External application  Transformations in-line
 Scales well to reach multiple targets
 Homogeneous & heterogeneous sources
and targets
DB2 Fundamentals © 2005 IBM Corporation
DB2 Information Management Software

DB2 to DB2 Q Replication

Control
Control

Source Capture Apply


Federation Target
Engine

Log based
WebSphere MQ

Usage Function
 High availability  Low latency, replica management
 Workload distribution  Each message represents a transaction
 Application integration  XML format option for publishing
 Highly parallel apply process
 Differentiated conflict detection and resolution
 Staged availability of heterogeneous support
 Next versions will bring hererogenous Q Replication

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Differentiating SQL Vs Q-Replication


 SQL Replication
– Homogeneous Replication
– Replication between DB2 – DB2 on z/OS, iSeries, Unix, Linux, Windows
– Heterogeneous Replication
– Replication between any RDBMS data sources (Informix IDS, Oracle, Sybase, MS
SQL Server, Informix XPS (target only), Teradata (target only) and certain ODBC
sources) involving a set of supported hardware platforms
– Fan out to large number of targets
 Q-Replication
– Homogeneous Replication
– Replication between DB2 – DB2 on zOS, Unix, Linux, Windows (No iSeries at the
moment)
– Heterogeneous Replication – future plan
– High volume, low latency replication
– Large number of tables (e.g. PeopleSoft)
– Multi-site update scenarios
– Ability to publish data transactions as XML messages

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Publishing data events to facilitate business integration

Capture database changes as XML messages and publish them to


WebSphere MQ

Usage Function
 Application to application messaging  Publish events to a message queue
 Event streaming  XML self-describing format
 Source for ETL tool  Wizard-driven configuration

DB2 UDB
Log-based WebSphere
capture Business Integration

IMS WebSphere MQ
DB2 II User Application
Integrator Broker
Capture

VSAM WebSphere MQ JMS-aware


Application

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

WebSphere Information Integrator Content Edition 8.2


Lets you work with content from multiple, disparate content
sources as if it were stored in one unified system
 Single interface to multiple content sources
and workflow systems
 Exposes all underlying functionality and
adds federation services
Content

 Development components and APIs for


building custom applications
 Fully J2EE compliant service-oriented
architecture (SOA) - Supports WebSphere
and BEA WebLogic app servers
 SOAP interface for web services Web Collaboration Content Workflow
Other Systems Repositories systems
applications and
Imaging Systems

DB2 Fundamentals © 2005 IBM Corporation


DB2 Information Management Software

Enterprise Search
IBM DB2 II OmniFind Edition
Power intranets, extranets, and corporate portals

 Delivers the best results with sub-second response


Sophisticated relevancy algorithms for corporate content
 Scales for large collections or enterprises
5 M indexed documents and above
1000s of concurrent users
 Fits easily into enterprise applications
Java APIs
Document level security
 Eases administration and maintenance
Analysis features all under-the-covers

HTTP/HTTPS, News groups (NNTP), File systems, DB2 UDB, Informix, Oracle,
Domino databases, Microsoft Exchange, DB2 Content Manager,
Documentum and FileNet via integrated WebSphere II Content Edition
DB2 Fundamentals © 2005 IBM Corporation
DB2 Information Management Software

Enterprise-wide Access
SQL, Content, or Search APIs

II OmniFind DB2 Family

DB2 UDB
II Event
Information Integrator Sybase
VSAM Publishing
O SQL, SQL/XML
IMS II Classic D
B Federation Engine Informix
Federation
C Wrappers and functions
Software AG
Adabas
SQL Server

II Content
CA-Datacom
Edition
Oracle
CA-IDMS

Others Open Text Documentum Teradata

IBM Extended
Search

WebSphere
DB2 Content Text XML Excel WWW, email,…
Stellent FileNet MQ ODBC
Manager
DB2 Fundamentals © 2005 IBM Corporation
DB2 Information Management Software

Vprašanja?

Hvala!
 www.ibm.com/db2
 klemen.kobilica@si.ibm.com
DB2 Fundamentals © 2005 IBM Corporation

Vous aimerez peut-être aussi