2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

64
© 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for Linux, UNIX, and Windows Mladen Kovacevic [email protected] Continuing Engineering Software Development DB2 Linux, UNIX, Windows Reliability, Availability and Serviceability (RAS)

Transcript of 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Page 1: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

© 2008 IBM CorporationSeptember 15, 2008

Upgrading to DB2 9.5 for Linux, UNIX, and WindowsMladen [email protected] Engineering Software DevelopmentDB2 Linux, UNIX, WindowsReliability, Availability and Serviceability (RAS)

Page 2: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 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

Page 3: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation3

Recommended Reading

● DB2 Migration Portal– One-stop-shop for essential information– Links to Information Center articles, white papers, 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: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation4

Recommended Reading (continued)

● 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 requirements– http://www-1.ibm.com/support/docview.wss?rs=71&uid=swg21255249

Page 5: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 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)

Component Upgrade Required?

Data Server Yes, instance & database

Client Optional

Page 6: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 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: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 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: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation8

Operating System SupportOS Software Hardware

AIX AIX Version 5.3 TL6 SP2AIX Version 6.1(64-bit kernel required)

POWER3 processors and higher

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

Itanium based HP IntegritySeries Systems

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

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

Solaris Solaris 9Solaris 10(64-bit kernel required)

UltraSPARCSolaris x64 (Intel 64 or AMD64)

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

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

For detailed requirements see: http://www.ibm.com/software/data/db2/9/sysreqs.html

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

Page 9: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

© 2008 IBM CorporationSeptember 15, 2008

Let’s Upgrade to DB2 9.5

Page 10: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation10

Data Server Upgrade (in 1 page)

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

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

Install DB2 9.5 Perform pre-migration tasks Verify the databases using the db2ckmig tool

– ie. db2ckmig tool (run on all partitions in data partitioned environments)

In-Place Upgrade Side-by-Side Upgrade● Upgrade instance (db2imigr)

● Upgrade databases (MIGRATE DATABASE command)

● Create 9.5 instance (db2icrt)

● Restore database offline backup (RESTORE DATABASE command)

Page 11: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation11

Follow the Path

RecommendationUpgrade to latestDB2 9.5 fixpack

Pre-v8.1 versions mustupgrade to DB2 UDB

v8.2.2 first

9.5

9.1 UDBv8.x

Page 12: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 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 # IZ09585 (v9.1 FP5),

#IZ26737 (v9.5 FP2)• http://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: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 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: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation14

Multithreaded 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 details:http://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: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 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: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 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: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation17

Instance Configuration Changes (DB2 9.5) (continued)

● 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: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 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: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 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: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation20

Database Configuration Changes (DB2 9.5) (continued)

● 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: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 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) (continued)

Page 22: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 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: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation23

Database Configuration Changes (DB2 9) (continued)

● 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: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation24

Registry and Environment Variable Changes

Variable Name Old Default New Default

DB2_MDC_ROLLOUTOFF (DB2 UDB V8)

ON (DB2 9)IMMEDIATE

DB2_USE_DB2JCCT2_JROUTINE Legacy JDBC type

2 driver

IBM Data Server Driver for JDBC

and SQLJ

DB2_COLLECT_TS_REC_INFO OFF ON

DB2_EXTENDED_IO_FEATURES ONLINE_BACKUP_IOPRIORITYsetting is discontinued

DB2_FORCE_FCM_BP Deprecated

DB2MEMMAXFREE Deprecated

DB2_ALLOCATION_SIZE Deprecated

Page 25: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation25

Registry and Environment Variables (continued)

● 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: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 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: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 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: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 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

Page 29: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

© 2008 IBM CorporationSeptember 15, 2008

DB2 Connect 9.5 Considerations

Page 30: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation30

DB2 Connect Upgrade Considerations

● If upgrading from DB2 Connect pre-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 Servers– ftp://ftp.software.ibm.com/ps/products/db2/info/vr95/pdf/en_US/db2c6e950.pdf

Page 31: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

© 2008 IBM CorporationSeptember 15, 2008

IBM Data Server Client 9.5 Considerations

Page 32: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation32

Simplified DB2 Client Packages

New Package Equivalent Client Package

IBM Data ServerClient 9.5

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

IBM Data ServerRuntime Client 9.5

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

Page 33: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation33

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 34: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation34

Connectivity Support for Clients to 9.5 servers

9.5server

9.5server

9.5server

COMPATIBLE(Full functionality)

DB2 v9.5 client

DB2 v9.1 client

DB2 UDBv8.x client

COMPATIBLE(Limited to v9.1 function)

COMPATIBLE(Limited to v8.x function)

Page 35: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation35

Connectivity Support for 9.5 clients

v9.1server

UDB v8.x

serverv9.5server

DB2 v9.5 client

Multiple clients can be installed on a single machine

Page 36: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

© 2008 IBM CorporationSeptember 15, 2008

Application Considerations

Page 37: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation37

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 38: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation38

Java and JDBC Changes (continued)

● 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 2) 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 39: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation39

SQL Administrative Views and Routines Changes● Some DB2 UDB V8 and DB2 9 administrative routines have

been replaced with more comprehensive functions or views. For example:

– 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

Deprecated Function New View

GET_DBM_CONFIGtable function (DB2 UDB V8)

DBMCFGadministrative view

ADMIN_GET_TAB_INFOtable function (DB2 9)

ADMINTABINFOadministrative view

Page 40: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation40

Larger Identifiers in DB2 9.5

Identifier Name Old Length New Length

Package 8 128

AttributeConstraintCursorDatabase partition groupEvent monitorSpecific nameStatementTriggerUser-defined type

18 128

Authorization ID (authid) ColumnGroupSchema

30 128

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

254 2048

Page 41: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation41

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

