upgrading to db2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20upgrading to db2 9.5 for linux,...

67
© 2010 IBM Corporation May 20, 2010 Upgrading to DB2 9.5 for Linux, UNIX, and Windows Bob Harbus Worldwide DB2 Evangelist Team – IBM Toronto Lab

Upload: ngokien

Post on 11-May-2018

234 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM CorporationMay 20, 2010

Upgrading to DB2 9.5 for Linux, UNIX, and Windows

Bob HarbusWorldwide DB2 Evangelist Team – IBM Toronto Lab

Page 2: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation2

Agenda

Recommended reading

Overview of the upgrade process

Upgrading a data server– 3 stages of successful upgrades

Considerations– DB2 Connect– Clients– Applications and routines

Best practices

Additional Material

Page 3: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation3

Recommended Reading

DB2 Migration Portal– One-stop-shop for essential information– http://www.ibm.com/software/data/db2/upgrade/portal

DB2 Upgrade Home Page– Links to webcasts, videos, wikis, etc.– http://www.ibm.com/software/data/db2/upgrade

DB2 9.5 Migration Guide– Comprehensive, step-by-step documentation– Available in DB2 Information Centerhttp://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.qb.migration.doc/doc/c0023662.html

– Downloadable PDFhttp://www-1.ibm.com/support/docview.wss?rs=71&uid=swg27009727

Page 4: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation4

Recommended Reading (cont.)

DB2 9.5 What’s New– Outlines new and changed functionality– Available in the DB2 Information Centerhttp://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.wn.doc/doc/r0051514.html

– Downloadable PDFhttp://www-1.ibm.com/support/docview.wss?rs=71&uid=swg27009727

Estimating database upgrade time and disk space requirementshttp://www-1.ibm.com/support/docview.wss?rs=71&uid=swg21255249

Page 5: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation5

Upgrading to DB2 9.5

DB2 9.5 is the next-generation hybrid data server– Optimized management of XML and relational data

Upgrading not required when installing fixpacks

Applications and routines may require changes (rare)

OptionalClient

Yes, instance & databaseData Server

Upgrade Required?Upgrade Required?ComponentComponent

Page 6: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation6

DB2 9.5 Simplifies Server and Client Upgrades

Coexistence supported on all DB2 Linux, UNIX, and Windows operating platforms– Install multiple DB2 server and client versions– Upgrading is no longer forced onto Windows users

Install provides migrate option– Windows only– Automatically upgrades existing DB2 UDB V8 instances and DAS– Database upgrade still required

Page 7: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation7

Benefits of Coexistence

Each installation can be serviced independently

Enables the creation of upgrade test environment

Provides fallback capability– Instead of upgrading, do a backup and restore– DB2 UDB V8 instance and database remains intact and unaltered– Note: You can restore a backup of a 32-bit DB2 UDB V8 database into

a 64-bit DB2 9.5 instance• Endianness (byte order) must match on Linux/UNIX

Page 8: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation8

Operating System Support

For most recent detailed requirements seehttp://www.ibm.com/software/data/db2/9/sysreqs.html and http://tinyurl.com/r4qcay

All Intel and AMD processors capable of running the supported Windows operating systems

XP Professional Vista Ultimate/Business/EnterpriseServer 2003 Standard/Enterprise/DatacenterServer 2008 Standard/Enterprise/Datacenter(32-bit and 64-bit)

Windows

UltraSPARCSolaris x64 (Intel 64 or AMD64)

Solaris 9Solaris 10(64-bit kernel required)

Solaris

x86, 32-bit Intel & AMD processorsx64, 64-bit AMD64 & Intel EM64TPOWEReServer System z, System z9, or System z10

Red Hat Enterprise Linux 4 Update 4Red Hat Enterprise Linux 5SUSE Linux Enterprise Server 9 SP3SUSE Linux Enterprise Server 10 SP1

Linux

Itanium based HP IntegritySeries Systems

HP-UX 11iv2 (11.23.0505)HP-UX 11iv3 (11.31)

