Database Upgrade Guide Upgrading to Version 10.1 of IBM DB2 for Linux, UNIX, and Windows

Similar documents
Database Upgrade Guide Upgrading to Version 10.5 of IBM DB2 for Linux, UNIX, and Windows

Database Administration Guide SAP on IBM DB2 for Linux, UNIX, and Windows

Database Installation Guide Running an SAP System on IBM DB with the purescale Feature

A Practical Guide to Backup and Recovery of IBM DB2 for Linux, UNIX and Windows in SAP Environments Part 1 Backup and Recovery Overview

Welcome to: Overview of DB2 Universal Database

DB2 10 for LUW Upgrade Best Practices

Quick Beginnings for DB2 Servers

Informatica Data Replication FAQs

Upgrading to DB2 9.5 for Linux, UNIX, and Windows

PUBLIC Installation: SAP Mobile Platform Server for Linux

DB2 9 for LUW Advanced Database Recovery CL492; 4 days, Instructor-led

DocuShare Installation Guide

IBM TSM DISASTER RECOVERY BEST PRACTICES WITH EMC DATA DOMAIN DEDUPLICATION STORAGE

Administration Guide - Documentum idataagent (DB2)

SafeGuard Enterprise upgrade guide. Product version: 6.1

Sage 100 ERP. Installation and System Administrator s Guide

SAP BusinessObjects Business Intelligence Suite Document Version: 4.1 Support Package Patch 3.x Update Guide

DocuShare Installation Guide

Installation Guide. SAP Control Center 3.3

Tivoli Endpoint Manager for Remote Control Version 8 Release 2. User s Guide

IBM License Metric Tool Version Installing with embedded WebSphere Application Server

Content Server Installation Guide

StruxureWare Power Monitoring 7.0.1

EMC NetWorker Module for Databases and Applications Release 1.0

Siebel Installation Guide for UNIX. Siebel Innovation Pack 2013 Version 8.1/8.2, Rev. A April 2014

WhatsUp Gold v16.3 Installation and Configuration Guide

CA Workload Automation Agent for Databases

Release Notes P/N e

TABLE OF CONTENTS. Administration Guide - SAP for MAXDB idataagent. Page 1 of 89 OVERVIEW SYSTEM REQUIREMENTS - SAP FOR MAXDB IDATAAGENT

Best Practices Upgrade to DB2 LUW 10.5 with BLU Acceleration

Administration guide. Host software WinCCU Installation. Complete gas volume and energy data management

Netezza PureData System Administration Course

ODBC Driver User s Guide. Objectivity/SQL++ ODBC Driver User s Guide. Release 10.2

User's Guide - Beta 1 Draft

TABLE OF CONTENTS OVERVIEW SYSTEM REQUIREMENTS - SAP FOR ORACLE IDATAAGENT GETTING STARTED - DEPLOYING ON WINDOWS

TOSHIBA GA Printing from Windows

Planning the Installation and Installing SQL Server

IBM WebSphere Application Server Version 7.0

Who is my SAP HANA DBA? What can I expect from her/him? HANA DBA Role & Responsibility. Rajesh Gupta, Deloitte. Consulting September 24, 2015

IBM DB2: LUW Performance Tuning and Monitoring for Single and Multiple Partition DBs

Xerox EX Print Server, Powered by Fiery, for the Xerox 700 Digital Color Press. Printing from Windows

TABLE OF CONTENTS. Administration Guide - SAP for Oracle idataagent. Page 1 of 193 OVERVIEW SYSTEM REQUIREMENTS - SAP FOR ORACLE IDATAAGENT

Migrating to vcloud Automation Center 6.1

WebSphere Business Monitor V7.0: Clustering Single cluster deployment environment pattern

MGC WebCommander Web Server Manager

Matisse Installation Guide for MS Windows. 10th Edition

IBM Tivoli Storage Manager for Linux Version Installation Guide IBM

DS License Server V6R2013x

Many DBA s are being required to support multiple DBMS s on multiple platforms. Many IT shops today are running a combination of Oracle and DB2 which

Symantec NetBackup for DB2 Administrator's Guide

Enterprise Manager. Version 6.2. Installation Guide

6. Backup and Recovery 6-1. DBA Certification Course. (Summer 2008) Recovery. Log Files. Backup. Recovery

Siebel Installation Guide for Microsoft Windows. Siebel Innovation Pack 2013 Version 8.1/8.2, Rev. A April 2014

DiskPulse DISK CHANGE MONITOR

SAP on Oracle. Development Update June Development Manager DB Platforms Oracle & Informix OS Platform Solaris SAP AG.

CA ARCserve Backup. UNIX and Linux Data Mover Guide. r16

DB2 LUW Performance Tuning and Monitoring for Single and Multiple Partition DBs

Efficient and cost-optimized Operation of existing SAP Landscapes with PBS Nearline Storage and DB2 BLU

André Faustmann, Michael Greulich, André Siegling, Benjamin Wegner, and Ronny Zimmerman SAP. Database Administration with IBM DB2.

SAP Note FAQ: SAP HANA Database Backup & Recovery

Installation and Administration Guide

Installation Guide Customized Installation of SQL Server 2008 for an SAP System with SQL4SAP.VBS

Data Warehouse Center Administration Guide

Symantec Backup Exec 12.5 for Windows Servers. Quick Installation Guide

Fiery EX4112/4127. Printing from Windows

PATROL Console Server and RTserver Getting Started

FileMaker Server 15. Getting Started Guide

StreamServe Persuasion SP5 Control Center

ADSMConnect Agent for Oracle Backup on Sun Solaris Installation and User's Guide

DB2 for Linux, UNIX, and Windows Performance Tuning and Monitoring Workshop

Release Notes P/N Rev 01

SysPatrol - Server Security Monitor

IBM Tivoli Storage Manager for Linux Version Installation Guide IBM

IBM Business Monitor Version IBM Business Monitor Installation Guide

Using Database Performance Warehouse to Monitor Microsoft SQL Server Report Content

Buffalo Technology: Migrating your data to Windows Storage Server 2012 R2

StreamServe Persuasion SP4

Veritas NetBackup Installation Guide

OMU350 Operations Manager 9.x on UNIX/Linux Advanced Administration

External Data Connector (EMC Networker)

1. Product Information

How To Use Networker With Orgsap With Orgos.Org Software On A Powerbook (Orchestra) On A Networkor (Orroboron) With An Ipa (Ororor) With A Networker

Symantec NetBackup for Oracle Administrator's Guide

Sage ERP MAS 90 Sage ERP MAS 200 Sage ERP MAS 200 SQL. Installation and System Administrator's Guide 4MASIN450-08

IBM Security QRadar Vulnerability Manager Version User Guide

Reconfiguring VMware vsphere Update Manager

User Guide for VMware Adapter for SAP LVM VERSION 1.2

IBM Tivoli Storage Manager for Virtual Environments Version Data Protection for Microsoft Hyper-V Installation and User's Guide IBM

Configuring and Integrating Oracle

Migration guide for IBM WebSphere Message Broker on HP-UX

IBM Campaign and IBM Silverpop Engage Version 1 Release 2 August 31, Integration Guide IBM

FileMaker 14. ODBC and JDBC Guide

VirtualCenter Database Maintenance VirtualCenter 2.0.x and Microsoft SQL Server

Oracle Essbase Integration Services. Readme. Release

EMC Avamar 7.2 for IBM DB2

Transcription:

Database Upgrade Guide Upgrading to Version 10.1 of IBM DB2 for Linux, UNIX, and Windows Target Audience Technical Consultants System Administrators PUBLIC Document version: 1.02 2013-01-10

