Upgrading to Version 9.7 of IBM DB2 for Linux, UNIX, and Windows
-
Upload
kpfitzgerald -
Category
Documents
-
view
291 -
download
5
Transcript of Upgrading to Version 9.7 of IBM DB2 for Linux, UNIX, and Windows
Database Upgrade GuideUpgrading to Version 9.7 of IBM DB2 for Linux, UNIX, and Windows
Target Audience ■ Technical Consultants ■ System Administrators
PUBLICDocument version: 1.0 – 2009-08-18
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 2009-08-18 Initial version
2/70 PUBLIC 2009-08-18
Table of Contents
Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1 New Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Chapter 2 Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1 Upgrade Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2 Upgrade Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3 Deprecated Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.4 Upgrading the Database in Special Environments . . . . . . . . . . . . . . . . . . . . . . 16
Chapter 3 Upgrading the Database Under Linux and UNIX . . . . . . . . . . . . . . . . . . . 19
3.1 Installation of the DB2 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.1.1 Installing the Database Software on the Database Server . . . . . . . . . . . . . . . . . 19
3.1.2 Updating the Database Client Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.1.2.1 Determining the DB2 Client Type Used by the System . . . . . . . . . . . . . . . . . . 25
3.1.2.2 Updating the DB2 Runtime Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.1.2.3 Updating the DB2 CLI Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.1.2.4 Updating the JDBC Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.2 Upgrading the Instance and Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Chapter 4 Upgrading the Database under Windows . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.1 Installation of the DB2 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.1.1 Installing the Database Software on the Database Server . . . . . . . . . . . . . . . . . 35
4.1.2 Updating the Database Client Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.1.2.1 Determining the DB2 Client Type Used by the System . . . . . . . . . . . . . . . . . . 44
4.1.2.2 Updating the DB2 Runtime Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.1.2.3 Updating the DB2 CLI Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.1.2.4 Updating the JDBC Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.2 Upgrading the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Chapter 5 Post-Upgrade Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.1 Running the db6_update_db Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2009-08-18 PUBLIC 3/70
5.2 Backing Up the DB2 Server Configuration After the Upgrade
(Recommended) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
5.3 Installing the DB2 License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.4 Checking Configuration Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.5 Removing the Database Administration Server (Optional) . . . . . . . . . . . . . . . 54
5.6 Updating Data Extractors in SAP Solution Manager (Optional) . . . . . . . . . . . . 55
Chapter 6 Enabling New Database Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
6.1 Larger Record Identifiers (RIDs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
6.2 Row Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
6.3 Index Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
6.4 Tablespaces with Reclaimable Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.5 Inline LOBs and LONG VARCHAR Replacement . . . . . . . . . . . . . . . . . . . . . . 63
6.6 Enabling Multiple Database Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
4/70 PUBLIC 2009-08-18
1 Introduction
Purpose
This document explains how you upgrade your database to Version 9.7 of DB2 for Linux, UNIX, and
Windows when your database is DB2 UDB for UNIX and Windows Version 8, DB2 Version 9.1, or DB2
Version 9.5 for Linux, UNIX, and Windows. It contains specific information and recommendations for
SAP system environments.
For more information about the upgrade to DB2 9.7 for Linux, UNIX, and Windows, see Upgrade to DB2
Version 9.7 in the IBM DB2 Information Center at:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic= /
com.ibm.db2.luw.qb.upgrade.doc/doc/c0023662.html
NOTE
■ Before you start the database upgrade, make sure that you read SAP Note 1332109. 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 9.7, see also SAP Note 1346902.
Upgrade Process
To upgrade the database to DB2 9.7, you perform the following steps:
1. You plan the upgrade and check the requirements.
2. You install the database software of DB2 9.7.
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
NOTE
Important Terminology Change
With DB2 9.7, IBM has replaced the term migrate with upgrade. This change is not only reflected in
the IBM and SAP documentation, but also in the commands and tools that are used to upgrade
a DB2 database from an earlier version to DB2 9.7. Due to this terminology change, this document
has been renamed to Upgrading to Version 9.7 of IBM DB2 for Linux, UNIX, and Windows. Prior versions
of this document, however, use the term migrate in their title, for example, Migrating to Version 9.5
of IBM DB2 for Linux, UNIX, and Windows.
1 Introduction
2009-08-18 PUBLIC 5/70
Database Terminology
Database Version Short Name
IBM DB2 9.7 for Linux, UNIX, and Windows DB2 9.7
IBM DB2 Version 9.5 for Linux, UNIX, and Windows DB2 Version 9.5
IBM DB2 Version 9.1 for Linux, UNIX, and Windows DB2 Version 9.1
IBM DB2 Version 8 Universal Database for UNIX and Windows DB2 UDB Version 8
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 Description
<SAPSID> SAP system ID in upper case
<sapsid> SAP system ID in lower case
<DBSID> Database name in upper case
<dbsid> Database name in lower case
NOTE
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 9.7
NOTE
To benefit from some of the features that are mentioned in the following, you must perform
additional tasks as described in Post-Upgrade Activities [page 51].
For more information about the support of new features of DB2 9.7 in your SAP system release,
see SAP Note 1351160.
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
1 Introduction
1.1 New Features
6/70 PUBLIC 2009-08-18
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
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.
New Features of DB2 Version 9.1 and DB2 Version 9.5
For information about the support of new features of DB2 Version 9.5 in your SAP system release, see
SAP Note 1089578 and the document Migration to Version 9.5 of IBM DB2 for Linux, UNIX, and Windows at:
http://service.sap.com/instguides Database Upgrades DB2 UDB
For more information about the support of new features of DB2 Version 9.1 in your SAP system release,
see SAP Note 930487.
New Features of DB2 Version 9.1 Relevant for the Upgrade Process
Multiple DB2 Copies on One Host
Up to DB2 UDB for UNIX and Windows Version 8, the installation path for the database software on
each operating system was fixed. For example, on Linux, the DB2 installation path was /opt/IBM/db2/
V8.1.
1 Introduction
1.1 New Features
2009-08-18 PUBLIC 7/70
As of DB2 Version 9.1, you can have multiple DB2 copies on one physical machine. The database
installations are independent of each other and can have different Fix Pack levels as well as different
configuration settings.
The following figure shows an example of the installation of the database software on UNIX:
Figure 1: Multiple DB2 Copies
On Linux and UNIX, multiple DB2 copies - independent of your SAP system release - on one physical
machine are supported with DB2 Version 9.1. For current SAP NetWeaver releases, the SAP installation
tool installs the database software for new SAP system installations by default in the home directory of
the instance owner /db2/db2<dbsid>/db2_software.
During the database upgrade, you have to specify the installation path for the DB2 software. If you
want to install multiple DB2 copies on one database host, consider installing the software in the home
directory of the instance owner.
Otherwise, you can use the previous installation path:
Operating System Path
Linux, Solaris, HP-UX /opt/IBM/db2
AIX /usr/opt/IBM/db2
On Windows, the installation of multiple instances on one host is not supported up to and including
SAP NetWeaver 7.0 SR3. Although you can technically install a separate copy of DB2 Version 9.1 and
upgrade your DB2 instance and database to that copy, SAP kernel releases lower than 7.00 are not able
to run with multiple copies and therefore fail to start.
1 Introduction
1.1 New Features
8/70 PUBLIC 2009-08-18
NOTE
Running multiple DB2 copies on Windows in an SAP environment is supported for future releases
of SAP NetWeaver.
New Features of DB2 Version 9.1 Requiring Additional Activities
NOTE
To benefit from the following new features of DB2 Version 9.1, you must perform additional tasks.
For more information, see Post-Upgrade Activities [page 51].
Large Record Identifiers (RIDs)
Up to Version 8 of DB2, there was a table size limit of 64 GB for each table in a 4 KB tablespace. This
table size limit doubled for each supported tablespace page size up to 32 KB.
DB2 Version 9.1 overcomes this limit by introducing larger record identifiers (RIDs). RIDs are used by
the database manager to find data pages that contain the requested record. By extending these RIDs
from 3 to 4 bytes, tables can grow in DB2 9.7 up to 64 TB.
To enable this feature, you must convert all tablespaces to data type LARGE as a post-upgrade activity.
All new tables that are created in these tablespaces automatically use large RIDs.
As an optional step, you can upgrade existing tables to use large RIDs. This includes a reorganization
of all indexes of the table or a complete table reorganization. For more information, see Larger Record
Identifiers (RIDs) [page 58].
Row Compression
Row compression uses a dictionary-based compression algorithm to shorten the data in a table row.
Row compression can be enabled on single table basis and can result in considerable disk space savings.
1 Introduction
1.1 New Features
2009-08-18 PUBLIC 9/70
This page is left blank for documents that are printed on both sides.
2 Planning
2.1 Upgrade Restrictions
The following restrictions apply to the upgrade to DB2 9.7:
■ Operating system-related restrictions
■ Database-related restrictions
■ SAP system-related restrictions
Operating System-Related Restrictions
■ The upgrade to DB2 9.7 is not supported on any 32-bit operating system.
■ You cannot upgrade your database to DB2 9.7 on the following 64-bit operating system platforms
because they are no longer supported as of DB2 Version 9.5:
● HP-UX on PA-RISC
● Linux on IA64
● Windows on IA64
NOTE
For a list of supported operating systems, see Upgrade Requirements [page 12].
■ 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
■ A direct upgrade to DB2 9.7 is only supported if your database is at least DB2 UDB Version 8, FixPak
9. The upgrade from DB2 UDB Version 8, FixPak 8 or lower is not supported.
NOTE
If you are running DB2 UDB Version 8 with a FixPak 8 or lower, you first have to apply FixPak
9 (DB2 UDB Version 8 with FixPak 9 is also referred to as DB2 UDB Version 8.2.2).
■ If you are running DB2 UDB for UNIX and Windows Version 7 or lower, you first have to upgrade
the database to DB2 UDB for UNIX and Windows Version 8 as described in Migration to Version 8 of
the IBM DB2 Universal Database for UNIX and Windows at:
http://service.sap.com/instguides Database Upgrades DB2 UDB
CAUTION
You must perform all steps as outlined in this document. Otherwise, your system will not
work correctly.
2 Planning
2.1 Upgrade Restrictions
2009-08-18 PUBLIC 11/70
SAP System-Related Restrictions
■ The SAP DB2 Admin Tools for log file management are not supported with DB2 9.7. If you start
the upgrade from DB2 UDB Version 8 and you are still using these tools, you must also upgrade
the ADMIN<DBSID> database that was used by these tools.
CAUTION
The upgrade of the SAP DB2 Admin Tools is not described in this document but in the Database
Administration Guide: SAP on IBM DB2 for Linux, UNIX, and Windows, which is available at:
http://service.sap.com/instguidesnw70 Operations Database-Specific Guides
■ DB2 9.7 is not supported for SAP systems with releases lower than 4.6x.
More Information
For more information, see Upgrade Restrictions for DB2 Servers in the IBM DB2 Information Center at:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?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
■ SAP system-specific requirements
■ Space requirements
■ Other requirements
Operating System Requirements
■ The upgrade to DB2 9.7 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
NOTE
Make sure that your operating system fulfills all prerequisites for the installation of DB2 9.7.
For more information, see Installation Requirements for DB2 Database Products in the IBM DB2
Information Center at:
https://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/
com.ibm.db2.luw.qb.server.doc /doc/r0025127.html
2 Planning
2.2 Upgrade Requirements
12/70 PUBLIC 2009-08-18
■ AIX only
DB2 9.7 uses asynchronous I/O. On AIX, you must install and configure I/O completion ports
(IOCP). For more information, see Configuring IOCP on AIX in the IBM DB2 Information Center at:
https://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/
com.ibm.db2.luw.admin.perf.doc /doc/t0054518.html
■ You must convert 32-bit instances to 64-bit instances before the database upgrade. To check that
your system is running on a 64-bit DB2 instance, proceed as follows:
1. Log on to the database server as user db2<dbsid>.
2. Enter the following command:
db2level
For more information about the conversion, see SAP Note 356828.
■ 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/v9r7/topic/
com.ibm.db2.luw.qb.upgrade.doc /doc/t0022273.html
SAP System-Specific Requirements
■ Make sure that you have applied the correct SAP kernel patch before you start the database upgrade.
For SAP systems with release 4.6x and higher, a specific version of the database shared library (DBSL)
dbdb6slib is required.
The following table shows the minimal DBSL version that is required for your SAP system release:
SAP Kernel Release DBSL Patch Level
4.6D 2459
6.40 282
7.00 206
7.01 42
7.10 152
7.11 38
NOTE
For SAP releases higher than the one 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:
2 Planning
2.2 Upgrade Requirements
2009-08-18 PUBLIC 13/70
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.
■ The following SAP tools for DB2 require a specific patch level to be able to work with DB2 9.7:
ToolSAP Kernel Release 4.6D — 6.40:Patch Level
SAP Kernel Release 7.00 and Higher:Patch Level
db6pmudf 15 15
dmdb6bkp 14 14
dmdb6rdi 23 n/a
dmdb6srp 27 n/a
dmdb6rts 16 n/a
brdb6brt 23 23
For more information about how to download and apply the latest kernel patch for these tools,
see SAP Note 19466.
■ If you are upgrading from DB2 UDB Version 8 and you want to use the SAP EXPLAIN function
with DB2 9.7, your SAP system requires a specific support package level. For more information, see
SAP Note 919763.
■ For certain reasons, the type mapping of some specific ABAP dictionary types to database types has
changed in SAP releases starting with 7.00. To ensure that the database object check of the ABAP
dictionary can deal with this change, a certain Support Package level is needed for SAP releases
7.00, 7.01, 7.10 and 7.11. Alternatively, you can apply the correction instructions of SAP Note
1354186. For more information, see Inline LOBs and LONG VARCHAR Replacement [page 63]
.
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 are 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.
2 Planning
2.2 Upgrade Requirements
14/70 PUBLIC 2009-08-18
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 584952, 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)
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/v9r7/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.
■ 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 9.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 9.7
additionally provides the db2IdentifyType1 command. This command is available after the DB2
9.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/v9r7/topic/
com.ibm.db2.luw.qb.upgrade.doc /doc/t0050553.html
■ For the latest additions and corrections to this document, see SAP Note 1332109.
2.3 Deprecated Functionality
The DB2 Control Center tools and the database administration server (DAS) have been deprecated in
DB2 9.7. You can still use them, but they are likely to be removed in a future DB2 release. For more
2 Planning
2.3 Deprecated Functionality
2009-08-18 PUBLIC 15/70
information, see Control Center tools and DB2 administration server (DAS) have been deprecated in the IBM DB2
Information Center at:
https://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.wn.doc /
doc/i0054250.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.
NOTE
A database administration server (DAS) is automatically created during the installation of the DB2
9.7 software. If you do not plan to use the DB2 Control Center in DB2 9.7, remove the DAS after
the database upgrade as described in Removing the Database Administration Server (Optional) [page 54].
2.4 Upgrading the Database in Special Environments
This section provides information about 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 9.7 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/v9r7/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 9.7 in a Microsoft Cluster environment, you have to install a new
copy of DB2 9.7 on all cluster nodes and upgrade the instance and the database manually. For more
information, see Upgrading DB2 Servers in MSCS Environments in the IBM DB2 Information Center at:
https://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/
com.ibm.db2.luw.qb.upgrade.doc/ doc/t0022647.html
2 Planning
2.4 Upgrading the Database in Special Environments
16/70 PUBLIC 2009-08-18
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 at:
https://service.sap.com/installnw70 Installation – SAP NetWeaver Systems
2 Planning
2.4 Upgrading the Database in Special Environments
2009-08-18 PUBLIC 17/70
This page is left blank for documents that are printed on both sides.
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 19].
2. You upgrade the instance and the database [page 30].
3. You perform post-upgrade activities [page 51].
3.1 Installation of the DB2 Software
The installation of the DB2 9.7 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 19].
2. You update the database client software [page 23].
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 9.7 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 the DISPLAY variable is set correctly.
2. Insert and mount the database DVD to <DVD_mount> and enter the following command, depending
on your operating system and processor architecture:
3 Upgrading the Database Under Linux and UNIX
3.1 Installation of the DB2 Software
2009-08-18 PUBLIC 19/70
Operating System Command
HP-UX (Itanium) /<DVD_mount>/HPIA64/ESE/disk1/db2setup
AIX /<DVD_mount>/AIX_64/ESE/disk1/db2setup
Linux (PowerPC) /<DVD_mount>/LINUXPPC64_64/ESE/disk1/db2setup
Linux x86_64 (AMD64) /<DVD_mount>/LINUXX86_64/ESE/disk1/db2setup
Solaris SPARC /<DVD_mount>/SUNOS_64/ESE/disk1/db2setup
Solaris x64 /<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 Installation Prerequisites and check if all
operating system requirements are met.
Figure 2: Installation Prerequisites
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:
3 Upgrading the Database Under Linux and UNIX
3.1 Installation of the DB2 Software
20/70 PUBLIC 2009-08-18
Figure 3: Install a Product
5. Choose Install New under DB2 Enterprise Server Edition Version 9.7.
The screen DB2 Setup – DB2 Enterprise Server Edition Version 9.7 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:
■ On the Introduction part of the screen DB2 Setup – DB2 Enterprise Server Edition Version 9.7, 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 Version
9.7 on this computer ... and then Next.
■ On the screen Select the installation directory, enter the Installation Directory and choose Next.
3 Upgrading the Database Under Linux and UNIX
3.1 Installation of the DB2 Software
2009-08-18 PUBLIC 21/70
Figure 4: Installation Directory
CAUTION
The default installation paths for Linux and AIX are as follows:
● Linux: /opt/ibm/db2/V9.7
Note that on Linux ’ibm’ is now in lower case.
● AIX, HP-UX, and Solaris: /opt/IBM/db2/V9.7
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 9.7 in the current instance directory of your DB2 instance (/db2/
db2<dbsid>/sqllib) and below.
■ AIX, Solaris SPARC, and Linux platforms only
Decide if you want to install the System Automation for Multiplatforms (SA MP) base component and choose
Next.
SA MP is a cluster management software used in high availability (HA) environments. If you install
the SA MP base component, additional prerequisites are checked.
3 Upgrading the Database Under Linux and UNIX
3.1 Installation of the DB2 Software
22/70 PUBLIC 2009-08-18
Figure 5: SA MP
NOTE
To start the prerequisite check for SA MP before starting the DB2 installation, proceed as
follows:
1. Change to the following directory:
<DVD_mount>/<platform>/ESE/disk1/db2/<os>/tsamp
2. Run the prerequisite check manually using the following command:
./prereqSAM
■ On the Instance Setup screen, choose Do not create a DB2 instance and then Next.
■ 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
3 Upgrading the Database Under Linux and UNIX
3.1 Installation of the DB2 Software
2009-08-18 PUBLIC 23/70
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.
NOTE
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 Lower than SAP Basis 7.0
All SAP systems that were installed with DB2 UDB Version 8 and all SAP systems that were installed
with an SAP basis release lower than 7.0 are deployed with a local DB2 client instance (the DB2 Runtime
Client) on each standalone SAP application server. For these application servers, you have to update
the DB2 Runtime Client separately.
NOTE
If you only have one application server and it is running on the database host, the DB2 Runtime
Client of the database instance is used and a separate update is not required.
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 25] 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 27].
Graphical Overview
The following figure provides a graphical overview of the steps that you have to perform on an AS
ABAP:
3 Upgrading the Database Under Linux and UNIX
3.1 Installation of the DB2 Software
24/70 PUBLIC 2009-08-18
Figure 6: 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 search for the term DB2 library.
EXAMPLE
If the DB2 CLI driver is used, the output 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 looks as follows:
3 Upgrading the Database Under Linux and UNIX
3.1 Installation of the DB2 Software
2009-08-18 PUBLIC 25/70
...
4 ETW000 [dev trc ,00000] DB2 library successfully loaded DB2 library '/db2/
db2<dbsid>/sqllib/lib/libdb2.so' successfully loaded
...
NOTE
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).
Result
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 26]
■ Updating the DB2 CLI Driver Client [page 27]
■ Updating the JDBC Driver [page 27]
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 9.7 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 19]. However, make sure that you choose IBM Data Server Runtime Client
Version 9.7 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.
3 Upgrading the Database Under Linux and UNIX
3.1 Installation of the DB2 Software
26/70 PUBLIC 2009-08-18
NOTE
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 30].
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 V9.7 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, see Updating the JDBC Driver [page 27].
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
3. Determine the location of the JDBC driver using the following command:
3 Upgrading the Database Under Linux and UNIX
3.1 Installation of the DB2 Software
2009-08-18 PUBLIC 27/70
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 UDB Version 8, this link points to the following directory: /opt/IBM/db2/
V8.1/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.
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.
3 Upgrading the Database Under Linux and UNIX
3.1 Installation of the DB2 Software
28/70 PUBLIC 2009-08-18
Update the JDBC driver according to one of the following scenarios:
Scenario Required Action
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.
No further action required
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.
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.
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.
Run the db6_update_client.sh script as described in Updating the DB2 CLI Driver Client [page 27].
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 Required Action
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.
Update the DB2 Runtime Client as described in Updating the DB2 Runtime Client [page 26].
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.
Run the script db6_update_client.sh as described in Updating the DB2 CLI Driver [page 27].
The JDBC driver is used from any other location. Update the JDBC driver files (db2jcc.jar and db2jcc_license_cu.jar) manually as follows:1. Mount the DVDDB2 9.7 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>
NOTE
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 Upgrading the Database Under Linux and UNIX
3.1 Installation of the DB2 Software
2009-08-18 PUBLIC 29/70
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).
NOTE
In the following procedures, replace <DB2_SWDIR> with your software installation directory for
DB2 9.7.
Prerequisites
■ Before the database upgrade to DB2 9.7, you must have performed a full 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,
LOGPRIMARY and LOGSECOND (for more information, see SAP Note 584952), the upgrade should
run without problems.
NOTE
In a partitioned database environment, you only need to check the size of the log space
on the catalog partition.
3 Upgrading the Database Under Linux and UNIX
3.2 Upgrading the Instance and Database
30/70 PUBLIC 2009-08-18
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/ v9r7/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_mig.txt
db2set -all > reg_before_mig.txt
db2 get dbm cfg > dbm_before_mig.txt
db2 get db cfg for <SAPSID> > db_before_mig.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 52].
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.
You can start db2ckupgrade manually before the upgrade.
NOTE
This is only a check and does not affect your database.
3 Upgrading the Database Under Linux and UNIX
3.2 Upgrading the Instance and Database
2009-08-18 PUBLIC 31/70
NOTE
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 9.7.
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>
NOTE
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_v81
■ ~db2<dbsid>/sqllib_v91
3 Upgrading the Database Under Linux and UNIX
3.2 Upgrading the Instance and Database
32/70 PUBLIC 2009-08-18
■ ~db2<dbsid>/sqllib_v95
The files are then adapted in the ~db2<dbsid>/sqllib directory.
During the instance upgrade, the database manager configuration of DB2 9.7 is merged with the
settings of the database manager configuration of DB2 UDB Version 8, DB2 Version 9.1, or DB2
Version 9.5.
Upgrading the DB2 Administration Server (Optional)
The DB2 administration server (DAS) is used by the DB2 graphical client tools, for example, the DB2
Control Center. If you are using these tools, you have to upgrade the DAS as follows:
1. Log on to the database server as user root.
2. Upgrade the DAS using the following command:
<DB2_SWDIR>/instance/dasmigr
Upgrading the DB2 Database
Since the DB2 system catalog has been changed with DB2 Version 9.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.
NOTE
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".
NOTE
If the database upgrade succeeds but additional actions are required, the new 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.
3 Upgrading the Database Under Linux and UNIX
3.2 Upgrading the Instance and Database
2009-08-18 PUBLIC 33/70
CAUTION
If the database upgrade returns the warning message SQL1243W, you need to drop or rename the
table SYSTOOLS.DB2LOOK_INFO. Otherwise, the statements ALTER TABLE and COPY SCHEMA fail to
run. To drop the table, enter the following command on the command line:
db2 DROP TABLE SYSTOOLS.DB2LOOK_INFO
Upgrading the DB2 Runtime Client Instance for a Central and Dialog Instance
NOTE
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 <sapsid>adm.
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.
Performing a Backup (Recommended)
We strongly recommend that you perform a full offline backup of the upgraded database.
3 Upgrading the Database Under Linux and UNIX
3.2 Upgrading the Instance and Database
34/70 PUBLIC 2009-08-18
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 or Windows 2008.
RECOMMENDATION
We recommend that you perform a full backup of your database before you install the DB2 9.7
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 35].
2. You upgrade the instance and the database in one step [page 47].
CAUTION
After the database upgrade, you must perform a full backup of your database.
3. You perform post-upgrade activities [page 51].
4.1 Installation of the DB2 Software
The installation of the DB2 9.7 software consists of the following steps that you must perform in the
specified order:
■ You install the database software on the database server. [page 35]
■ You update the database client software. [page 42]
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 9.7 on your Windows host, all existing instances of DB2 UDB Version 8,
DB2 Version 9.1, or DB2 Version 9.5 are automatically upgraded to DB2 9.7. Therefore, you must
upgrade all your databases to DB2 9.7 after you have installed the DB2 9.7 software.
4 Upgrading the Database under Windows
4.1 Installation of the DB2 Software
2009-08-18 PUBLIC 35/70
CAUTION
If you are running a partitioned DB2 database system, the DB2 9.7 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 9.7 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 asSYSCATSPACE.
In addition, if you followed the parameter recommendations for the database parameters
LOGFILSIZ, LOGPRIMARY and LOGSECOND as described in SAP Note 584952, the database upgrade
should run without problems.
NOTE
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 upgrade guide at:
https://publib.boulder.ibm.com/infocenter/db2luw/v9r7/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:
4 Upgrading the Database under Windows
4.1 Installation of the DB2 Software
36/70 PUBLIC 2009-08-18
■ 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_mig.txt
db2set -all > reg_before_mig.txt
db2 get dbm cfg > dbm_before_mig.txt
db2 get db cfg for <SAPSID> > db_before_mig.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 52].
Running Program db2ckupgrade
Before you install the DB2 9.7 software, run the program db2ckupgrade to make sure that you can
upgrade all instances without problems.
NOTE
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>\migration.log
<A_WRITABLE_DIRECTORY> can be any directory to which you have write access, for example:
db2ckupgrade -e -l c:\temp\migration.log
4 Upgrading the Database under Windows
4.1 Installation of the DB2 Software
2009-08-18 PUBLIC 37/70
NOTE
If you see the error message The system cannot execute the specified program., you
need to install the Microsoft Visual C runtime before starting the program db2ckupgrade.
For more information about how to install the runtime, see the relevant IBM Web page at:
http://www.ibm.com/support/docview.wss?rs=71&uid=swg21240661
6. Check the database upgrade log for errors. If no errors are found, you only find the version
information in this file:
Version of DB2CKUPGRADE being run: VERSION 9.7.
In addition, the following message is displayed:
db2ckupgrade was successful. Database(s) can be migrated.
NOTE
Run db2ckupgrade on your database server for all DB2 instances.
Installing the Software
1. Log on the database server as follows:
■ Upgrading DB2 V9.5 to DB2 9.7 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 9.7.
4 Upgrading the Database under Windows
4.1 Installation of the DB2 Software
38/70 PUBLIC 2009-08-18
NOTE
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 Install New.
In this document, we only describe how to upgrade an existing DB2 copy. SAP kernel versions
lower than 7.00 only work correctly with the DB2 default 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 Instances in the IBM DB2 Information Center
at:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/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 7: 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.
4 Upgrading the Database under Windows
4.1 Installation of the DB2 Software
2009-08-18 PUBLIC 39/70
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.
NOTE
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 screen Set the DB2 copy name, accept the proposed copy name and then choose Next.
Figure 8: 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.
4 Upgrading the Database under Windows
4.1 Installation of the DB2 Software
40/70 PUBLIC 2009-08-18
Figure 9: Set User Information for the Default DB2 Instance Screen
NOTE
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.
■ If the DB2 First Steps application is started, leave the application by choosing Exit.
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.
4 Upgrading the Database under Windows
4.1 Installation of the DB2 Software
2009-08-18 PUBLIC 41/70
5. Choose Log on and check that this service is running under user db2<dbsid>.
Figure 10: 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.
NOTE
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 Lower than SAP Basis 7.0
All SAP systems that were installed with DB2 UDB Version 8 and all SAP systems that were installed
with an SAP Basis release lower than 7.0 are deployed with a local DB2 client instance (the DB2 Runtime
4 Upgrading the Database under Windows
4.1 Installation of the DB2 Software
42/70 PUBLIC 2009-08-18
Client) on each standalone SAP application server. For these application servers, you have to update
the DB2 Runtime Client separately.
NOTE
If you only have one application server and it is running on the database host, the DB2 Runtime
Client of the database instance is used and a separate update is not required.
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.
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 44] 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 45].
Graphical Overview
The following figure provides a graphical overview of the steps that you have to perform, for example,
on an AS ABAP:
Figure 11: Upgrading the Client Connectivity in an SAP ABAP System
4 Upgrading the Database under Windows
4.1 Installation of the DB2 Software
2009-08-18 PUBLIC 43/70
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
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 search for the term DB2 library.
EXAMPLE
If the DB2 CLI driver is used, the output looks as follows:
...
4 ETW000 [dev trc ,00000] DB2 library successfully loaded DB2 library
'\\<host>\sapmnt\<SAPSID>\SYS\global\db6\<platform>\db6_clidriver\bin
\db2app64.dll' successfully loaded
...
4 ETW000 [dev trc ,00000] Running with CLI driver 87 3.036995
...
If the DB2 Runtime Client is used, the output looks as follows:
...
4 ETW000 [dev trc ,00000] DB2 library successfully loaded DB2 library 'C:
\Program\Files\IBM\SQLLIB\bin\db2app64.dll' successfully loaded
...
NOTE
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 <drive>:\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.
4 Upgrading the Database under Windows
4.1 Installation of the DB2 Software
44/70 PUBLIC 2009-08-18
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).
Result
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 45]
■ Updating the DB2 CLI Driver Client [page 45]
■ Updating the JDBC Driver [page 46]
4.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.
NOTE
This section describes how you install the DB2 9.7 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 35], but you must make sure that you choose IBM Data Server Client Version
9.7 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.
4.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 <drive>:\usr\sap\<SAPSID>\SYS\global\db6.
Each application server can access this directory. Therefore, after the DB2 CLI driver has been updated,
<drive>:\usr\sap\<SAPSID>\SYS\global\db6 can be used by all application servers.
Procedure
1. Log on to the database server as user <sapsid>adm.
2. Mount the DVD DB2 V9.7 LUW CLI/JDBC–Driver.
3. Open the DB2 command window and switch to the directory
<drive>:\<mount_DVD_Dir>\CLIENT.
4. For an ABAP or an ABAP+Java system, start the db6_update_client.bat script using the following
command:
db6_update_client.bat -u
4 Upgrading the Database under Windows
4.1 Installation of the DB2 Software
2009-08-18 PUBLIC 45/70
For a Java-only system, use the following command to update only the JDBC driver:
./db6_update_client.bat -j
For more information, see Updating the JDBC Driver [page 45].
Result
The new version of the DB2 CLI driver is automatically used after the next SAP system restart and no
further action is required.
4.1.2.4 Updating the JDBC Driver
The following section describes how you update the JDBC driver.
CAUTION
The following section only applies to standalone Java-only application servers (that is, the
application server does not reside on the database host).
If you are upgrading an ABAP+Java system or a Java-only central system (that is, the
application server and the database reside on the same host), you do not have to perform any of
the steps described in this section.
Prerequisites
On application servers that only contain a Java stack, the location of the JDBC driver can vary, which
means that the appropriate steps to update it can also vary. Therefore, 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 relevant application server as user <sapsid>adm.
2. Open a command prompt and change to the directory ..\cluster\bootstrap of the Java instance
using the following command:
cd <drive>:\usr\sap\<DBSID>\>\DVEBMGS<instance-nr>\j2ee\cluster\bootstrap
3. Determine the location of the JDBC driver using the following command:
find "driver" bootstrap.properties
The value of this property of the rdbms.driverLocation is returned. It contains the location of
the JDBC driver files that are currently used.
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 <drive>:\usr\sap\<SAPSID>\SYS\profile
3. Enter the following command:
4 Upgrading the Database under Windows
4.1 Installation of the DB2 Software
46/70 PUBLIC 2009-08-18
find dbdriver <instance_profile>
The path to the JDBC driver files is returned.
Procedure
Updating the JDBC Driver (if Necessary)
Depending on the location, you have to update the JDBC driver according to one of the following
scenarios:
Scenario Required Action
The JDBC driver is taken from a DB2 Runtime Client instance. In this case, the directory retrieved using the procedure above is <drive>:\db2\db2<dbsid>\sqllib\java.
Update the DB2 Runtime Client as described in Updating the DB2 Runtime Client [page 45].
The JDBC driver is taken from either <drive>:\usr\sap\<SAPSID>\SYS\global\db6 or from a copy of this driver in the local instance exe directory DIR_EXECUTABLE=<drive>:\usr\sap\<SAPSID>\
DVEBMGS00\exe.
Run the script db6_update_client.sh as described in Updating the DB2 CLI Driver Client [page 45].
The JDBC driver is used from any other location. Update the JDBC driver files (db2jcc.jar and db2jcc_license_cu.jar) manually as follows:1. Mount the DVD DB2 9.7 LUW CLI/JDBC-Driver
to directory <drive>:\<client_dvd_mount>2. As user <sapsid>adm, copy the JDBC driver to
the destination directory using the following command:copy <client_dvd_drive>:\CLIENT\jdbc\*
<rdbms.driverLocation_dir>
CAUTION
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.
4.2 Upgrading the Database
Since the DB2 system catalog has been changed, you have to upgrade the DB2 database. Make sure that
you perform all steps in the sequence given:
1. You upgrade the DB2 database.
2. You upgrade the DB2 Runtime Client instance for a central and dialog instance.
3. If required, you upgrade the DB2 Administration Server.
4. You verify if the database has been successfully upgraded (optional).
5. You perform a backup (recommended).
4 Upgrading the Database under Windows
4.2 Upgrading the Database
2009-08-18 PUBLIC 47/70
CAUTION
In a partitioned database environment, perform the database upgrade on the catalog database
partition server.
NOTE
You need to upgrade all DB2 databases that are located on your computer.
Procedure
Upgrading the DB2 Database
1. Log on to the database server as user db2<dbsid>.
2. Open a DB2 command window and enter the following commands:
db2stop force
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 ABAP 7.0, the database upgrade takes approximately 10 to 30 minutes. If the database upgrade
completed successfully, the following message is displayed:
DB20000I The UPGRADE DATABASE command completed successfully.
NOTE
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".
NOTE
If the database upgrade succeeds but additional actions are required, the new warning SQL1499W
is displayed describing the cause of the failure. In this case, see the DB2 administration log messages
that are written to the Windows Event Log for more information.
CAUTION
If the database upgrade returns the warning message SQL1243W, you need to drop or rename the
table SYSTOOLS.DB2LOOK_INFO. Otherwise, the statements ALTER TABLE and COPY SCHEMA fail to
run. To drop the table, enter the following command on the command line:
db2 DROP TABLE SYSTOOLS.DB2LOOK_INFO
Upgrading the DB2 Runtime Client Instance for a Central and Dialog Instance
All DB2 client instances are automatically upgraded during the installation of the DB2 9.7 software.
4 Upgrading the Database under Windows
4.2 Upgrading the Database
48/70 PUBLIC 2009-08-18
Upgrading the DB2 Administration Server (Optional)
The DB2 Administration Server (DAS) is used by the DB2 graphical client tools, for example, the DB2
Control Center. If you are using these tools, you have to upgrade the DAS as follows:
1. Log on as user <sapsid>adm.
2. Upgrade the DAS using the following command:
<DB2_SWDIR>\bin\dasmigr
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 <sapsid>adm and open a DB2 Command Window.
2. Start the database manager using the following command:
db2start
3. Activate the database using the following command:
db2 activate database <SAPSID>
NOTE
After you activated the database, check the db2diag.log in <drive>:\db2\<DBSID>\db2dump for
possible problems.
Performing a Backup (Recommended)
We strongly recommend that you perform a full offline backup of the upgraded database.
4 Upgrading the Database under Windows
4.2 Upgrading the Database
2009-08-18 PUBLIC 49/70
This page is left blank for documents that are printed on both sides.
5 Post-Upgrade Activities
After upgrading the instance and database, you perform the following actions:
■ You run the db6_update_db script [page 51].
■ You back up the DB2 server configuration after the upgrade (recommended) [page 52] .
■ You install the DB2 license [page 53].
■ You check configuration settings [page 53].
■ Optionally, you remove the database administration server (DAS) [page 54].
■ If required, you update the data extractors in SAP Solution Manager [page 55].
5.1 Running the db6_update_db Script
The db6_update_db script checks various settings and enables some features, for example, the automatic
resize function for the tablespaces. The script also reorganizes the tables of the DB2 system catalog and
updates the statistics for these tables, and rebinds all invalid packages.
The following versions of this script are available:
OS Platform Script
Linux and UNIX db6_update_db.sh
Windows db6_update_db.bat
Procedure
1. Log on to the database server as user db2<dbsid>.
2. Copy the file db6_update_db.sh (UNIX and Linux) or db6_update_db.bat (Windows) from the
relevant operating system folder on the database DVD to a temporary directory (<temp_dir>).
3. Go to <temp_dir> and run the db6_update_db script using the following command:
■ Windows:
db6_update_db –m –d <DBSID>
■ Linux and UNIX:
./db6_update_db.sh -m –d <DBSID>
The script db6_update_db_out is created.
4. Review the content of db6_update_db_out and adjust the file if necessary.
5. Run the script db6_update_db_out using the following command:
■ Windows:
db6_update_db_out.bat
5 Post-Upgrade Activities
5.1 Running the db6_update_db Script
2009-08-18 PUBLIC 51/70
■ Linux and UNIX:
./db6_update_db_out.sh
6. To activate the configuration parameter changes made by the script, stop and restart the database
manager using the following commands:
db2stop force
db2start
5.2 Backing Up the DB2 Server Configuration After the Upgrade (Recommended)
If you created a backup of the DB2 server configuration before the upgrade, it is useful to create another
backup of the configuration after the upgrade.
Procedure
Procedure on Linux and UNIX
1. Log on to the database server as user db2<dbsid>.
2. Change to the previously created configuration backup directory <config_bkp> using the
following command:
cd /db2/db2<dbsid>/<config_bkp>
3. Back up the database server configuration using the following commands:
env > env_after_mig.txt
db2set -all > reg_after_mig.txt
db2 get dbm cfg > dbm_after_mig.txt
db2 get db cfg for <SAPSID> > db_after_mig.txt
Procedure on Windows
1. Log on to the database server as user db2<dbsid> and open a DB2 command window.
2. Change to the previously created configuration backup directory <config_bkp>, for example,
using the following the command:
cd <drive:>\db2\db2<dbsid>\<config_bkp>
3. Back up the database server configuration using the following commands:
set > env_after_mig.txt
db2set -all > reg_after_mig.txt
db2 get dbm cfg > dbm_after_mig.txt
db2 get db cfg for <SAPSID> > db_after_mig.txt
Result
You can now compare the configuration settings before and after the upgrade by comparing the
respective *-before_mig and *-after_mig files by using appropriate tools.
5 Post-Upgrade Activities
5.2 Backing Up the DB2 Server Configuration After the Upgrade (Recommended)
52/70 PUBLIC 2009-08-18
5.3 Installing the DB2 License
After the database upgrade, you have to install the DB2 license.
Procedure
■ If you are an SAP OEM customer, see SAP Note 816773 to install the license.
NOTE
Multi partition databases:
Install the license on each database host.
■ If you purchased DB2 directly from IBM, contact your IBM sales representative.
5.4 Checking Configuration Settings
With every DB2 release, the database and database manager configuration changes. Some parameters
are dropped, some are added, and the meaning of some parameters is changed. The db6_update_db
script performs some basic checks after the database upgrade and sets some parameters to recommended
values.
NOTE
A correct configuration is essential for smooth and high-performance operation of the database.
Procedure
Compare the settings for the database and database manager configuration parameters in your
upgraded database with the values suggested in SAP Note 1329179, which always contains the most up-
to-date proposals for these parameters from SAP. In particular, you have to revise the following database
configuration parameters:
■ LOCKLIST
In DB2 9.7, the lock request block size has increased to twice the size required in previous releases.
If this parameter is not set to AUTOMATIC, double the value of this parameter and provide the
necessary memory. In addition, note that the maximum size of the LOCKLIST parameter has now
also increased to 134,217,728 pages of 4 KB.
■ PCKCACHESZ
Package cache requirements in DB2 9.7 have increased by 25 to 40 percent. If this parameter is not
set to AUTOMATIC, increase it by approximately 40 percent.
NOTE
With DB2 Version 9.1, the Self Tuning Memory Manager (STMM) was introduced. Enabling
STMM has effects on several other configuration parameters. Therefore, also see SAP Note
1329179 for recommendations for systems with and without STMM activated.
5 Post-Upgrade Activities
5.3 Installing the DB2 License
2009-08-18 PUBLIC 53/70
More Information
For more information about the parameter changes in DB2 9.7, see DB2 Server Behavior Changes in the IBM
upgrade guide at:
https://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic /
com.ibm.db2.luw.qb.upgrade.doc/doc/r0022380.html
5.5 Removing the Database Administration Server (Optional)
The database administration server (DAS) is required by the graphical DB2 administration tools, for
example, the DB2 Control Center. As of DB2 9.7, the DAS and the DB2 Control Center have been
deprecated. You can still use them, but they are likely to be removed in a future DB2 release.
To perform administration tasks for your database, we recommend that you use the DBA Cockpit (SAP
transaction DBACOCKPIT).
RECOMMENDATION
Since the DAS is automatically installed during the DB2 9.7 software installation, we recommend
that you remove the DAS after the database upgrade if you do not plan to use the DB2 Control
Center.
Procedure
Linux and UNIX
1. Log on to the database server as user db2<dbsid>.
2. Initialize the DAS environment by running one of the following scripts:
■ For Bourne or Korn shell, enter the following command:
. <DASHOME>/das/dasprofile
■ For C shell, enter the following command:
source <DASHOME>/das/dascshrc
Replace <DASHOME> with the home directory of the DAS user, for example, /home/dasusr1.
3. Stop the DAS using the following command:
db2admin stop
4. Log off as user db2<dbsid>.
5. Log on again as user root.
6. Remove the DAS using the following command:
<DBSW>/instance/dasdrop
Replace <DBSW> with the DB2 9.7 software installation directory.
Windows
1. Log on to the database server user db2<dbsid> and open a DB2 command window.
2. Stop the DAS using the following command:
db2admin stop
5 Post-Upgrade Activities
5.5 Removing the Database Administration Server (Optional)
54/70 PUBLIC 2009-08-18
3. Remove the DAS using the following command:
db2admin drop
5.6 Updating Data Extractors in SAP Solution Manager (Optional)
If your database is connected to SAP Solution Manager, you have to update the data extractors for the
upgraded database using the setup wizard of SAP Solution Manager.
Procedure
1. Log on to your SAP Solution Manager system and call transaction SOLMAN_SETUP.
The screen SAP Solution Manager: Configuration appears in a separate Web browser.
2. In the navigation frame, choose Managed Systems Configuration.
3. On the Technical System tab page, choose the upgraded system and the Configure System pushbutton.
The setup wizard of the SAP Solution Manager system appears.
4. Choose the Manual Configuration step.
5. In the Manual Activities area, choose Configure DBA Cockpit.
A new browser window appears.
6. Choose the upgraded system and choose the Next pushbutton until the result screen appears
displaying that the Database Performance Warehouse has been successfully installed.
Result
The setup wizard updates the back-end of the DBA Cockpit and reschedules the data extractors for the
SAP Solution Manager or the Database Performance Warehouse feature.
5 Post-Upgrade Activities
5.6 Updating Data Extractors in SAP Solution Manager (Optional)
2009-08-18 PUBLIC 55/70
This page is left blank for documents that are printed on both sides.
6 Enabling New Database Features
With every DB2 release, new features are introduced that are optional. The following figure shows the
database version (and the new features, if available) from which you can upgrade your database
directly to DB2 9.7:
Figure 12: New Functions in DB2 Releases
The following sections describe these new features in more detail and how you can activate them after
the database upgrade:
■ Larger Record Identifiers (RIDs) [page 58]
■ Row Compression [page 60]
■ Index Compression [page 61]
■ Tablespaces with Reclaimable Storage [page 62]
■ Inline LOBs and LONG VARCHAR Replacement [page 63]
NOTE
Instead of activating each feature separately after the database upgrade, you can also enable multiple
database features in one step [page 65].
6 Enabling New Database Features
2009-08-18 PUBLIC 57/70
6.1 Larger Record Identifiers (RIDs)
A record identifier (RID) is a pointer in an index that points to a record in a corresponding table. The
record is addressed by a page and by a slot in this page. The size of the RID determines how many pages
can be addressed. The number of addressable pages determines the maximum table size.
With DB2 Version 9.1, the size of the record identifiers was extended from 6 to 8 bytes. This allows for
larger tables and, in some cases, for more data records in one data page.
The following table summarizes the table size limits in different DB2 releases:
Page Size of the TablespaceDB2 UDB Version 8 – Maximum Table Size
DB2 Version 9.1 and Higher – Maximum Table Size
4 KB 64 GB 2048 GB
8 KB 128 GB 4096 GB
16 KB 256 GB 8192 GB
32 KB 512 GB 16384 GB
Space Considerations
RIDs are used in indexes. If the size of a RID increases, the size of the index also increases. With DB2
Version 9.1, the size of a RID increased by 2 bytes. To estimate the index growth for all indexes of a large
table in KB, you can use the following SQL statement:
SYNTAX
SELECT SUM(numrids)/512 FROM syscat.indexes WHERE tabschema = '<schema>' and tabname = '<LargeTable>'
In this statement, you replace <schema> with the ABAP database connect user (SAPR3 or
SAP<SAPSID>) in upper case.
CAUTION
The result of this statement must be interpreted as the lower limit of the index growth. Page splits
often occur during conversion. This leads to additional growth. Furthermore, the estimation is
based on the fact that the table does not need to be reorganized.
Why All Tables in a Tablespace Should Be Enabled for Larger RIDs
To better understand why tables should be enabled for larger RIDs, consider the following scenario:
A tablespace was enabled for large RIDs. One or several tables in this tablespace actually use large RIDs
after an index reorganization. These tables have become very large, so that all pages addressed by tables
with the old RID schema are now used by the tables enabled for larger RIDs.
If a table that does not use large RIDs tries to allocate a new page in this tablespace, the request can fail
with the following SQL error:
SQL1236N
Table <table-name> cannot allocate a new page because the index with identifier <index-
id> does not yet support large RIDs.
6 Enabling New Database Features
6.1 Larger Record Identifiers (RIDs)
58/70 PUBLIC 2009-08-18
Even though the size of the table that uses the old RID schema is below the old table size limit, the
error can occur because the free pages that the table with the old RID schema could address are used
by the tables that use large RIDs.
To avoid this error situation, we recommend that you enable all tables in a tablespace for larger RIDs.
Enabling Tables for Larger RIDs in the Upgraded Database
After the database upgrade, you can enable tables for larger RIDs. Before you do so, you should check
if there are already tablespaces and tables that are enabled for large RIDs.
Checking for Large RIDs
1. To display all tablespaces that have the data type Large and that are therefore enabled for larger
RIDs, use the following SQL statement:
SYNTAX
SELECT tbspace FROM syscat.tablespaces WHERE datatype = 'L'
Note that if you executed the db6_update_db script [page 51] after the database upgrade, all permanent
DMS tablespaces in your system (with the exception of the SYSCATSPACE tablespace) are set to
LARGE. This way, all newly created tables in your upgraded database are already enabled for large
RIDs.
2. To find out how many tables in your upgraded database system are already using large RIDs or
large RIDs and large slots, proceed as follows:
■ For non-partitioned database systems, use the following SQL statement:
SYNTAX
SELECT COUNT(*) AS TABLES,SUM(CASE WHEN large_rids = 'Y' THEN 1 ELSE 0 END) AS LRIDs,SUM(CASE WHEN large_slots = 'Y' THEN 1 ELSE 0 END) AS LRIDs_and_LSLOTsFROM TABLE (ADMIN_GET_TAB_INFO('<schema>', '')) AS X
■ For multi partition database systems, use the following SQL statement:
SYNTAX
WITH LRIDTABLE AS(SELECT DISTINCT tabname, (CASE WHEN large_rids = 'Y' THEN 1 ELSE 0 END) AS LRIDs, (CASE WHEN large_slots = 'Y' THEN 1 ELSE 0 END) AS LRIDs_and_LSLOTsFROM TABLE (ADMIN_GET_TAB_INFO('<schema>', '')) AS X)SELECT COUNT(*) AS tables, SUM(LRIDs) AS LRIDs, SUM(LRIDs_and_LSLOTs) AS LRIDs_and_LSLOTs FROM LRIDTABLE
In this statement, you replace <schema> with the database connect user (SAPR3 or
SAP<SAPSID>) in upper case.
Enabling Tables for Large RIDs Using the Large RID Tool
Enabling tables for larger RIDs after a database upgrade consists of the following steps:
1. You convert an existing tablespace to LARGE, that is, the data type of the tablespace is set to
LARGE.
6 Enabling New Database Features
6.1 Larger Record Identifiers (RIDs)
2009-08-18 PUBLIC 59/70
2. You enable tables for large RIDs by performing an index reorganization of the respective tables.
NOTE
If you want to enable tables for larger RIDs and larger slots, you need to perform a table
reorganization instead of an index reorganization.
To perform these steps, you can use the Large RID Tool provided by SAP. The Large RID Tool is ABAP-
based and applies only to SAP ABAP and SAP ABAP+Java systems. You can use it for any SAP system
starting with SAP Release 4.6 or higher.
You can download the Large RID Tool as well as the documentation describing how to use it from SAP
Note 1108956.
6.2 Row Compression
Row compression (also known as deep compression or data row compression) was introduced with
DB2 Version 9.1. This feature uses a zip-like compression algorithm to replace repeating patterns in a
data record with short symbols. To match these symbols with their original values, a compression
dictionary is used. Row compression is completely transparent to applications. Depending on the table
content, row compression can lead to considerable disk space savings.
CAUTION
Row compression might be inappropriate for tables with many INSERT, UPDATE, or DELETE
operations.
Enabling Tables for Row Compression
After the database upgrade, you can enable tables for row compression. Before you do so, you should
check if there are tables that are already enabled for row compression.
Checking for Tables Using Row Compression
To find out how many tables in your system are already enabled for row compression, you can use the
following SQL statement:
SYNTAX
SELECT COUNT(tabname) AS COMPRESSED_TABLES FROM syscat.tablesWHERE compression = 'R' OR compression = 'B'
To check if a specific table is enabled for row compression, you can use the following SQL statement:
SYNTAX
SELECT compression FROM syscat.tablesWHERE tabname = <tabname> AND tabschema = <tabschema>
In this statement, you replace <tabname> with the name of the table and <tabschema> with the table
schema.
If the statement returns the value R or B, the table is enabled for row compression.
6 Enabling New Database Features
6.2 Row Compression
60/70 PUBLIC 2009-08-18
Activating Row Compression
The following steps are necessary to activate row compression for an existing table:
1. You set the compression flag for tables that are eligible for row compression to YES using the
following SQL statement:
SYNTAX
ALTER TABLE <tabname> COMPRESS YES
2. A compression dictionary has to be built, either manually or automatically:
■ DB2 Version 9.1
This is a manual action that requires a reorganization of the table.
■ DB2 Version 9.5
Automatic dictionary creation (ADC) was introduced, that is, a compression dictionary is built
automatically by the database manager when performing an INSERT or a LOAD SQL statement
if the table exceeds a certain space threshold.
As of SAP NetWeaver 7.0 SP12 and higher, you can use the DBA Cockpit (SAP transaction
DBACOCKPIT) to perform these steps.
For SAP system releases lower than SAP NetWeaver 7.0 SP12, the Row Compression Tool provided by SAP
helps you identify suitable candidates for row compression. You can also use this tool to activate row
compression. The tool is ABAP-based and is suitable for AS ABAP databases and AS ABAP + AS Java
databases only. You can use it for any SAP system starting with SAP Release 4.6C or higher.
You can download the Row Compression Tool and the documentation describing how to use it from SAP
Note 980067.
More Information
For more information, see Database Administration Using the DBA Cockpit: IBM DB2 for Linux, UNIX, and
Windows at:
http://service.sap.com/instguidesnw <Your SAP NetWeaver Release> Operations Database-
Specific Guides
6.3 Index Compression
As of DB2 9.7, indexes can also be compressed. To minimize the size of the index on disk, the DB2
database manager can use various index compression techniques, for example, RID list compression
or prefix compression.
NOTE
Index compression is not supported on catalog indexes and MDC block indexes.
After a database upgrade, index compression is not enabled for indexes of existing tables, regardless if
the tables are compressed or not.
6 Enabling New Database Features
6.3 Index Compression
2009-08-18 PUBLIC 61/70
Enabling Index Compression
After the database upgrade, you can enable indexes for compression. Before you do so, you should
check if there are indexes that are already enabled for index compression.
Checking for Indexes Using Index Compression
Newly created tables that are enabled for row compression automatically use index compression. To
find out how many indexes in your database are already compressed, you can use the following SQL
statement:
SYNTAX
SELECT COUNT (DISTINCT indname)FROM TABLE (SYSPROC.ADMIN_GET_INDEX_INFO('I', '<schema>', '')) AS TWHERE index_compressed = 'Y'
In this statement, you replace <schema> with the database connect user (SAPR3 or SAP<SAPSID>) in
upper case.
Activating Index Compression
Activating indexes for index compression is very similar to activating tables for row compression and
consists of the following steps:
1. You set the compression flag to YES using the following SQL statement:
SYNTAX
ALTER INDEX <index_name> COMPRESS YES
2. You perform an index reorganization.
To perform these steps, you can also use the Row Compression Tool that is enhanced to also assist you in
the implementation of index compression. You can download the Row Compression Tool and the
documentation describing how to use it from SAP Note 980067.
More Information
For more information, see Index compression in the IBM DB2 Information Center at:
https://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/
com.ibm.db2.luw.admin.dbobj.doc /doc/c0054539.html
6.4 Tablespaces with Reclaimable Storage
DB2 9.7 addresses the high-water mark (HWM) problem of lower DB2 releases by introducing the new
DMS tablespace attribute reclaimable storage. DMS tablespaces that are flagged with this attribute use
object-relative addressing to find data pages for an object.
On request, DB2 can rearrange extents in these tablespaces so that the HWM can be reduced as much
as possible and free space can be given back to the file system.
To rearrange the extents of a tablespace, you can use the following SQL statements:
6 Enabling New Database Features
6.4 Tablespaces with Reclaimable Storage
62/70 PUBLIC 2009-08-18
■ Tablespaces that are enabled for DB2's automatic storage management:
SYNTAX
ALTER TABLESPACE ... REDUCE
■ Tablespaces that are not enabled for DB2's automatic storage management:
SYNTAX
ALTER TABLESPACE ... LOWER HIGH WATER MARKALTER TABLESPACE ... REDUCE
Checking for Tablespaces with Reclaimable Storage
To find out which tablespaces in your database are already enabled for reclaimable storage, you can use
the following SQL statement as user db2<dbsid>:
SYNTAX
SELECT tbsp_name FROM TABLE (MON_GET_TABLESPACE('',-2)) AS TWHERE reclaimable_space_enabled = 1
Enabling Tablespaces for Reclaimable Storage
After a database upgrade to DB2 9.7, none of the existing tablespaces are enabled for reclaimable storage.
By default, all newly created tablespaces in DB2 9.7 are already enabled for reclaimable storage. You
cannot convert existing tablespaces to use object-relative addressing. Therefore, these tablespaces
cannot be enabled for reclaimable storage.
The DB6CONV tool is extended so that you can then move all tables of an existing source tablespace
to a newly created target tablespace. DB6CONV uses the online table move procedure. Therefore, you
can use DB6CONV while the SAP system is running. DB6CONV is an ABAP-based tool and is available
for all SAP releases starting with 4.6.
NOTE
You cannot use DB6CONV to move tables or tablespaces of an AS Java system.
More Information
For more information about how to move tables using DB6CONV, see SAP Note 362325.
6.5 Inline LOBs and LONG VARCHAR Replacement
Depending on the database types that are used in the definition of a table, DB2 stores table data in more
than one storage object. Specifically, all data of LONG VARCHAR and LONG VARGRAPHIC columns is stored
in a long object. All LOBs (data of types BLOB, CLOB, and DBCLOB) are stored in a LOB object. The
data object that is used to hold all other data contains descriptors that point to the long and LOB data.
Inline LOBs
As of DB2 9.7, you can use inline LOBs. That is, small LOBs (up to a specified inline length) can be
included in the data object of the normal base table and the respective table columns are treated like
6 Enabling New Database Features
6.5 Inline LOBs and LONG VARCHAR Replacement
2009-08-18 PUBLIC 63/70
VARCHAR. LOB data beyond the specified inline length is still stored in the LOB object apart from base
table data.
Inline LOBs offer, for example, the following advantages:
■ Fewer I/O accesses
■ Inline LOBs of compressed tables are also subject to row compression.
■ Disk space is saved because no LOB descriptor is required.
The default inline length in DB2 9.7 equals the size of the descriptor required to reference data in a LOB
object. You can modify this default inline length using the following SQL statement:
SYNTAX
ALTER TABLE ... INLINE LENGTH
In an SAP system, we recommend that you do not explicitly set the LOB inline length for table
columns to a value that is not the default value. If additional columns are added to the table, for
example, during an SAP system upgrade, the data records might not fit into the pages anymore.
To check how many LOBs in a table are stored inline, you can use the following SQL statement:
SYNTAX
SELECT SUM(ADMIN_IS_INLINED(<LOB_column>)) AS IS_INLINEDFROM <table>
In this statement, <table> is a base table with one or more LOB columns and <LOB_column> is the
appropriate column.
LONG VARCHAR Replacement
With inline LOBs, performance improves and disk space can be saved. Therefore, the type mapping for
several ABAP Dictionary types of the AS ABAP was changed to use LOBs instead of LONG VARCHARs. This
change applies to all SAP releases starting with SAP NetWeaver 7.0 and higher. For more information
about type mapping, see SAP Note 29824.
The new type mapping is automatically used for newly created tables. You do not need to take further
action.
To ensure that the database object check in the ABAP Dictionary deals correctly with the changed type
mapping, the following SAP_BASIS Support Packages are required:
SAP Release SAP Basis Support Package
7.00 SP19
7.01 SP04
7.10 SP08
7.11 SP02
Alternatively, you can apply the correction instructions from SAP Note 1354186.
To perform the check, call transaction SE11 in your SAP system and choose Utilities Database Object
Check .
6 Enabling New Database Features
6.5 Inline LOBs and LONG VARCHAR Replacement
64/70 PUBLIC 2009-08-18
The database of an AS Java does not use LONG data types and is therefore not affected.
Enabling Existing Tables for Inline LOBs
By default, new tables use inline LOBs. Existing tables automatically use inline LOBs for newly inserted
records. To store all possible LOBs in line in a table with existing data, you need to perform a table
reorganization with the LONGLOBDATA option. Alternatively, you can move the table, for example,
using the DB6CONV tool. By doing so, columns of type LONG VARCHAR are also replaced with LOB
columns.
For more information, see SAP Note 362325.
More Information
For more information about inline LOBs, see Including Large Objects Within Base Table Rows in the IBM DB2
Information Center at:
https://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/
com.ibm.db2.luw.admin.dbobj.doc /doc/c0054525.html
6.6 Enabling Multiple Database Features
Depending on the DB2 release level before the database upgrade, some of the features mentioned in
the previous sections might already be activated in your database system after the upgrade.
Overview of New Features and Required Operations
To be able to better plan the enablement of the remaining database features, the following table
summarizes that you need to perform for each feature:
Feature Required Operation
Large RIDs or large slots ■ Once for every tablespace:
SYNTAX
ALTER TABLESPACE <tablespace> CONVERT TO LARGE
■ To activate large RIDs: index REORG ■ To activate large RIDs and large slots: table REORG
Row compression ■ SYNTAX
ALTER TABLE <tabname> COMPRESS YES
■ Table REORG
Index compression ■ Implicitly activated together with row compression for new indexes ■ To enable index compression explicitly on a specific index:
● SYNTAX
ALTER INDEX <indexname> COMPRESS YES
● Index REORG
Inline LOBs Table REORG
Tablespaces with reclaimable storage
Move all tables of an existing tablespace to a new tablespace, for example, using DB6CONV.
6 Enabling New Database Features
6.6 Enabling Multiple Database Features
2009-08-18 PUBLIC 65/70
Enabling Multiple Features in One Step
Instead of enabling the features above one by one, you can also enable multiple features by performing
one operation. For example, to activate row compression and LOB inlining for a table with a LOB
column, it is sufficient to set the compression flag of this table to YES and to reorganize this table
afterwards.
Alternatively, you can do the following:
Instead of reorganizing a table or the indexes of a table, you can move the table to another tablespace
or within the same tablespace, which has the same effect in terms of activating the features mentioned
above. To move a table online or offline, you can use the DB6CONV tool as described in SAP Note
362325.
NOTE
The DB6CONV tool will be extended to support the moving of all tables of a tablespace. For more
information, see SAP Note 362325.
6 Enabling New Database Features
6.6 Enabling Multiple Database Features
66/70 PUBLIC 2009-08-18
Typographic Conventions
Example Description
<Example> Angle brackets indicate that you replace these words or characters with appropriate entries to make entries in the system, for example, “Enter your <User Name>”.
ExampleExample
Arrows separating the parts of a navigation path, for example, menu options
Example Emphasized words or expressions
Example Words or characters that you enter in the system exactly as they appear in the documentation
http://www.sap.com Textual cross-references to an internet address
/example Quicklinks added to the internet address of a homepage to enable quick access to specific content on the Web
123456 Hyperlink to an SAP Note, for example, SAP Note 123456
Example ■ Words or characters quoted from the screen. These include field labels, screen titles, pushbutton labels, menu names, and menu options.
■ Cross-references to other documentation or published works
Example ■ Output on the screen following a user action, for example, messages ■ Source code or syntax quoted directly from a program ■ File and directory names and their paths, names of variables and parameters, and
names of installation, upgrade, and database tools
EXAMPLE Technical names of system objects. These include report names, program names, transaction codes, database table names, and key concepts of a programming language when they are surrounded by body text, for example, SELECT and INCLUDE
EXAMPLE Keys on the keyboard
2009-08-18 PUBLIC 67/70
SAP AGDietmar-Hopp-Allee 16
69190 WalldorfGermany
T +49/18 05/34 34 34F +49/18 05/34 34 20
www.sap.com
© Copyright 2009 SAP AG. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries.Oracle is a registered trademark of Oracle Corporation.UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.Java is a registered trademark of Sun Microsystems, Inc.JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.SAP, R/3, xApps, xApp, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (“SAP Group”) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.
DisclaimerSome components of this product are based on Java™. Any code change in these components may cause unpredictable and severe malfunctions and is therefore expressly prohibited, as is any decompilation of these components.Any Java™ Source Code delivered with this product is only to be used by SAP’s Support Services and may not be modified or altered in any way.
68/70 PUBLIC 2009-08-18
Documentation in the SAP Service MarketplaceYou can find this document at the following address: https://service.sap.com/instguides
2009-08-18 PUBLIC 69/70
SAP AGDietmar-Hopp-Allee 1669190 WalldorfGermanyT +49/18 05/34 34 34F +49/18 05/34 34 20www.sap.com
© Copyright 2009 SAP AG. All rights reserved.No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.