HP-UX

POWER3 processors and higherAIX Version 5.3 TL6 SP2 + APAR IZ03063AIX Version 6.1(64-bit kernel required)

AIX

HardwareHardwareSoftwareSoftwareOSOS

Specific OS patches are also in requirements, review and apply these prior to installing new release!

Page 9: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM CorporationMay 20, 2010

Let’s Upgrade to DB2 9.5

Page 10: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation10

Data Server Upgrade (in 1 Page)

Install DB2 9.5Perform pre-migration tasksVerify the databases using the db2ckmig tool– db2ckmig tool (run on all partitions in data partitioned environments)

Database upgrade does not alter your data– Converts system catalog format, modifies select disk structures

For all the details– http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.qb.migration.doc/doc/c0011933.html

Create DB2 9.5 instance (db2icrt)

Restore database offline backup (RESTORE DATABASE command)

Upgrade instance (db2imigr)

Upgrade databases (MIGRATE DATABASE command)

Side-by-Side UpgradeSide-by-Side UpgradeIn-Place UpgradeIn-Place Upgrade

Page 11: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation11

Follow the Path

Recommendation– Upgrade to latest

available DB2 9.5 fixpack

Upgrade from any version of DB2 UDB V8.x or DB2 9

Pre-DB2 UDB V8.1 must upgrade to DB2 UDB V8.2.2 firstDB2 9.5

DB2 9.1 DB2 UDB V8.x

Page 12: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation12

Upgrade Hiccups

DB2 UDB V8 APAR IY85495– Database configuration reports incorrect rollforward pending state (fixed

in FP14)• db2ckmig will report an error

AIX DNS lookup may cause commands to hang– DB2 supports IPv4 and IPv6 as of DB2 9– db2icrt, db2start, db2stop commands appear to hang– Double-check hosts setting in /etc/netsvc.conf – Technote # 1258661, APAR # IZ09585http://www-1.ibm.com/support/docview.wss?rs=0&q1=1258661&uid=swg21258661&loc=en_US&cs=utf-8&cc=us&lang=en

Page 13: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation13

Changes in DB2 9.5

The following pages highlight some changes in– Process and memory model– Configuration parameters– Registry and environment variables– Behaviour

More details in Migration Guidehttp://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.qb.migration.doc/doc/r0022380.html

Refer to “What’s New” documentation in the online (or local!) Information Centre

Page 14: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation14

Multi-threaded Architecture on Linux and UNIX

Benefits– Simplified and more dynamic configuration

• Self-Tuning Memory Manager (STMM) database memory tuning now available on all platforms

– Streamlined problem determination – Improved performance– Less system and memory resources

Fewer DB2 server processes– Modify scripts to replace ps with db2pd –edus– More detailshttp://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.wn.doc/doc/i0052646.html

Unfenced routines, unfenced wrapper libraries, and security plug-ins must be thread-safe

Page 15: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation15

Database Manager Memory (instance_memory)

DB2 9.5 Simplified Memory Model

Agent Private Memory

Per Database Memory

Database Global Memory(database_memory)

Buffer pools, database heap, utility heap, lock list, etc.

Application Global Memory(appl_memory)

Application heap, statement heap, etc.

DBMS Shared Memory

Page 16: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation16

Instance Configuration Changes (DB2 9.5)

Changes under new memory model

New behavior for instance_memory– Max. memory that a single database partition can allocate– Max. increased to 256 TB (64-bit platforms)– New value is AUTOMATIC, approx 75-95% of physical RAM

mon_heap_sz changes to AUTOMATIC

If max_coordagents was “-1”– Upgrade changes it to the value of maxagents

If num_poolagents was “-1”– Upgrade changes it to the value of maxagents

Page 17: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation17

Instance Configuration Changes (DB2 9.5) (cont.)

Default for new instance is AUTOMATIC for– fenced_pool, max_connections, mon_heap_sz,

and num_poolagents