Document History CAUTION Before you start the implementation, make sure you have the latest version of this document. You can find the latest version at the following location: http://service.sap.com/instguides Database Upgrades DB2 UDB. The following table provides an overview of the most important document changes. Version Date Description 1.0 2012-06-29 First version 1.01 2012-08-21 Small correction in chapter 3.1.1 (Installing the Database Software on the Database Server): One sentence corrected to: Do not choose DB2 Advanced Enterprise Server Edition or DB2 AESE. 1.02 2013-01-10 SAP Note number for recommendations on parameter settings for DB2 10.1 updated in the following sections: Upgrade Requirements Upgrading the Instance and Database Installing the Database Software on the Database Server Update of sections 5.1 Updating the startdb Scripts and 5.2 Running the db6_update_db Script 2/64 PUBLIC 2013-01-10

Table of Contents Chapter 1 Introduction... 5 1.1 New Features... 6 Chapter 2 Planning... 9 2.1 Upgrade Restrictions... 9 2.2 Upgrade Requirements... 9 2.3 Deprecated Functionality... 13 2.4 Upgrading the Database in Special Environments... 13 Chapter 3 Upgrading the Database Under Linux and UNIX... 15 3.1 Installation of the DB2 Software... 15 3.1.1 Installing the Database Software on the Database Server... 15 3.1.2 Updating the Database Client Software... 19 3.1.2.1 Determining the DB2 Client Type Used by the System... 20 3.1.2.2 Updating the DB2 Runtime Client... 21 3.1.2.3 Updating the DB2 CLI Driver... 22 3.1.2.4 Updating the JDBC Driver... 22 3.2 Upgrading the Instance and Database... 25 Chapter 4 Upgrading the Database under Windows... 31 4.1 Installation of the DB2 Software... 31 4.1.1 Installing the Database Software on the Database Server... 31 4.1.2 Updating the Database Client Software... 38 4.1.2.1 Determining the DB2 Client Type Used by the System... 39 4.1.2.2 Updating the DB2 Runtime Client... 41 4.1.2.3 Updating the DB2 CLI Driver... 41 4.1.2.4 Updating the JDBC Driver... 41 4.2 Upgrading the Database... 43 Chapter 5 Post-Upgrade Activities... 45 5.1 Updating the startdb Scripts (Only for Linux and UNIX)... 45 5.2 Running the db6_update_db Script... 45 2013-01-10 PUBLIC 3/64

5.3 Backing Up the DB2 Server Configuration After the Upgrade (Recommended)... 46 5.4 Installing the DB2 License... 47 5.5 Checking Configuration Settings... 47 5.6 Removing the Database Administration Server (Optional)... 48 5.7 Updating Data Extractors in SAP Solution Manager (Optional)... 49 Chapter 6 Enabling New Database Features... 51 6.1 Enabling Insert Time Clustering Tables... 51 6.2 Enabling Adaptive Compression... 52 6.3 Enabling the Compression of Archived Log Files... 53 6.4 Activating Index Compression (Relevant for Upgrades from DB2 V9.5 Only)... 54 6.5 Enabling Tablespaces for Reclaimable Storage (Relevant for Upgrades from DB2 V9.5 Only)... 55 6.6 Enabling Inline LOBs and LONG VARCHAR Replacement (Relevant for Upgrades from DB2 V9.5 Only)... 56 Chapter 7 Disclaimer... 59 4/64 PUBLIC 2013-01-10

1 Introduction 1 Introduction Purpose This document explains how you upgrade your database to Version 10.1 of DB2 for Linux, UNIX, and Windows if your database is DB2 Version 9.5 or DB2 Version 9.7 for Linux, UNIX, and Windows. It contains specific information and recommendations for SAP system environments. For more information about the upgrade to DB2 Version 10.1 for Linux, UNIX, and Windows, see the document Upgrade to DB2 Version 10.1 in the IBM DB2 Information Center at: https://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw. qb.upgrade.doc/doc/c0023662.html Before you start the database upgrade, make sure that you read SAP Note 1645684. This SAP Note contains the most recent information about the database upgrade, as well as corrections to this document. Make sure that you always have the most recent version of this SAP Note. For a list of known errors and available fixes in DB2 Version 10.1, see also SAP Note 1667571. Upgrade Process To upgrade the database to DB2 Version 10.1, you perform the following steps: 1. You plan the upgrade and check the requirements. 2. You install the DB2 10.1 database software. 3. You upgrade the DB2 instance. 4. You upgrade the DB2 database. 5. You perform post-upgrade activities. These steps are described in detail for Linux/UNIX and for Windows in the appropriate sections. Naming Conventions Database Terminology Database Version Short Name IBM DB2 Version 10.1 for Linux, UNIX, and Windows DB2 10.1 IBM DB2 Version 9.7 for Linux, UNIX, and Windows DB2 V9.7 IBM DB2 Version 9.5 for Linux, UNIX, and Windows DB2 V9.5 IBM DB2 Version 9.1 for Linux, UNIX, and Windows DB2 V9.1 IBM DB2 Version 8 Universal Database for UNIX and Windows DB2 UDB Version 8 2013-01-10 PUBLIC 5/64

1 Introduction 1.1 New Features SAP Terminology SAP NetWeaver application server ABAP is referred to as AS ABAP. SAP NetWeaver application server Java is referred to as AS Java. Variables Name of Variable <SAPSID> <sapsid> <DBSID> <dbsid> Description SAP system ID in upper case SAP system ID in lower case Database name in upper case Database name in lower case The database name is not necessarily the same as the SAP system ID. For example, the database name is not necessarily the same as the SAP system ID in an MCOD (Multiple Components in One Database) environment. 1.1 New Features New Features of DB2 10.1 Insert Time Clustering (ITC) Tables ITC tables group their records based on the insert time. Space reclamation that is, returning free space in the table to the tablespace is possible without a full offline or online REORG. Index Space Reclaim For index objects, a new function is available that reclaims free space and returns it to the tablespace in online mode. Adaptive Compression In addition to the existing row compression method, adaptive compression works on page level and provides improved table data compression without the need for table reorganization. Index Jump Scan Composite indexes can be used during query execution even if the query does not define constraints for all index columns. Performance Improvements New functions have been designed for DB2 10.1 to improve performance, for example, smarter index prefetching, hash join improvements, zigzag joins, and early aggregation. Support of Hidden Columns During table definition, columns can be marked as implicitly hidden. Such columns are unavailable until they are explicitly referenced. Storage Groups The existing automatic storage infrastructure has been extended by a new object, the storage group. Storage groups contain multiple storage paths that you can define and to which you can assign 6/64 PUBLIC 2013-01-10

1 Introduction 1.1 New Features tablespaces. This enables the separation of cold, warm, and hot data that can subsequently be placed on different storage media. Multi-Core Parallelism The use of multi-core systems in SMP architecture improves data warehouse environments. High Availability and Disaster Recovery (HADR) with Multiple Standbys The HADR feature now allows the use of more than one standby server. Log File Compression Archived log files are now automatically compressed, which leads to further disk space savings. For more information about the support of new features of DB2 10.1 in your SAP system release, see SAP Note 1700631. New Features of DB2 V9.7 Index Compression In addition to row compression, you can now also compress index objects. Inline LOBs (Large Objects) Small LOBs up to a specified size are now stored together with the table data; this is known as inlining. Inline LOBs are also subject to row compression. LOBs that are larger than the specified size are transparently stored in the LOB storage object. Enhancements to the Automatic Storage Mechanism (Autostorage) You can now convert databases that have not been enabled for DB2 s automatic storage management to automatic storage databases. Furthermore, you can convert existing DMS tablespaces to automatic storage tablespaces. To drop automatic storage paths, you can now use the ALTER DATABASE SQL statement. Reclaimable Storage for DMS Tablespaces For newly created DMS tablespaces, you can now reclaim unused storage below the high-water mark without problems. For this purpose, you can use the REDUCE and the LOWER HIGH WATER MARK option of the ALTER TABLESPACE statement. Online Table Move Procedure A stored procedure to move tables online has been available as an attachment to SAP Note 1039544. With DB2 9.7, a version of this stored procedure has now become part of the DB2 core product under the name ADMIN_MOVE_TABLE. Increased Tablespace Capacity With DB2 9.7, the maximum size of large and temporary tablespaces has been increased to 64 TB. Monitoring Enhancements DB2 9.7 provides new time-spent monitor elements. In addition, a new event monitor for enhanced lock reporting is available. Security Enhancements 2013-01-10 PUBLIC 7/64

