DB6 Current db6 Update DB db6 Update Client Script V72 v107
DB6 Current db6 Update DB db6 Update Client Script V72 v107
Symptom
After an upgrade or after implementing a new Fix Pack, you want to carry out the following post-
implementation steps automatically:
Post-implementation steps that are required after an upgrade or after you have implemented a Fix
Pack (update).
Exchange of the CLI driver with the current version
For this, you want to download the latest versions of the following scripts:
db6_update_db (sh. or bat) for post-implementation steps after an upgrade or a Fix Pack
implementation
db6_update_client (sh. or bat) for an exchange of the CLI driver
Other Terms
db6_update_db, db6_update_client, db6, scripts
Solution
The attachments to this SAP Note contain the newest versions of the scripts (packed as SAR archives (700
SAPCAR)):
db6_update_db (sh. or bat)
db6_update_client (sh. or bat)
In the following, you can find a description how you can execute these scripts. If you use an upgrade
guide, you also might find instructions for executing the scripts in the upgrade guide. These
instructions in the upgrade guide, however, are obsolete. Follow the instructions in this SAP Note.
To determine the version of the db6_update_db script, call the script with the option -V or -version.
db6_update_db execute script
Notes:
As of Version 35 of the db6_update_db tool, the functions are implemented in Java. As before, the
db6_update_db.sh and db6_update_db.bat scripts are used for starting. The user interface has not
changed.
The new Java-based variant of the db6_update_db tool is valid for all SAP releases and all DB2
versions as of IBM DB2 for Linux, UNIX, and Windows Version 9. The Java runtime that is delivered
with the DB2 software is used.
IBM DB2 UDB V8 is no longer supported with the new Java-based version of the db6_update_db tool. If
you have to carry out post-processing steps after a fix pack update under IBM DB2 UDB V8, proceed as
described in SAP Note 1865427.
As of Version 35 of the db6_update_db script, the new component db6_update_db.jar is required to
execute the db6_update_db scripts. This JAR file is also contained in the SAR archive that is
attached to this SAP Note. Make sure that this JAR file is always in the same directory in which the
db6_update_db script is executed.
As of Version 35 of the db6_update_db script, the new component db6_update_db.jar is required to
execute the db6_update_db scripts. This JAR file is also contained in the SAR archive that is
attached to this SAP Note. Make sure that this JAR file is always in the same directory in which the
db6_update_db script is executed.
As of Version 63 of the db6_update_db script, two additional output files are generated if
separation of duties (SoD) is activated on the database (see SAP Note 1865427 - DB6: Role-Based
Security Concept). These two additional files contain SQL statements that cannot be run as db2<sid>
in a SoD setup. These separate files must be executed with the user IDs of the SAP DB connect user
(typically sap<sapsid>) and the DB2 security administrator (the user with SECADM authorization).
As of Version 70 of the db6_update_db script timestamps are recorded in the log file
(db6_update_db.log) when the output files are generated. SQL commands printing timestamps are
inserted into the generated outputfile (db6_update_db_out.sql).
Procedure:
To execute the db6_update_db script, proceed as follows:
1. Download the attachment db6_update_db.SAR to a temporary directory and unpack it using the program
SAPCAR.
2. Start the script as the user db2<dbsid> using the following command: (user db2<dbsid> must have
write permission for the current directory)
UNIX:
./db6_update_db.sh -m -d <DBSID> (after an upgrade)
./db6_update_db.sh -d <DBSID> (after a Fix Pack installation)
WINDOWS:
db6_update_db.bat -m -d <DBSID> (after an upgrade)
db6_update_db.bat -d <DBSID> (after a Fix Pack installation)
If SoD is activated on the database, the script generates two additional the SQL script files
db6_update_db_connect_user_out.sql and db6_update_db_secadm_out.sql.
3. Check the settings in this script and adjust them if required
It is recommended to stop the SAP system before continuing with the next step, because existing
database connections can be affected or terminated in case script contains commands such as:
reorg syscat.<tablenames>, db2updv<version_number>, grant revoke privileges to/from <SAP Connect
User>, bind/rebind packages, update database manager configuration parameters, activation of stored
procedures in the SAPTOOLS schema.
In case the script contains the command "alter tablespace sapeventmon convert to large" also stop
the db2 event monitors. Otherwise this command might not be able to complete because it waits for
the db2fwx threads (event monitor fast writers) to release their locks.
If you have activated SoD in the database, start the two additionally created SQL script files with
these commands in the following order:
Information about the execution of the script db6_update_db.bat on various Windows versions:
In principle, you must execute the script db6_update_db.bat on Windows in a DB2 command window.
Depending on the version of the operating system, the start menu may also provide a DB2
administrator command window. If the operating system provides such an administrator command window,
you should use this window to ensure that all of the commands generated can be executed.
Procedure:
1. Log on to the database host as user "<sapsid>adm".
2. Mount the relevant DB2 LUW CLI/JDBC driver DVD.
3. Copy the entire content of the DVD to a temporary directory <temp>.
4. Change to the subdirectory <temp>/DATA_UNITS/CLIENT.
5. Download the attachment db6_update_client.SAR to the subdirectory from step 4 and unpack it there
using the program SAPCAR.
6. Start the db6_update_client script from this directory.
The following call scenarios are possible:
Update mode - the CLI driver is exchanged in the global directory /usr/sap/< SID>/SYS/global/db6 for
the operating systems that are already installed. The JDBC driver (operating system-independent) is
also exchanged.
UNIX:
./db6_update_client.sh -u
WINDOWS:
db6_update_client.bat -u
Copy mode - the CLI driver is installed in the global directory /usr/sap/<SID>/SYS/global/db6 for
the specified operating system. The JDBC driver (operating system-independent) is also installed.
UNIX:
./db6_update_client.sh -c <OSNAME>
WINDOWS:
db6_update_client.bat -c <OSNAME>
JDBC only mode - only the JDBC driver is installed or updated. This is particularly relevant for
Java-only systems.
UNIX:
./db6_update_client.sh -j
WINDOWS:
db6_update_client.bat -j
Manual Activities
975352 DB6: Configuring DB2 Auto Reorg for Space Reclamation and Index Cleanup
967555
603981 DB6: Installing V8.2 FixPaks (as of FP9) on Win NT/Win 2000
2123454 Table conversions using DB6CONV terminates with SQL0443N, SQL0031C or SQL0551N
1708037 DB6: Installing Fix Packs for DB2 10.1 (UNIX + Linux)
1363169 DB6: Installing fix packs for DB2 V9.7 (UNIX + Linux)
1138549 DB6: Installation of Fix Packs for DB2 V9.5 (UNIX & Linux)
3272559 DB6: SQL1013N error when executing db6_update_db as postprocessing after FP update in Dual-Stack Env
2039325 DB6: SQL0551N when setting up managed system in solution manager system
2868794 DB6: SQL0104N An unexpected token "<APPUSER>" was found at the enableRoles step during the system copy of Java Stack using
SWPM
2854028 db6_update_client script errors with 'An error occurred during extraction of CLI driver, SAPCAR rc=4'
2853981 SUM fails during CHECKS phase with 'DB2 JDBC Driver was not installed correctly.'
2775485 DB2 'DB2COMM' Registry Parameter is not associated with the DB2_WORKLOAD aggregate
2739121 SUM upgrade error "DB Version out of range (too low)"
2704813 DB2 LUW SQL0440N CREATE VIEW with FUNCTION SUM DMO Migration
2543928 ERROR => DB2 software level mismatch between client and server.
2303756 DB6: Installing Fix Packs for DB2 11.1 (UNIX + Linux)
975352 DB6: Configuring DB2 Auto Reorg for Space Reclamation and Index Cleanup
1708037 DB6: Installing Fix Packs for DB2 10.1 (UNIX + Linux)
1363169 DB6: Installing fix packs for DB2 V9.7 (UNIX + Linux)
603981 DB6: Installing V8.2 FixPaks (as of FP9) on Win NT/Win 2000
1138549 DB6: Installation of Fix Packs for DB2 V9.5 (UNIX & Linux)
db6_update_client.SAR 11 application/octet-stream
db6_update_db.SAR 80 application/octet-stream