New maximum values– max_coordagents, num_initagents, and num_initfenced (64K)– federated_async (32K)

Deprecated– agentpri, maxagents, maxcagents, and query_heap_sz

Discontinued– priv_mem_thresh

Page 18: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation18

Instance Configuration Changes (DB2 9)

Fast Communication Manager (FCM) – Performs inter-partition communication in DPF– Re-architected to enhance performance and simplify tuning

New fcm_num_channels parameter– Replaces the following deprecated parameters

• fcm_num_rqb• fcm_num_anchors• fcm_num_connect

– Upgrade calculates a new value to approximate the previous configuration

Page 19: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation19

Database Configuration Changes (DB2 9.5)

New behavior applheapsz– Max memory that can be consumed per application– Bound by appl_memory (db) or instance_memory (db partition)– New value is AUTOMATIC

New behavior maxfilop– Max file handles that can be concurrently open for each database– New value is

AIX, HP, Sun 61,440Linux 30,720 (32-bit) 61,440 (64-bit)Windows 32,768 (32-bit) 65,335 (64-bit)

dbheap changes to AUTOMATIC

stat_heap_sz changes to AUTOMATIC

Page 20: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation20

Database Configuration Changes (DB2 9.5) (cont.)

New parameter appl_memory – Max memory that can be allocated by all agents to service all

applications requests– Bound by instance_memory (db partition)– Default value is AUTOMATIC

New database default value is now AUTOMATIC– applheapsz– dbheap– stat_heap_sz– stmtheap

Page 21: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation21

Deprecated– app_ctl_heap_sz, appgroup_mem_sz, and groupheap_ratio

replaced by appl_memory– logretain and userexit replaced by logarchmeth1– Numsegs

Discontinued– estore_seg_sz and num_estore_segs

Database Configuration Changes (DB2 9.5) (cont.)

Page 22: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation22

Database Configuration Changes (DB2 9)

Parameter values that change during upgrade– database_memory – New name, same DB2 UDB V8 behavior

• DB2 UDB V8’s AUTOMATIC becomes COMPUTED in DB2 9– dyn_query_mgmt – Query Patroller

• If ENABLE, upgrade changes to DISABLE• Re-enable once Query Patroller is installed

Parameters with new default values– auto_maint, auto_tbl_maint, and auto_runstats – ON– avg_appls, fcm_num_buffers, num_iocleaners, and num_ioservers – AUTOMATIC

– Upgrade retains the original DB2 UDB V8 settings

Page 23: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation23

Database Configuration Changes (DB2 9) (cont.)

New Self-Tuning Memory Management feature– Disabled in upgraded database– Controlled by the self_tuning_mem parameter– Following parameters support AUTOMATIC setting

• database_memory• sheapthres_shr• sortheap• pckcachesz• locklist• maxlocks

– Upgrade retains the original settings the above parameters

Page 24: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation24

Registry and Environment Variable Changes

DeprecatedDB2_ALLOCATION_SIZE

DeprecatedDB2MEMMAXFREE

DeprecatedDB2_FORCE_FCM_BP

ONLINE_BACKUP_IOPRIORITYsetting is discontinuedDB2_EXTENDED_IO_FEATURES

ONOFFDB2_COLLECT_TS_REC_INFO

IBM Data Server Driver for JDBC and

SQLJ Legacy JDBC type 2

driverDB2_USE_DB2JCCT2_JROUTINE

IMMEDIATEOFF (DB2 UDB V8)ON (DB2 9)DB2_MDC_ROLLOUT

New DefaultNew DefaultOld DefaultOld DefaultVariable NameVariable Name

Page 25: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation25

Registry and Environment Variable Changes (cont.)

Instance profile registry variables are upgraded and retain the original settings

Global profile registry variables set by the user are not automatically upgraded

Complete lists– Changedhttp://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.wn.doc/doc/i0052034.html

– Deprecatedhttp://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.wn.doc/doc/i0052033.html

– Discontinuedhttp://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.wn.doc/doc/r0051514.html

Page 26: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation26