Application Instance Embedded shared library path

32-bit 32-bit $INSTHOME/sqllib/lib$INSTHOME/sqllib/lib32

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

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

64-bit 64-bit $INSTHOME/sqllib/lib$INSTHOME/sqllib/lib64

Page 42: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation42

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

● 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 43: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation43

Best Practices

PLAN

VALIDATE

DEPLOY

Page 44: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation44

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 45: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation45

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 46: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation46

Stage 3 – Successful Deployment

Define and execute a system “sanity” test

Upgrade the production system (deploy)

Execute sanity test

Page 47: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation47

Summary

DB2 9.5 provides a best of breed database solution

Upgrading to 9.5 is easier than ever

3-stages of a successful upgrade

Page 48: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation48

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 49: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation49

Questions?

Page 50: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation50

Enabling new features

Page 51: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation51

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 52: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation52

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 53: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation53

Converting to Large Record Identifiers (RIDs)(continued)

● 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 54: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation54

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 Version 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 55: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation55

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 56: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation56

Enabling Data Row Compression (continued)

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

● Do not forget automatic dictionary creation too!

Alternative #1 – Unload & reload Alternative #2 – Small data set

• Enable compression on the table• Use INSPECT ROWCOMPESTIMATE

to build the dictionary• Unload the existing data• Reload the 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

Page 57: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation57

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– 1. Manual enablement• Set the self_tuning_mem DB parameter to ON• Set two (or more) memory area configuration parameters to AUTOMATIC

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

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

Page 58: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation58

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 59: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation59

From Union All View to Data Partitioned Table (continued)

● Run SET INTEGRITY● Create indexes on the data partitioned table

as necessary● Other approaches to upgrading existing tables and

views to partitioned tables:http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.admin.partition.doc/doc/t0021571.html

Page 60: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation60

DB2 9 Upgrade APARs Hit in the Field

APAR FIX PACK REDISCOVERY

ABSTRACT

IY97109 FP3 9DB2CKMIG RESULTS IN "SEGMENTATION FAULT" IF DYN_QUERY_MGMT DATABASE CONFIGURATION PARAMETER IS ENABLED.

IY98320 FP3 2INTERNAL TABLE STRUCTURES HAVE ORDERING OF STATISTICAL INFORMATION SWITCHED DURING MIGRATION WHICH MAY LEAD TO TABLE PACKED DESC

JR25637 FP3 1SOLUTION TO DETECT PACKED DESCRIPTOR CORRUPTION (CAUSED BY APAR LI70946) AND CORRECT IT

LI71383 FP3 3ERROR SQL0901 WITH "UNEXPECTED MISSING DATA PARTITION ID" OR OTHER FAILURE WHEN ACCESSING A TABLE AFTER MIGRATION TO DB2 9

IY99673 FP4 3SQL1084C DURING DATABASE MIGRATION FROM V8 TO V9, OR ON DATABASE ACTIVATION IN V9, WITH DB2 REGISTRY VARIABLE DB2_PINNED_BP=ON

IZ03227 FP4 1SQL0204N EXECUTING ROUTINES WITH UNQUALIFIED OBJECTS AFTER MIGRATION TO V9

Page 61: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation61

DB2 9 Upgrade Specific APARs

FP1

IY89735 INSTALL: CUSTOMER FORCED TO CHOOSE DOMAIN USER DURING ESE MIGRATION

IY91807 SOURCE FUNCTIONS BASED ON SPECIFIC INTERNAL FUNCTIONS WILL NOT WORK PROPERLY POST MIGRATION TO DB2 9 GA.

FP2

IY91713 SYSIBMADM SCHEMA NOT IN THE SYSIBM.SYSSCHEMATA SYSTEM TABLE (INCLUDING THE SYSCAT.SCHEMATA VIEW).

IY93622 SYSPROC.ADMIN_CMD PROCEDURE RETURNING ONLY ONE RESULT SET WHEN EXPECTING TO RETURN TWO.

IY95135 UPDATING SYSSTAT.COLDIST OR SYSCAT.COLDIST VIEWS' DISTCOUNT COLUMN RESULTS IN UNEXPECTED SQL0151N (COLUMN NOT UPDATEABLE)

FP3

IY97107 SYSCAT.INDEXES CONTAINS INCORRECT DATA IN THE INDEX_OBJECTID COLUMN AFTER MIGRATION FOR PARTITIONED DATABASES.

IY97109 DB2CKMIG RESULTS IN "SEGMENTATION FAULT" IF DYN_QUERY_MGMT DATABASE CONFIGURATION PARAMETER IS ENABLED.

IY98320 INTERNAL TABLE STRUCTURES HAVE ORDERING OF STATISTICAL INFORMATION SWITCHED DURING MIGRATION WHICH MAY LEAD TO TABLE PACKED DESC

JR25637 SOLUTION TO DETECT PACKED DESCRIPTOR CORRUPTION (CAUSED BY APAR LI70946) AND CORRECT IT

LI71383 ERROR SQL0901 WITH "UNEXPECTED MISSING DATA PARTITION ID" OR OTHER FAILURE WHEN ACCESSING A TABLE AFTER MIGRATION TO DB2 9

Page 62: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation62

Known DB2 9.5 Upgrade Specific APARs

FP1

IZ14827

MIGRATION FROM A DB2 UDB V8.X UNICODE DATABASE WITH NON-IDENTITYCOLLATION TO DB2 V9.5 WILL FAIL

Page 63: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation63

DB2 9 Successful Customer Upgrades

● Telecommunications● Retail● Financial Services● Insurance● Health Care

“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

Page 64: 2008 IBM Corporation September 15, 2008 Upgrading to DB2 9.5 for ...

Information Management – DB2

© 2008 IBM Corporation64

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