1 Introduction 1.1 New Features You can now secure the communication with the database using the Transport Layer Security (TLS) and the Secure Socket Layer (SSL) protocol. Furthermore, you can encrypt user and password information using the AES 256bit algorithm. System Automation for Multiplatform (SA MP) Now Available for Solaris SPARC The integrated cluster management software IBM Tivoli SA MP is now available on AIX, Linux, and Solaris SPARC. For more information about the support of new features of DB2 V9.7 in your SAP system release, see SAP Note 1351160 and the document Upgrading to Version 9.7 of IBM DB2 for Linux, UNIX, and Windows on SAP Service Marketplace at http://service.sap.com/instguides Database Upgrades DB2 UDB. 8/64 PUBLIC 2013-01-10

2 Planning 2.1 Upgrade Restrictions 2 Planning 2.1 Upgrade Restrictions The following restrictions apply to the upgrade to DB2 10.1: Operating system-related restrictions Database-related restrictions SAP system-related restrictions Operating System-Related Restrictions For a list of supported operating systems, see Upgrade Requirements [page 9]. The use of raw devices for database logging is not recommended and will be removed in a future DB2 release. You need to change the setting of the database configuration parameter NEWLOGPATH to a disk device instead of a raw device. Database-Related Restrictions If you are running DB2 for Linux, UNIX, and Windows Version 9.1 or lower, you first have to upgrade the database to DB2 Version 9.5 or 9.7 as described in the relevant upgrade guide at: http://service.sap.com/instguides Database Upgrades DB2 UDB SAP System-Related Restrictions DB2 10.1 is not supported for SAP system releases lower than SAP NetWeaver 7.0. If you have an older SAP release, you must upgrade your SAP system to SAP NetWeaver 7.0 or higher before you can use DB2 10.1. More Information For more information, see Upgrade restrictions for DB2 servers in the IBM DB2 Information Center at https:// publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.qb.upgrade.doc/ doc/c0007191.html. 2.2 Upgrade Requirements When you plan your database upgrade, you have to make sure that the following requirements are met: Operating system requirements 2013-01-10 PUBLIC 9/64

2 Planning 2.2 Upgrade Requirements SAP system-specific requirements Space requirements Other requirements Operating System Requirements The upgrade to DB2 10.1 is supported for the following operating systems: Windows on x64 AIX HP-UX on IA64 Solaris on SPARC Solaris on x64 Linux on x64 Linux on Power Make sure that your operating system fulfills all prerequisites for the installation of DB2 10.1. For more information, see Installation prerequisites for database servers in the IBM DB2 Information Center at https://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/ com.ibm.db2.luw.qb.server.doc/doc/c0059819.html. AIX only DB2 10.1 uses asynchronous I/O. On AIX, you must install and configure I/O completion ports (IOCP). For more information, see Configuring IOCP (AIX) in the IBM DB2 Information Center at https://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/ com.ibm.db2.luw.admin.perf.doc/doc/t0054518.html. Linux only DB2 no longer supports raw character devices on Linux. If you are using raw character devices as containers for tablespaces or log files, you must convert them to raw block devices before the database upgrade. For more information, see Changing raw devices to block devices (Linux) in the IBM DB2 Information Center at https://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/ com.ibm.db2.luw.qb.upgrade.doc/doc/t0022273.html. SAP System-Specific Requirements Since a specific version of the database shared library (DBSL) dbdb6slib is required for the SAP kernel, make sure that you have applied the correct SAP kernel patch before you start the database upgrade.. The following table shows the minimum DBSL version that is required: SAP Kernel Release 7.00 327 DBSL Patch Level 10/64 PUBLIC 2013-01-10

2 Planning 2.2 Upgrade Requirements SAP Kernel Release 7.01 169 7.10 261 7.11 148 7.20 112 DBSL Patch Level For SAP releases higher than the ones listed in this table, you do not need a specific SAP kernel patch. To check the current patch level of your DBSL, proceed as follows: 1. Log on to an application server as user <sapsid>adm. 2. Enter the following command: disp+work v You can find the DBSL patch information at the end of the output. For more information about how to download and apply the latest SAP kernel patch, see SAP Note 19466. RECOMMENDATION We recommend that you install the latest available SAP kernel patch before you start the DB2 upgrade. To be able to use new functionality of DB2 10.1 in the application server ABAP, you need adaptions in the area of monitoring (SAP transaction DBACOCKPIT) and in the ABAP data dictionary. Make sure that you have implemented the following minimum SAP Basis support packages required for the different SAP releases: SAP Basis Release 7.00 SP16 7.01 SP5 7.02 SP9 7.10 SP9 7.11 SP4 7.20 n/a 7.30 SP5 7.31 SP2 SAP Basis Support Package In addition to the support packages mentioned above, you must implement the following SAP Notes: SAP Note Description 1354186 DB6: LONG/LOB type mapping and database object check 1409540 DB6: CCMS Adoptions for DB2 purescale Feature (must be implemented even if you are not using the purescale feature) 1557981 DB6: Adjustments in DBA Cockpit for new database versions 1677675 DB6: Compatibility Patches for new DB2 Releases 1701181 DB6: ABAP DDIC: Enhancements for DB2 10.1 2013-01-10 PUBLIC 11/64

2 Planning 2.2 Upgrade Requirements SAP Note Description 1721095 DB6: DB2 10.1 purescale Adoptions (must be implemented even if you are not using the purescale feature) The following SAP tools for DB2 require a specific patch level to be able to work with DB2 10.1: Tool Patch Level db6pmudf 15 dmdb6bkp 16 brdb6brt 27 For more information about how to download and apply the latest kernel patch for these tools, see SAP Note 19466. Space Requirements Before the database upgrade, you have to check the size of the SYSCATSPACE tablespace. If SYSCATSPACE is not enabled for the automatic resize function (AUTORESIZE), you must make sure that at least 50 percent of all pages is free. If AUTORESIZE is enabled or if you are using DB2 s automatic storage management (AUTOSTORAGE), you have to check if there is enough free space available in the file systems. The upgrade uses the temporary tablespace. In an SAP database, the temporary tablespace is an SMS tablespace with the name PSAPTEMP<pagesize>. The file system in which this tablespace is located must allow the temporary tablespace to grow to twice the size that is required by SYSCATSPACE. During the upgrade, logs are written. The size of the required log space is related to the size of SYSCATSPACE. To avoid log full situations, make sure that enough log space is available. RECOMMENDATION As a rough guideline, make sure that your log space is at least as large as SYSCATSPACE. If you followed the parameter recommendations for the database parameters LOGFILSIZ, LOGPRIMARY and LOGSECOND described in SAP Note 1692571, the upgrade should run without problems. In a partitioned database environment, you only need to check the size of the log space on the catalog partition. To check the available log space, proceed as follows: 1. Log on to the database server as user db2<dbsid>. 2. Connect to the database using the following command: db2 connect to <DBSID> 3. Check the available log space using the following command: db2 get snapshot for all databases The available log space is displayed in the following row of the output: Log space available to the database (Bytes) 12/64 PUBLIC 2013-01-10