New Database Defaults

Automatic storage enabled– Introduced in DB2 UDB V8.2.2, simplifies storage management– To disable

• Specify AUTOMATIC STORAGE NO in CREATE DATABASE command

Concurrent I/O and Direct I/O enabled– Provides I/O performance similar to “raw” devices– To disable

• Specify FILE SYSTEM CACHING in CREATE DATABASE command

Default code page is Unicode

Page 27: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation27

New Table Space Defaults

DMS table spaces are LARGE by default– Increases the maximum table size to 16 TB– To disable

• Specify REGULAR in CREATE TABLESPACE statement

New default table space settings– Updated to reflect current disk technology– Use ALTER TABLESPACE statement to update your

upgraded databases

Concurrent I/O and Direct I/O are enabled– To disable

• Specify FILE SYSTEM CACHING in CREATE TABLESPACE statement

Page 28: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation28

Other Behavior Changes

Reverse scans enabled for new indexes, primary keys, and unique keys

Database level auditing requires SECADM authority

Backup image file mode changed to 600– Restricts read and write access to instance owner– Linux and UNIX only

Logs are included by default in the following backup scenarios– Online backup of a single-partitioned database – Online or offline single system view (SSV) backup of a

multi-partitioned database – Online or offline snapshot backup

Page 29: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation29

Additional Memory Requirements

Lock structure size changes– 32-bit: 48 bytes (was 40 bytes in DB2 UDB V8)– 64-bit HP-UX/PA-RISC: 80 bytes (was 64 bytes in DB2 UDB V8)– Increase lock list size by <= 1.7% to accommodate metadata overhead

• On 64-bit HP-UX/PA-RISC, increase by <= 2.5%

Page 30: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM CorporationMay 20, 2010

DB2 Connect 9.5 Considerations

Page 31: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation31

DB2 Connect Upgrade Considerations

If upgrading from pre DB2 Connect V8.2.2– Authentication type specified in the database directory at the DB2

Connect server overrides the authentication type catalogued at a client

– If there is no authentication type specified at a client, the default authentication is SERVER

Review all considerations in Quick Beginnings for DB2 Connect Serversftp://ftp.software.ibm.com/ps/products/db2/info/vr95/pdf/en_US/db2c6e950.pdf

Page 32: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM CorporationMay 20, 2010

IBM Data Server Client 9.5 Considerations

Page 33: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation33

Simplified DB2 Client Packages

DB2 9 Runtime ClientDB2 UDB V8 Run-Time ClientDB2 UDB V8 Run-Time Client Lite

IBM Data ServerRuntime Client 9.5

DB2 9 ClientDB2 UDB V8 Administration ClientDB2 UDB V8 App. Development Client

IBM Data ServerClient 9.5

Equivalent Client PackageEquivalent Client PackageNew PackageNew Package

Page 34: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation34

DB2 Client Upgrade Considerations

DB2 9.5 clients can connect to 32- and 64-bit servers

NetBIOS and SNA support discontinued in DB2 9– Catalog using TCP/IP or named pipes

Client upgrade is optional– Preserves the existing client configuration

Multiple client installations supported– Install the same or different versions

Page 35: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation35

Connectivity Support for Clients to DB2 9.5 Servers

DB2 9.5server

DB2 9.5server

DB2 9.5server

COMPATIBLE(Full functionality)

DB2 9.5 client

DB2 9.1 client

DB2 UDBV8.x client

COMPATIBLE(Limited to DB2 9.1 function)

COMPATIBLE(Limited to DB2 UDB V8.x function)

Page 36: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation36

Connectivity Support for DB2 9.5 Clients

DB2 9.1server

DB2 UDB V8.xserverDB2 9.5

server

DB2 9.5 client

Multiple clients can be installed on a single machine

Page 37: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation37

Connectivity Support Matrix for Clients

Limited to DB2 UDB V8.xDB2 UDB V8.x

Limited to DB2 9.1DB2 9.1Full

DB2 9.5