2 Planning 2.3 Deprecated Functionality For more information, see Increasing table space and log file sizes before upgrade in the IBM DB2 Information Center at https://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/ com.ibm.db2.luw.qb.upgrade.doc/doc/t0022269.html. Other Requirements You must perform an offline backup before you start the database upgrade. For upgrades from DB2 V9.5 only:: Before you start the upgrade, you must convert all type-1 indexes to type-2 indexes. As of DB2 UDB Version 8, type-2 indexes have been available. As of DB2 V9.7, the support for type-1 indexes is discontinued. You can check the existence of type-1 indexes using the db2ckupgrade command, which you execute before the instance upgrade. To determine if type-1 indexes exist in a database, DB2 V9.7 additionally provides the db2identifytype1 command. This command is available after the DB2 V9.7 software installation. For more information, see Converting type-1 indexes to type-2 indexes in the IBM DB2 Information Center at https://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/ com.ibm.db2.luw.qb.upgrade.doc/doc/t0050553.html. For the latest additions and corrections to this document, see SAP Note 1645684. 2.3 Deprecated Functionality The DB2 Control Center tools and the database administration server (DAS) have been discontinued in DB2 10.1. For more information, see Control Center tools have been discontinued in the IBM DB2 Information Center at: https://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.wn.doc/ doc/i0058731.html To perform administration tasks, you can use the DBA Cockpit (SAP transaction DBACOCKPIT). The DBA Cockpit is available in every AS ABAP, and you can also use it to administer an AS Java database. A database administration server (DAS) is automatically created during the installation of the DB2 10.1 software. You can remove the DAS after the database upgrade as described in Removing the Database Administration Server (Optional) [page 48]. 2.4 Upgrading the Database in Special Environments This section provides information about upgrading the database in special environments. 2013-01-10 PUBLIC 13/64

2 Planning 2.4 Upgrading the Database in Special Environments Upgrading a Multi-Partition Database Before you can upgrade a multi-partition database, you have to install the DB2 10.1 software on all database partition servers. The DB2 software can also be provided for all servers using a shared directory. For more information, see Upgrading partitioned database environments in the IBM DB2 Information Center at https://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2. luw.qb.upgrade.doc/doc/t0011548.html. Upgrading the Database in an HADR Environment In an HADR environment, you can only upgrade the primary database. You cannot upgrade the standby database. Before the upgrade, you must execute the STOP HADR command on the primary and the standby database. After the upgrade, you have to re-create your standby database and initialize HADR again on the primary and the standby database. Upgrading the Database in a Microsoft Cluster (MSCS) Environment To upgrade your database to DB2 10.1 in a Microsoft Cluster environment, you have to install a new copy of DB2 10.1 on all cluster nodes and upgrade the instance and the database manually. For more information, see Upgrading DB2 servers in Microsoft Cluster Server environments in the IBM DB2 Information Center at: https://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.qb. upgrade.doc/doc/t0022647.html Upgrading the Database in an IBM Tivoli System Automation for Multiplatforms (SA MP) Environment To upgrade a DB2 database that is part of an SA MP cluster, you must first take it out of control of the cluster management software. To do so, set the respective resource groups offline and switch SA MP into manual control mode using the command samctrl MT. For more information, see Updating the Database Fix Packs in the document IBM DB2 High Availability Solution: IBM Tivoli System Automation for Multiplatforms on SAP Service Marketplace at service.sap.com/installnw70 Installation SAP NetWeaver Systems. https:// 14/64 PUBLIC 2013-01-10

3 Upgrading the Database Under Linux and UNIX 3.1 Installation of the DB2 Software 3 Upgrading the Database Under Linux and UNIX Purpose The following sections describe the required steps for the database upgrade when your operating system is UNIX or Linux. Process Flow The database upgrade consists of the following steps that you must perform in the specified order: 1. You install the DB2 software [page 15]. 2. You upgrade the instance and the database [page 25]. 3. You perform post-upgrade activities [page 45]. 3.1 Installation of the DB2 Software The installation of the DB2 10.1 software consists of the following steps that you must perform in the specified order: 1. You install the database software on the database server [page 15]. 2. You update the database client software [page 19]. 3.1.1 Installing the Database Software on the Database Server The following section describes how you install the database software on the database server for Linux or UNIX operating systems. CAUTION If you are running a partitioned DB2 database system, the DB2 10.1 software must be available in exactly the same directory on all database hosts. Therefore, we recommend that you install the software on a share that is accessible on all database hosts. Procedure 1. Log on to the database server as user root and make sure that you can open programs with a graphical user interface. 2013-01-10 PUBLIC 15/64

3 Upgrading the Database Under Linux and UNIX 3.1 Installation of the DB2 Software 2. Insert and mount the database DVD to <DVD_mount> and enter the following command, depending on your operating system and processor architecture: Operating System HP-UX (Itanium) AIX Linux (PowerPC) Linux x86_64 (AMD64) Solaris SPARC Solaris x64 Command /<DVD_mount>/HPIA64/ESE/disk1/db2setup /<DVD_mount>/AIX_64/ESE/disk1/db2setup /<DVD_mount>/LINUXPPC64_64/ESE/disk1/db2setup /<DVD_mount>/LINUXX86_64/ESE/disk1/db2setup /<DVD_mount>/SUNOS_64/ESE/disk1/db2setup /<DVD_mount>/SOLARIS_X86_64/ESE/disk1/db2setup It might take a few minutes for the IBM DB2 Setup Launchpad to appear. 3. On the Welcome screen of the IBM DB2 Setup Launchpad, choose Upgrade Information and check if all operating system requirements are met. Figure 1: Upgrade Information CAUTION You must make sure that the operating system requirements are met. Otherwise, the upgrade can fail. 4. Choose Install a Product. The Install a Product screen appears: 16/64 PUBLIC 2013-01-10

3 Upgrading the Database Under Linux and UNIX 3.1 Installation of the DB2 Software Figure 2: Install a Product 5. Choose Install New under DB2 Enterprise Server Edition Version 10.1. CAUTION Do not choose DB2 Advanced Enterprise Server Edition or DB2 AESE. If you install this edition, the OEM license key provided by SAP will not work. Do also not choose a DB2 version with the DB2 purescale feature. Installing or upgrading an SAP System on DB2 with the purescale feature is described in the separate guide Running an SAP System on DB2 purescale. The screen DB2 Setup DB2 Enterprise Server Edition Version 10.1 appears. The following steps can appear, but not necessarily in the sequence shown below. The exact sequence of the installation steps that follow depends on various factors, for example, your operating system, already installed DB2 components, your installation choices, and the DB2 Fix Pack level. Therefore, we cannot provide a detailed step-by-step procedure for the DB2 software installation in this document. The following steps outline important points that you have to consider when installing DB2 in an SAP environment: On the Introduction part of the screen DB2 Setup DB2 Enterprise Server Edition Version 10.1, choose Next. Accept the license agreement and choose Next. On the screen Select the installation type, choose Typical and then Next. On the screen Select installation, response file creation, or both, choose Install DB2 Enterprise Server Edition on this computer and then Next. On the screen Select the installation directory, enter the Installation Directory and choose Next. 2013-01-10 PUBLIC 17/64

3 Upgrading the Database Under Linux and UNIX 3.1 Installation of the DB2 Software Figure 3: Installation Directory RECOMMENDATION We recommend that you do not use the default installation paths for Linux and AIX, which are as follows: Linux: /opt/ibm/db2/v10.1 Note that on Linux ibm is now in lower case. AIX, HP-UX, and Solaris: /opt/ibm/db2/v10.1 Instead, use a subdirectory of the home directory of the instance-owning user such as the following: /db2/db2<dbsid>/db2_software_v10. Background: Current versions of the SAP installation tool install a local copy of the DB2 software in a subdirectory of the home directory of the instance-owning user, for example, /db2/db2<dbsid>/db2_software. The advantage is that you can maintain the database software of the DB2 copies independently of each other for each SAP system on the same host. To check the location of the currently installed DB2 version, log on as user db2<dbsid> and enter the db2level command. CAUTION Do not install DB2 10.1 in the current instance directory of your DB2 instance (/db2/ db2<dbsid>/sqllib) and below. On the Instance Setup screen, choose Do not create a DB2 instance and then Next. On the Set Up Notifications screen, choose Do not set up your DB2 server to send notifications at this time. 18/64 PUBLIC 2013-01-10

3 Upgrading the Database Under Linux and UNIX 3.1 Installation of the DB2 Software On the Summary screen, review the installation summary and start the installation by choosing Finish. When the installation is completed, choose Finish again. 3.1.2 Updating the Database Client Software You can install the AS ABAP of an SAP system with two different DB2 clients: The DB2 Runtime Client (as of DB2 Version 9.5 also known as IBM Data Server Runtime Client) offers all the functions required to run applications that connect to a DB2 server. Besides the DB2 Command Line Processor (CLP), it contains no administration and configuration tools. The DB2 CLI Driver (also known as IBM DB2 Driver for ODBC and CLI or IBM Data Server Driver for ODBC and CLI) provides runtime support for applications using the ODBC or CLI API. The DB2 CLI Driver is a lightweight zero-installation driver that you can install on shared directories (for example, NFS shares). Which client is used depends on the setup of your SAP system. The AS Java always uses the Type-4 DB2 JDBC Driver (also known as IBM DB2 Driver for JDBC and SQLJ or IBM Data Server Driver for JDBC and SQLJ). SAP Releases Based on SAP Basis 7.0 All SAP systems that were installed with DB2 UDB Version 8 run with the DB2 Runtime Client. All SAP systems that are installed with DB2 Version 9.1 can either run with the DB2 Runtime Client or the DB2 CLI driver, which was introduced with DB2 Version 9.1. The type of DB2 client used in your system depends on whether you want to upgrade the database of a newly installed system, an upgraded system, or whether you have manually switched to the new DB2 client connectivity (according to SAP Note 1091801). Therefore, before the upgrade, you must determine which type of DB2 client [page 20] is used in your system and update it accordingly. SAP Releases Based on SAP Basis 7.10 and Higher All SAP systems based on SAP Basis 7.10 are always installed with the new DB2 client connectivity. You only have to update the DB2 CLI driver [page 22]. Graphical Overview The following figure provides a graphical overview of the steps that you have to perform on an AS ABAP: 2013-01-10 PUBLIC 19/64

3 Upgrading the Database Under Linux and UNIX 3.1 Installation of the DB2 Software Figure 4: Upgrading the Client Connectivity in an SAP ABAP System 3.1.2.1 Determining the DB2 Client Type Used by the System To explicitly determine which DB2 client type (DB2 Runtime Client or DB2 CLI driver) is used, you can use R3trans. Procedure 1. Log on to the application server where you want to check the DB2 client type as user <sapsid>adm. 2. Enter the following command: R3trans -x R3trans loads the DB2 library and connects to the database. A log file trans.log is created in the current directory. 3. Open the log file trans.log in an editor and verify that the application server uses the CLI driver. EXAMPLE If the DB2 CLI driver is used, the output of the trans.log file looks as follows:... 4 ETW000 [dev trc,00000] DB2 library successfully loaded DB2 library '/usr/sap/<sapsid>/sys/global/db6/<platform>/db6_clidriver/lib/libdb2.so' successfully loaded... 4 ETW000 [dev trc,00000] Running with CLI driver 40239 0.468024... If the DB2 Runtime Client is used, the output of the trans.log file looks as follows: 20/64 PUBLIC 2013-01-10

3 Upgrading the Database Under Linux and UNIX 3.1 Installation of the DB2 Software Result... 4 ETW000 [dev trc,00000] DB2 library successfully loaded DB2 library '/db2/ db2<dbsid>/sqllib/lib/libdb2.so' successfully loaded... Even if R3trans loads the DB2 CLI driver libraries, an additional DB2 Runtime Client might be installed. By default, the SAP kernel uses the DB2 CLI driver on all application servers of SAP Release 7.0 and higher that have a local DB2 Runtime Client installed, as well as access to a DB2 CLI driver in directory /usr/sap/<sapsid>/sys/global/db6. In this case, the DB2 Runtime Client is not used, and we recommend that you uninstall it to avoid duplicate maintenance. To check if a DB2 Runtime Client is installed, enter the following command as user <sapsid>adm: db2ilist If no DB2 Runtime Client is installed, this command is unknown. If a DB2 Runtime Client exists, the name of the local DB2 instance db2<dbsid> is displayed. If you want to keep your DB2 Runtime Client, we recommend that you update both DB2 clients (that is, the DB2 Runtime Client and the DB2 CLI driver). You know which type of DB2 client is used in your system landscape. Update it according to the instructions in one of the following sections: Updating the DB2 Runtime Client [page 21] Updating the DB2 CLI Driver Client [page 22] Updating the JDBC Driver [page 22] 3.1.2.2 Updating the DB2 Runtime Client For each SAP application server that uses a DB2 Runtime Client and that is not running on the database server, you must update the DB2 Runtime Client. That is, you install the DB2 Runtime Client software first and upgrade the DB2 Runtime Client instance as part of the database and instance upgrade. This section describes how you install the DB2 10.1 Runtime Client software. Procedure 1. To install the DB2 Runtime Client, follow the procedure described in Installing the Database Software on the Database Server [page 15]. However, make sure that you choose IBM Data Server Runtime Client Version 10.1 as the product to be installed in step 5. 2. Repeat these steps on each application server that is not running on the database host. 2013-01-10 PUBLIC 21/64

3 Upgrading the Database Under Linux and UNIX 3.1 Installation of the DB2 Software After you have installed the new DB2 Runtime Client software, you must still upgrade the DB2 Runtime Client instance as described in Upgrading the Instance and Database [page 25]. 3.1.2.3 Updating the DB2 CLI Driver For SAP systems that use the DB2 CLI driver, you only have to update the DB2 CLI driver once in the shared directory /usr/sap/<sapsid>/sys/global/db6. Each application server can access this directory. Therefore, after the DB2 CLI driver has been updated, it can be used by all application servers. Procedure 1. Log on to the database host as user <sapsid>adm. 2. Mount the DVD DB2 V10.1 LUW CLI/JDBC Driver. 3. Switch to directory <mount_dvd_dir>/client. 4. For an ABAP or ABAP+Java system, start the db6_update_client.sh script using the following command:./db6_update_client.sh -u For a Java-only system, use the following command to update only the JDBC driver:./db6_update_client.sh -j For more information and the latest version of the db6_update_client scripts, see SAP Note 1365982. Result The new version of the DB2 CLI driver is automatically used after the next SAP system restart and no further action is required. 3.1.2.4 Updating the JDBC Driver The following section describes how you update the JDBC driver. Prerequisites Since the location of the JDBC driver can vary which means that the appropriate steps to update it can also vary you should first determine the location of the JDBC driver, which depends on your SAP system release level. Determining the Location of the JDBC Driver for SAP Releases Lower than SAP Basis 7.10 1. Log on to the respective application server as user <sapsid>adm. 2. Change to the directory../cluster/bootstrap of the Java instance using the following command: cd /usr/sap/<sapsid>/dvebmgs<instance-no>/j2ee/cluster/bootstrap 22/64 PUBLIC 2013-01-10

3 Upgrading the Database Under Linux and UNIX 3.1 Installation of the DB2 Software 3. Determine the location of the JDBC driver using the following command: grep driver bootstrap.properties The value of this property of the rdbms.driverlocation is returned. It contains the location of the currently used JDBC driver. Determining the Location of the JDBC Driver for SAP Releases with SAP Basis 7.10 and Higher 1. Log on to the respective application server as user <sapsid>adm. 2. Change to the profile directory of the Java instance using the following command: cd /usr/sap/<sapsid>/sys/profile 3. Enter the following command: grep dbdriver <instance_profile> The path to the JDBC driver is returned. Procedure Updating the JDBC Driver in a Central System The JDBC Driver is part of every database installation. In a central system where all SAP instances are installed on one host, all application servers can use the JDBC driver that is provided by the database system. On all UNIX and Linux platforms, DB2 uses symbolic links to point from the instance directories to the software installation directory. In a central system, the JDBC driver files should be taken from the following path: /db2/db2<dbsid>/ sqllib/java EXAMPLE For example, for DB2 V9.5, this link points to the following directory: /opt/ibm/db2/v9.5/ java. During the database upgrade, this link is automatically updated to the new DB2 software installation directory and therefore the JDBC driver of the new DB2 version is used. However, if /db2/db2<dbsid>/ sqllib/java is not used to specify the location of the JDBC driver files, the AS Java system still uses the old JDBC driver after a database upgrade. The problem is not immediately obvious because the AS Java system still starts and stops. However, applications that are using certain new functions that are provided only by the new JDBC driver cause errors during execution. CAUTION Due to a problem in the 6.40 version of the SAP installation tool, even if /db2/db2<dbsid>/sqllib/ java is specified during the installation, the release-dependent directory (for example, /opt/ibm/ db2/v8.1/java for DB2 UDB Version 8) is inserted into the configuration files of the J2EE engine. 2013-01-10 PUBLIC 23/64