Limited to DB2 9.1DB2 9.1

Limited to DB2 UDB V8.xDB2 UDB V8.xDB2 9.5

FunctionalityFunctionalityDB2 Server(32- or 64-bit)DB2 Server(32- or 64-bit)

DB2 Client(32- or 64-bit)DB2 Client(32- or 64-bit)

Page 38: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM CorporationMay 20, 2010

Application Considerations

Page 39: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation39

Java and JDBC Changes

IBM Data Server Driver for JDBC and SQLJ replaces– IBM DB2 Universal JDBC Driver– IBM DB2 Driver for JDBC and SQLJ

Support for IBM Software Developer Kit for Java 5.x– AIX, Windows, Linux (x86, POWER, zSeries, and x86_64)

Two versions of IBM Data Server Driver for JDBC and SQLJ– db2jcc.jar: JDBC 3.0 and earlier– db2jcc4.jar: JDBC 4.0 and earlier

64-bit JVM is provided with 64-bit database servers

Page 40: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation40

Java and JDBC Changes (cont.)

DB2 JDBC Type 3 driver was discontinued in DB2 9– Use IBM Data Server Driver for JDBC and SQLJ (Type 4)

DB2 JDBC Type 2 driver is deprecated– Routines now use IBM Data Server Driver (Type 4) by default– To override db2set DB2_USE_DB2JCCT2_JROUTINE = OFF

More details in Migration Guide– Upgrading Java applications that use IBM Data Server Driver for JDBC

and SQLJhttp://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.qb.migration.doc/doc/t0023413.html

– Upgrading Java applications that use DB2 JDBC Type 2 driverhttp://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.qb.migration.doc/doc/t0023413.html

Page 41: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation41

SQL Administrative Views and Routines Changes

Some DB2 UDB V8 and DB2 9 administrative routines have been replaced with more comprehensive functions or views

– Complete list is available in the Information Centerhttp://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.sql.rtn.doc/doc/r0023171.html

Applications should switch the new functions or views– Versioned table functions have a _V91 or _V95 suffix– Administrative views are always based on latest table function version

ADMINTABINFOadministrative view

ADMINTABINFOadministrative view

ADMIN_GET_TAB_INFOtable function (DB2 9)

ADMIN_GET_TAB_INFOtable function (DB2 9)

DBMCFGadministrative view

DBMCFGadministrative view

GET_DBM_CONFIGtable function (DB2 UDB V8)

GET_DBM_CONFIGtable function (DB2 UDB V8)

New ViewNew ViewDeprecated FunctionDeprecated Function

Page 42: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation42

Larger Identifiers in DB2 9.5

2048254SQL path(specified by the FUNCPATH BINDoption and CURRENT PATH special register)

12830

Authorization ID (authid) ColumnGroupSchema

12818

AttributeConstraintCursorDatabase partition groupEvent monitorSpecific nameStatementTriggerUser-defined type

1288Package

New LengthNew LengthOld LengthOld LengthIdentifier NameIdentifier Name

Page 43: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation43

Using 32-bit Applications and Routines with 64-bit Instances

64-bit DB2 9.5 instances support 32-bit applications (except Linux IPF (Itanium))– 32-bit shared libraries provided

$INSTHOME/sqllib/lib$INSTHOME/sqllib/lib64$INSTHOME/sqllib/lib$INSTHOME/sqllib/lib64

64-bit64-bit64-bit64-bit

$INSTHOME/sqllib/lib$INSTHOME/sqllib/lib32$INSTHOME/sqllib/lib$INSTHOME/sqllib/lib32

64-bit(except Linux on IPF)64-bit(except Linux on IPF)

32-bit32-bit

$INSTHOME/sqllib/lib$INSTHOME/sqllib/lib32$INSTHOME/sqllib/lib$INSTHOME/sqllib/lib32

32-bit32-bit32-bit32-bit

Embedded shared library pathEmbedded shared library pathInstanceInstanceApplicationApplication

Page 44: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation44