3 Upgrading the Database Under Linux and UNIX 3.1 Installation of the DB2 Software If the wrong path (for example, /opt/ibm/db2/v8.1/java for DB2 UDB Version 8) is found in the configuration files of a central AS Java installation, you must manually replace it with the correct path /db2/db2<dbsid>/sqllib/java as described in SAP Note 867976. Update the JDBC driver according to one of the following scenarios: Scenario The JDBC driver is taken from a DB2 server installation. In this case, the directory retrieved using the procedure above is /db2/db2<dbsid>/sqllib/java. The JDBC driver is taken directly from the DB2 software installation directory. In this case, the directory retrieved using the procedure above, for example, for DB2 UDB Version 8 is/opt/ibm/db2/v8.1/java. The JDBC driver is taken from /global/db6 or from a copy of this driver in the local instance exe directory DIR_EXECUTABLE=/usr/sap/<SAPSID>/D[VEBMGS][nr]/ exe or /usr/sap/<sapsid>/j[c][nr]/exe. Required Action No further action required You have to manually adapt the configuration files of the AS Java system so that the correct driver is taken using the following link:/db2/db2<dbsid>/ sqllib/java To do this, follow the instructions in SAP Note 867976. Run the db6_update_client.sh script as described in Updating the DB2 CLI Driver Client [page 22]. Updating the JDBC Driver in a Distributed System In a distributed SAP system, application servers run on dedicated hosts other than the database host. Therefore, these application servers need their own JDBC driver files. Depending on the location, you have to update the JDBC driver on these dedicated hosts according to one of the following scenarios: Scenario The JDBC driver is taken from a DB2 Runtime Client instance. In this case, the directory retrieved using the procedure described above is /db2/db2<dbsid>/sqllib/ java. The JDBC driver is taken from /global/db6 or from a copy of this driver in the local instance exe directory DIR_EXECUTABLE=/usr/sap/<SAPSID>/D[VEBMGS][nr]/exe or /usr/sap/<sapsid>/j[c][nr]/exe. The JDBC driver is used from any other location. Required Action Update the DB2 Runtime Client as described in Updating the DB2 Runtime Client [page 21]. Run the script db6_update_client.sh as described in Updating the DB2 CLI Driver [page 22]. Update the JDBC driver file (db2jcc.jar or db2jcc_license_cu.jar) manually as follows: 1. Mount the DVD DB2 10.1 LUW CLI/JDBC- Driver to directory <client_dvd_mount>. 2. As user <sapsid>adm, copy the JDBC driver to the destination directory using the following command: cp <client_dvd_mount>/client/jdbc/* <rdbms.driverlocation_dir> 24/64 PUBLIC 2013-01-10

3 Upgrading the Database Under Linux and UNIX 3.2 Upgrading the Instance and Database Scenario Required Action If the JDBC driver is not taken from the kernel exe directory, which is visible on all servers, you have to repeat this step on all application servers. 3.2 Upgrading the Instance and Database After the software installation, you have to upgrade the instance and database. Make sure that you perform all steps in the sequence given: 1. You back up the DB2 server configuration (recommended). 2. You run program db2ckupgrade (optional). 3. You upgrade the instance. 4. You migrate the DB2 administration server (optional). 5. You upgrade the DB2 database. 6. You upgrade the DB2 runtime client instance for a central and dialog instance. 7. You verify if the database has been successfully upgraded (optional). 8. You perform a backup (recommended). In the following procedures, replace <DB2_SWDIR> with your software installation directory for DB2 10.1. Prerequisites Before the database upgrade to DB2 10.1, you must have performed a full offline backup of your database. Make sure that there is enough free disk space available. Otherwise, the upgrade of your DB2 database fails. You need to check the following: The system catalog tablespace SYSCATSPACE If SYSCATSPACE is not an AUTOEXTENT or an AUTOSTORAGE tablespace, you must ensure that at least half of the pages is free. To find out the number of used and free pages, use the following command: db2 LIST TABLESPACES SHOW DETAIL The temporary tablespace SAP systems use SMS-based temporary tablespaces. Make sure that the temporary tablespaces can grow to at least twice the size of SYSCATSPACE. The size of log space As a rough guideline, make sure that your log space has at least the size of the SYSCATSPACE. If you followed the parameter recommendations for the database parameters LOGFILESIZ, 2013-01-10 PUBLIC 25/64

3 Upgrading the Database Under Linux and UNIX 3.2 Upgrading the Instance and Database LOGPRIMARY and LOGSECOND (for more information, see SAP Note 1692571), the upgrade should run without problems. In a partitioned database environment, you only need to check the size of the log space on the catalog partition. For more information, see Increasing tablespace and log file sizes before upgrade in the IBM DB2 Information Center at: https://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/ com.ibm.db2.luw.qb.upgrade.doc/doc/t0022269.html. Procedure Backing Up the DB2 Server Configuration (Recommended) During the upgrade, DB2 configuration parameters are changed automatically. To keep track of the changes, we recommend that you back up the DB2 server configuration before and after the actual upgrade. By comparing the files that contain the DB2 configuration settings after the upgrade has finished, you can review the changes. DB2 is configured by setting the following: Environment variables DB2 profile registry variables DB2 database manager configuration parameter DB2 database configuration parameter To back up the database configuration, perform the following steps: 1. Log on to the database server as user db2<dbsid>. 2. Create a directory <config_bkp> where you store the configuration using a command such as the following: mkdir /db2/db2<dbsid>/cfg_backup 3. Change to the newly created directory <config_bkp> using the following command: cd /db2/db2<dbsid>/cfg_backup 4. Back up the database server configuration using the following commands: env > env_before_upg.txt db2set -all > reg_before_upg.txt db2 get dbm cfg > dbm_before_upg.txt db2 get db cfg for <SAPSID> > db_before_upg.txt After the database upgrade, you back up the database configuration again and compare the files that contain the configuration before and after the upgrade. For more information, see Backing Up the DB2 Server Configuration After the Migration (Recommended) [page 46]. Running Program db2ckupgrade (Optional) The db2ckupgrade program checks if certain prerequisites for the upgrade are met. This program is automatically called by db2iupgrade (see below). If it encounters problems, the upgrade does not start. 26/64 PUBLIC 2013-01-10

3 Upgrading the Database Under Linux and UNIX 3.2 Upgrading the Instance and Database You can start db2ckupgrade manually before the upgrade. This is only a check and does not affect your database. In a partitioned database environment, you must run db2ckupgrade on all database partitions. 1. Log on to the database server as user <sapsid>adm. 2. Stop your SAP system and the DB2 instance using the following commands: stopsap db2stop force 3. Log on to the database server as user db2<dbsid>. 4. Start the database manager using the following command: db2start 5. Run the db2ckupgrade program using the following command: <DB2_SWDIR>/instance/db2ckupgrade e l upgrade.log 6. Check the file upgrade.log for possible errors. If no errors are found, the following message is displayed: Version of DB2CKUPGRADE being run: VERSION 10.1... DBT5508I The db2ckupgrade utility completed successfully. The database or databases can be upgraded. Upgrading the Instance CAUTION In a partitioned database environment, upgrade the instance on the database partition server that owns the home directory of the instance owner. 1. Log on to the database server as user <sapsid>adm. 2. Stop your SAP system and the DB2 instance using the following commands: stopsap db2stop force db2 terminate 3. Log on to the database server as user root. 4. Upgrade the instance using the following command: <DB2_SWDIR>/instance/db2iupgrade u db2<dbsid> db2<dbsid> 2013-01-10 PUBLIC 27/64

3 Upgrading the Database Under Linux and UNIX 3.2 Upgrading the Instance and Database To check if all requirements for an upgrade are met, db2iupgrade calls the program db2ckupgrade in the background. If db2ckupgrade finds problems, the DB2 instance is not upgraded. In this case, correct the problem and start db2iupgrade again. If the instance was successfully upgraded, the following message is displayed: Program db2iupgrade completed successfully. The upgrade command saves a backup copy of the instance directory ~db2<dbsid>/sqllib to one of the following directories: ~db2<dbsid>/sqllib_v95 ~db2<dbsid>/sqllib_v97 The files are then adapted in the ~db2<dbsid>/sqllib directory. During the instance upgrade, the database manager configuration of DB2 10.1 is merged with the settings of the database manager configuration of DB2 Version 9.5 or DB2 Version 9.7. Upgrading the DB2 Database Since the DB2 system catalog has been changed with DB2 Version 10.1, you have to upgrade the database. CAUTION In a partitioned database environment, perform the database upgrade on the catalog database partition server. 1. Log on to the database server as user db2<dbsid>. 2. Upgrade the database using the following commands: db2start db2 upgrade database <SAPSID> The time it takes to upgrade the database depends on the size of the system catalog. For a standard SAP NetWeaver 7.0 ABAP only, the upgrade approximately takes 10 to 30 minutes. If the upgrade completes successfully, the following message is displayed: The UPGRADE DATABASE command completed successfully. If the database upgrade fails, the error message SQL1704N is displayed describing the cause of the failure. For a list of possible solutions for each reason code, enter db2? SQL1704. One of the most common causes of upgrade failure is that there is not enough log file space available. In this case, the following error is returned: SQL1704N Database migration failed. Reason code "3". If the database upgrade succeeds but additional actions are required, the warning SQL1499W is displayed describing the cause of the failure. In this case, see the DB2 administration log /db2/ <DBSID>/db2dump/db2<dbsid>.nfy for more information. 28/64 PUBLIC 2013-01-10

3 Upgrading the Database Under Linux and UNIX 3.2 Upgrading the Instance and Database Upgrading the DB2 Runtime Client Instance for a Central and Dialog Instance For every application server that is not running on the database server and that is using the DB2 Runtime Client, you have to upgrade the DB2 Runtime Client instance. 1. Log on to the application server as user root. 2. Upgrade the DB2 Runtime Client using the following command: <DB2_SWDIR/instance/db2iupgrade db2<sapsid> If the upgrade of the DB2 Runtime Client is successful, the following message is displayed: Program db2iupgrade completed successfully Verifying the Database Upgrade (Optional) To verify the success of the database upgrade, you can test if a database activation succeeds by performing the following steps: 1. Log on to the database server as user db2<dbsid>. 2. Start the database manager using the following command: db2start 3. Activate the database using the following command: db2 activate database <SAPSID> After you activated the database, check the db2diag.log in /db2/<dbsid>/db2dump for possible problems. 4. Optional: Run the DB2 copy validation tool using the following command: db2val The DB2 copy validation tool verifies basic functions of a DB2 software installation and generates a report with its findings. Performing a Backup (Recommended) CAUTION We strongly recommend that you perform a full offline backup of the upgraded database. 2013-01-10 PUBLIC 29/64

This page is left blank for documents that are printed on both sides.

4 Upgrading the Database under Windows 4.1 Installation of the DB2 Software 4 Upgrading the Database under Windows Purpose The following sections describe the required steps for the database upgrade when your operating system is Windows 2003, Windows 2003 R2, Windows 2008, or Windows 2008 R2. RECOMMENDATION We recommend that you perform a full offline backup of your database before you install the DB2 10.1 software. Process Flow The database upgrade consists of the following steps that you must perform in the specified order: 1. You install the DB2 software [page 31]. 2. You upgrade the instance and the database in one step [page 43]. CAUTION After the database upgrade, you must perform a full backup of your database. 3. You perform post-upgrade activities [page 45]. 4.1 Installation of the DB2 Software The installation of the DB2 10.1 software consists of the following steps that you must perform in the specified order: You install the database software on the database server. [page 31] You update the database client software. [page 38] 4.1.1 Installing the Database Software on the Database Server The following section describes how you install the database software on the database server for Windows operating systems. CAUTION When you install DB2 10.1 on your Windows host, all existing instances of DB2 Version 9.5 or DB2 Version 9.7 are automatically upgraded to DB2 10.1. Therefore, you must upgrade all your databases to DB2 10.1 after you have installed the DB2 10.1 software. 2013-01-10 PUBLIC 31/64

4 Upgrading the Database under Windows 4.1 Installation of the DB2 Software CAUTION If you are running a partitioned DB2 database system, the DB2 10.1 software must be available in exactly the same directory on all database hosts. Therefore, we recommend that you install the software on a share that is accessible on all database hosts. Prerequisites Make sure that you check all DB2 instances with the db2ckupgrade program before installing the DB2 10.1 software as described in Running Program db2ckupgrade later in this section. Check that there is enough free disk space available. If there is not enough free space available, the upgrade of your DB2 database fails. You need to check the following: The system catalog tablespace SYSCATSPACE If SYSCATSPACE is not an AUTOEXTENT or an AUTOSTORAGE tablespace, you must ensure that at least half of the pages is free. To find out the number of used and free pages, use the following command in a DB2 command window: db2 LIST TABLESPACES SHOW DETAIL The temporary tablespace SAP systems use SMS-based temporary tablespaces. Make sure that the temporary tablespaces can grow to at least twice the size of SYSCATSPACE. The size of log space As a rough guideline, make sure that your log space is at least the same size as SYSCATSPACE. In addition, if you followed the parameter recommendations for the database parameters LOGFILSIZ, LOGPRIMARY and LOGSECOND as described in SAP Note 1692571, the database upgrade should run without problems. In a partitioned database environment, you only need to check the size of the log space on the catalog partition. For more information, see Increasing table space and log file sizes before upgrade in the IBM upgrade guide at https://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/ com.ibm.db2.luw.qb.upgrade.doc/doc/t0022269.html. Procedure Backing Up the DB2 Server Configuration (Recommended) During the upgrade, DB2 configuration parameters are changed automatically. To keep track of the changes, we recommend that you back up the DB2 server configuration before and after the upgrade. By comparing the files that contain the DB2 configuration settings after the database upgrade has finished, you can review the changes. DB2 is usually configured by setting the following: 32/64 PUBLIC 2013-01-10

4 Upgrading the Database under Windows 4.1 Installation of the DB2 Software Environment variables DB2 profile registry variables DB2 database manager configuration DB2 database configuration To back up the DB2 server configuration, proceed as follows: 1. Log on to the database server as user db2<dbsid> and open a DB2 command window. 2. Create a directory <config_bkp> where you store the configuration using a command such as the following: mkdir <drive>:\db2\db2<dbsid>\cfg_backup 3. Change to the newly created directory <config_bkp> using the following command: cd <drive>:\db2\db2<dbsid>\cfg_backup 4. Back up the database server configuration using the following commands: set > env_before_upg.txt db2set -all > reg_before_upg.txt db2 get dbm cfg > dbm_before_upg.txt db2 get db cfg for <SAPSID> > db_before_upg.txt After the database upgrade, you back up the database configuration again and compare the files that contain the configuration before and after the database upgrade. For more information, see Backing Up the DB2 Server Configuration After the Upgrade (Recommended) [page 46]. Running Program db2ckupgrade Before you install the DB2 10.1 software, run the program db2ckupgrade to make sure that you can upgrade all instances without problems. This is only a check and does not affect any of your databases. 1. Stop the SAP system, for example, using the SAP plug-in for the Microsoft Management Console (MMC). 2. Log on to the database server as user db2<dbsid> and open a DB2 command window. 3. Stop and restart the database manager using the following commands: db2stop force db2start 4. Change to the following directory: cd <CD_drive>\WINDOWS_AMD64\ESE\image\db2\Windows\utilities 5. Run the db2ckupgrade program using the following command: db2ckupgrade -e -l <A_WRITABLE_DIRECTORY>\upgrade.log <A_WRITABLE_DIRECTORY> can be any directory to which you have write access, for example: db2ckupgrade -e -l c:\temp\upgrade.log 2013-01-10 PUBLIC 33/64

4 Upgrading the Database under Windows 4.1 Installation of the DB2 Software 6. Check the file upgrade.log for errors. If no errors are found, the following message is displayed: Version of DB2CKUPGRADE being run: VERSION 10.1.... DBT5508I The db2ckupgrade utility completed successfully. The database or databases can be upgraded. Run db2ckupgrade on your database server for all DB2 instances. Installing the Software 1. Log on to the database server as follows: Upgrading from DB2 V9.5 to DB2 10.1 on Windows 2008 only: You must log on to the database server and install the DB2 software with the same user who installed the existing DB2 V9.5 software. To find out which user installed the DB2 software, look up the Windows registry key HKEY_LOCAL_MACHINE\SOFTWARE\IBM\DB2 \InstalledCopies\<copyname>\Elevated. In all other cases, log on to the database server as user <sapsid>adm. 2. Stop all your SAP systems and, if they are running, stop the DB2 services. Determine the software installation directory of the current DB2 instance by using the following command in a DB2 command window: db2level EXAMPLE The output contains the following line that indicates the installation directory of the DB2 software (<INSTDIR>): Product is installed at <INSTDIR> 3. Start the program for installing the DB2 database software using the following command: <DVD_drive>:\WINDOWS_X86_64\ESE\image\setup The Welcome screen of the DB2 Setup Launchpad appears. 4. In the navigation frame of the DB2 Setup Launchpad, choose Installation Prerequisites and check if your system meets all the prerequisites. 5. In the navigation frame of the DB2 Setup Launchpad, choose Install a Product and Work with Existing for the DB2 Enterprise Server Edition Version 10.1. By choosing Work with Existing you install the software and automatically upgrade all DB2 instances. The existing DB2 software is updated. CAUTION Do not choose DB2 Advanced Enterprise Server Edition. Do not choose Install New. 34/64 PUBLIC 2013-01-10

4 Upgrading the Database under Windows 4.1 Installation of the DB2 Software In this document, we only describe how to upgrade an existing DB2 copy. For SAP systems with SAP kernel version 7.00 SR3 and higher, it is technically possible to install a new DB2 copy. However, you have to upgrade the instance to the new copy afterwards. For more information, see Upgrading DB2 Version 9.5 or DB2 Version 9.7 instances in the IBM DB2 Information Center at https://publib.boulder.ibm.com/infocenter/db2luw/ v10r1/topic/com.ibm.db2.luw.qb.upgrade.doc/doc/t0007196.html. The screen Select the DB2 copy to work with appears. 6. Choose the DB2 copy with the installation path <INSTDIR> (see step 2) and choose Launch DB2 Setup wizard. Figure 5: Launch DB2 Setup wizard The wizard DB2 Setup DB2 Enterprise Server Edition appears. CAUTION The exact sequence of the installation steps that follow depends on various factors, for example, your operating system, already installed DB2 components, your installation choices, and the DB2 Fix Pack level. Therefore, we cannot provide a detailed step-by-step procedure for the DB2 software installation in this document. The following steps can appear, but not necessarily in the sequence shown below. They outline important points that you have to consider when installing DB2 in an SAP environment: If a warning appears that the upgrade will apply changes to your DB2 copy, confirm it and choose Next. 2013-01-10 PUBLIC 35/64

4 Upgrading the Database under Windows 4.1 Installation of the DB2 Software If you receive a warning that DB2 is currently running and locked by some processes, choose Yes to shut down these processes. Accept the license agreement and choose Next. On the screen Select the installation type, choose Typical and then Next. On the screen Select the installation, response file creation or both, choose Install DB2 Enterprise Server Edition on this computer and then Next. On the Installation folder screen, confirm the installation directory by choosing Next. On the Select the IBM SSH server installation folder and startup option screen, choose Do not autostart the SSH server and then Next. The IBM SSH server is only required by IBM Optim tools. On the screen Set the DB2 copy name, accept the proposed copy name and then choose Next. Figure 6: Set the DB2 Copy Name Screen On the screen Set user information for the default DB2 instance, enter the password and user name for user db2<dbsid> and then choose Next. 36/64 PUBLIC 2013-01-10

4 Upgrading the Database under Windows 4.1 Installation of the DB2 Software Figure 7: Set User Information for the Default DB2 Instance Screen If db2<dbsid> is a domain user, enter the correct name of the domain. If it is a local user, keep the default setting None use local user account. CAUTION Do not enter the local host name as a domain. If the screen Enable operating system security for DB2 objects appears, choose Enable operating system security and then Next. On the Start copying files screen, start the installation by choosing Install. If the installation has successfully finished, the Setup is Complete screen appears. To continue, choose Next. On the Install additional products screen, complete the installation by choosing Finish. If required, reboot the system. Checking the Availability of the DB2 Service Check that the DB2 service is running under user db2<dbsid>: 1. Choose Start Run. 2. Enter the following command: services.msc /s 3. Right-click DB2<DB2COPY>.<DB2INSTANCE>. 4. Choose Properties. 5. Choose Log on and check that this service is running under user db2<dbsid>. 2013-01-10 PUBLIC 37/64

4 Upgrading the Database under Windows 4.1 Installation of the DB2 Software Figure 8: Checking Availability of the DB2 Service 4.1.2 Updating the Database Client Software You can install the application server ABAP (AS ABAP) of an SAP system with two different DB2 clients: The DB2 Runtime Client (as of DB2 Version 9.5 also known as IBM Data Server Runtime Client) offers all the functions required to run applications that connect to a DB2 server. Besides the DB2 Command Line Processor (CLP), it contains no administration and configuration tools. The DB2 CLI Driver (also known as IBM DB2 Driver for ODBC and CLI or IBM Data Server Driver for ODBC and CLI) provides runtime support for applications using the ODBC or CLI API. The DB2 CLI Driver is a lightweight zero-installation driver that you can install on shared directories (for example, NFS shares). The setup of your SAP system determines which client is used most often. The application server Java (AS Java) always uses the Type-4 DB2 JDBC Driver (also known as IBM DB2 Driver for JDBC and SQLJ or IBM Data Server Driver for JDBC and SQLJ). SAP Releases Based on SAP Basis 7.0 All SAP systems that were installed with DB2 UDB Version 8 run with the DB2 Runtime Client. All SAP systems that are installed with DB2 Version 9.1 can run with either the DB2 Runtime Client or the DB2 CLI driver, which was introduced with DB2 Version 9.1. 38/64 PUBLIC 2013-01-10

4 Upgrading the Database under Windows 4.1 Installation of the DB2 Software The type of DB2 client used in your system depends on whether you want to upgrade the database of a newly installed system, an upgraded system, or whether you have manually switched to the new DB2 client connectivity (according to SAP Note 1091801). Therefore, before the upgrade, you must determine which type of DB2 client [page 39] is used in your system and update it accordingly. SAP Releases Based on SAP Basis 7.10 and Higher All SAP systems based on SAP Basis 7.10 are always installed with the new DB2 client connectivity. You only have to update the DB2 CLI driver [page 41]. Graphical Overview The following figure provides a graphical overview of the steps that you have to perform, for example, on an AS ABAP: Figure 9: Upgrading the Client Connectivity in an SAP ABAP System 4.1.2.1 Determining the DB2 Client Type Used by the System To explicitly determine which DB2 client type (DB2 Runtime Client or DB2 CLI driver) is used, you can use R3trans: Procedure 1. Log on to the application server where you want to check the DB2 client type as user <sapsid>adm and open a command prompt window. 2. Enter the following command: R3trans -x 2013-01-10 PUBLIC 39/64