Using 32-bit Applications and Routines with 64-bit Instances (cont.)

Restrictions on 32-bit external stored procedures and UDFs– Unfenced 32-bit external routines not supported in 64-bit– Support for default function entry points in external routine libraries is

deprecated (32-bit AIX and Windows)

32-bit SQL procedures created prior to DB2 UDB V8.2 and upgraded to 64-bit, must be dropped and re-created

http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.qb.migration.doc/doc/t0023424.html

Page 45: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation45

Best Practices

DEPLOY

VALIDATE

PLAN

Page 46: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation46

Stage 1 – Successful Planning

Review Migration Guide and What’s New

Identify dependencies and requirements

Create an inventory of impacted applications

Draft a step-by-step upgrade plan

Review with impacted stakeholders

Receive approval to move forward

Page 47: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation47

Stage 2 – Successful Validation

Establish user acceptance criteria and a test plan

Setup a test environment

Execute the upgrade plan– Perform prerequisite upgrades (hardware, OS, etc.)– Migrate the DB2 server and/or clients– Upgrade applications

Perform the validation testing

Revise the upgrade plan as necessary

Review and approve the final upgrade plan

Page 48: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation48

Stage 3 – Successful Deployment

Define and execute a system “sanity” test

Upgrade the production system (deploy)

Execute sanity test

Page 49: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation49

Summary

DB2 9.5 provides a best of breed database solution

Upgrading to DB2 9.5 is easier than ever

3-stages of a successful upgrade

Page 50: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM CorporationMay 20, 2010

Additional Material

Page 51: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM CorporationMay 20, 2010

Upgrade Related APARs

Page 52: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation52

DB2 9.1 and DB2 9.5 Upgrade Specific APARs

For the latest information on APARs relating to upgrading to DB2 9.1 from DB2 UDB V8.x please refer tohttp://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21271974

For the latest information on APARs relating to upgrading to DB2 9.5 from DB2 UDB V8.x or DB2 9.1, please refer tohttp://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21287543

Page 53: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM CorporationMay 20, 2010

Additional Upgrade Resources and Information

Page 54: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation54

Additional DB2 9.5 Resources

Information Centerhttp://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp

Documentation in PDF formathttp://www-1.ibm.com/support/docview.wss?rs=71&uid=swg27009727

Product Supporthttp://www.ibm.com/software/data/db2/udb/support/index.html

developerWorks Forumhttp://www.ibm.com/developerworks/forums/forum.jspa?forumID=842

Page 55: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation55

The Upgrade Process

Page 56: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation56

DB2 9 Successful Customer Upgrades

“Upgrade to DB2 9 is very very simple, only 35-40 minutes. It’s a ‘no brainer’ folks; do it!”

DB2 LUW customer presentation,Information on Demand 2007 conference

TelecommunicationsRetailFinancial ServicesInsuranceHealth Care

Page 57: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation57

DB2 9 Successful SAP Customer Upgrade

INTER Versicherungen

INTER upgraded its SAP DB2 environment to IBM DB2 9 on its existing IBM System p 650 platform. The company has exploited new features of DB2 9 like self-tuning memory management (STMM) and data compression technologies, which are fully supported by the SAP software

Public customer case study

http://www-306.ibm.com/software/success/cssdb.nsf/CS/STRD6Z2KE3?OpenDocument&Site=gicss67sap&cty=en_us

Page 58: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM CorporationMay 20, 2010

Enabling New Features

Page 59: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation59

Enabling New Features

Converting an existing tablespace to large record identifiers (RIDs)

Enabling data row compression on an existing table

Enabling the Self-Tuning Memory Manager

Converting a Union All View to a data partitioned table

Page 60: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation60

Converting to Large Record Identifiers (RIDs)

Convert DMS table spaces only using– ALTER TABLESPACE … CONVERT TO LARGE– COMMIT

Increase the table space’s storage capacity – If auto-resize enabled, increase the MAXSIZE attribute – Otherwise

• Enable auto-resize (ALTER TABLESPACE … AUTORESIZE YES) or• Add more storage (add stripe set, extend container, etc.)

Increase log space, memory, and system temporary table space

– http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.rn.doc/doc/c0023929.htm

Page 61: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation61

Converting to Large Record Identifiers (RIDs) (cont.)

To support large RIDs, indexes on tables in a converted table space must be reorganized or rebuilt – Use REORG INDEXES ALL (without CLEANUP ONLY)

• Specify ALLOW NO ACCESS option for partitioned tables

To support >255 rows per page, tables must be reorganized– Cannot use INPLACE– Reorganization will rebuild all indexes

• Automatically converts Type 1 indexes to Type 2– Use RUNSTATS after reorganizing the tables

Page 62: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation62

Convert Type-1 Indexes to Type-2 Indexes in Upgraded Databases

Convert type-1 indexes to take advantage of type-2 index benefits– Improved concurrency – Online table reorganization and online table load commands can be

used against the table– XML columns allowed only on tables with type-2 indexes

Type-1 indexes are deprecated since DB2 9.1; you should convert them before they are no longer supported

Further details can be found here http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.qb.migration.doc/doc/t0050553.html

Page 63: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation63

Enabling Data Row Compression

ALTER TABLE … COMPRESS YES

Use INSPECT command to estimate the compression savings

Ways to build the compression dictionary– INSPECT ROWCOMPESTIMATE always builds the dictionary

• It is only inserted into the table if compression is enabled– Offline REORG TABLE builds the dictionary and compresses the

existing data

Page 64: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation64

Enabling Data Row Compression (cont.)

Time saving alternatives to performing a table reorg on a large table

Do not forget automatic dictionary creation too!

• Unload the existing data• Load a small representative data

set• Enable compression on

the table• Reorg the table to build the

dictionary and compress the small data set

• Load the remaining data

• Unload the existing data• Load a small representative data

set• Enable compression on

the table• Reorg the table to build the

dictionary and compress the small data set

• Load the remaining data

• Enable compression on the table• Use INSPECT ROWCOMPESTIMATE to

build the dictionary• Unload the existing data• Reload the data

• Enable compression on the table• Use INSPECT ROWCOMPESTIMATE to

build the dictionary• Unload the existing data• Reload the data

Alternative #2 – Small data setAlternative #2 – Small data setAlternative #1 – Unload & reloadAlternative #1 – Unload & reload

Page 65: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation65

Enabling the Self-Tuning Memory Manager

STMM trades memory between different memory areas– Two or more areas must be “tunable”– An area is tunable if the configuration parameter is AUTOMATIC

• To tune the buffer pool, its size must be set to AUTOMATIC

Approaches to enabling STMM– Manual enablement

• Set the self_tuning_mem DB parameter to ON• Set two (or more) memory area configuration parameters to AUTOMATIC

– Use the Configuration Advisor. It will enable STMM• AUTOCONFIGURE APPLY NONE will generate recommendations• Review the recommendations and apply as necessary

– Complete details athttp://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.admin.perf.doc/doc/t0021629.html

Page 66: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation66

From Union All View to Data Partitioned Table

Create an empty data partitioned table with one dummy range– Avoid creating any indexes (yet)

Attach the existing arms of the Union All View one by one– ALTER TABLE … ATTACH PARTITION …

Drop the dummy range using…– ALTER TABLE … DETACH PARTITION– DROP TABLE …

Set up any constraints and MQTs

Page 67: Upgrading to DB2 9.5 - /neodbug/web2a/default.htm ·  · 2010-05-20Upgrading to DB2 9.5 for Linux, UNIX, and Windows ... • Self-Tuning Memory Manager (STMM) ... Registry and Environment

© 2010 IBM Corporation67

From Union All View to Data Partitioned Table (cont.)

Run SET INTEGRITY

Create indexes on the data partitioned table as necessary

Other approaches to upgrading existing tables and views to partitioned tableshttp://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.admin.partition.doc/doc/t0021571.html