0% found this document useful (0 votes)
179 views

DB6 Current db6 Update DB db6 Update Client Script V72 v107

The document is an SAP note providing updated versions of the db6_update_db and db6_update_client scripts. It describes how to use the scripts to perform post-implementation steps after a database upgrade or fix pack implementation, including exchanging the CLI driver with the current version. The note provides instructions on downloading, extracting, and running the scripts as the appropriate user. It also summarizes changes and functionality in recent versions of the scripts.

Uploaded by

andrey_krasovsky
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
179 views

DB6 Current db6 Update DB db6 Update Client Script V72 v107

The document is an SAP note providing updated versions of the db6_update_db and db6_update_client scripts. It describes how to use the scripts to perform post-implementation steps after a database upgrade or fix pack implementation, including exchanging the CLI driver with the current version. The note provides instructions on downloading, extracting, and running the scripts as the appropriate user. It also summarizes changes and functionality in recent versions of the scripts.

Uploaded by

andrey_krasovsky
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

SAP Note

1365982 - DB6: Current "db6_update_db/db6_update_client" script (V72)


Component: BC-DB-DB6 (DB2 Universal Database for Unix / NT), Version: 107, Released On: 25.07.2023

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 66 of the db6_update_db script, the database manager configuration parameter


(SVCENAME) and the registry variable DB2COMM are not changed any longer. On non SAP Netweaver
systems they were previously set to SAP recommended defaults, if they were found unset.

As of Version 67 of the db6_update_db script a change is introduced regarding the rebind of


packages.
On databases with releases Db2 11.1.4 and higher the rebind will be executed at the beginning of the
db6_update_db.sh/db6_update_db.bat program. This will take a few seconds and prevent errors like
"SQL20249N The statement was not processed because the package named package-name needs to be
explicitly rebound." when generating the script "db6_update_db_out.sql".

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).

As of Version 71 of the db6_update_db script:


a new table function SAPTOOLS.LOBALLOC used for lob space allocation analysis is created.
on non-unicode databases the registry variable DB2CODEPAGE is checked and a warning is issued if
this is set to unicode (1208). This simplifies error analysis for code page conversion errors
such as SQL0873N when executing the generated script "db6_update_db_out.sql".
the output of Db2 CLP to STDOUT is reduced when large SQLs are executed (e.g. creation of stored
procedures in the SAPTOOLS schema). The log file db6_update_db.log contains the full SQL
statement.

As of Version 72 of the db6_update_db script:


adaptive workload management (AWLM) will be configured when using future Db2 releases > Db2 11.5

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)

The db6_update_db.sh or db6_update_db.bat script generates the SQL script file


db6_update_db_out.sql.
This script file will contain the SQL commands for adjusting the parameter settings.

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.

4. Start the db6_update_db_out.sql script with the following command:

db2 -z db6_update_db_out.log -tvf db6_update_db_out.sql

If you have activated SoD in the database, start the two additionally created SQL script files with
these commands in the following order:

db2 connect to <DBSID> user <SAP DB Connect User>;


db2 -z db6_update_db_connect_user_out.log -tvf db6_update_db_connect_user_out.sql
db2 connect to <DBSID> user <SECADM User>;
db2 -z db6_update_db_secadm_out.log -tvf db6_update_db_secadm_out.sql

5. Check the entries in the files db6_update_db_out.log (and, if available,


db6_update_db_connect_user_out.log, db6_update_db_secadm_out.log) for error messages and correct
The error messages are described in more detail in SAP Note 1263266.
Also refer to SAP Note 1269713 for the error analysis of the log file db6_update_db_out.log.
6. Start the SAP system again in case it was stopped in a previous step.

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.

db6_update_client execute script

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

System commands and SQL statements generated by the db6_update_db script:


The system commands and SQL statements generated by the db6_update_db.sh or db6_update_db.bat script
will perform the following tasks, depending on the DB2 Version, Fix Pack and the use of script option -
m:
After a Fix Pack installation (db6_update_db.sh -d <DBSID> or db6_update_db.bat -d <DBSID>), the script
performs the following tasks:
If the role-based security concept is implemented, automatically adjust database roles SAPMON,
SAPTOOLS, and SAPAPP as they are defined by SAP in this concept (see SAP Note 1678159 - DB6: Role-
Based Security Concept).
Manual changes to security objects referenced in the concept can possibly be reverted by this step.
Create system tablespaces and bufferpool
Enable auto-resize capability for DMS tablespaces (AUTORESIZE YES)
Run the system command db2updv[_DB2_RELEASE_] to update the database system catalog to support the
installed Fix Pack
Update following database manager configuration parameters, if they are not set or not set, to
AUTOMATIC: MON_ACT_METRICS, MON_REQ_METRICS, MON_OBJ_METRICS, MON_LOCK_TIMEOUT
Set or unset registry variables: DB2_MEM_TUNING_RANGE, DB2_PMODEL_SETTINGS, DB2_WOKRLOAD.
For DB2_WORKLOAD, the script prompts you with a message before it changes dependent registry
variables.
Catalog, grant access to, and clean up the stored procedures and functions of the db2sap library
(SAP Note 1521392)
Adapt the Automatic Maintenance Policy XML file according to SAP requirements (SAP Note 975352)
Rebind packages of programs using static SQL using BIND command
Grant access to SYSIBM.SYSDUMMY1 (SAP Note 989109)
Grant "execute" and "create" privileges to the connect user for the following objects:
WLM functions/stored procedures
Administrative views
Unfenced routines
Migration of tasks from DB2 cron-based scheduler to DB2 Admin Task Scheduler
Upgrade event monitor tables (SYSPROC.EVMON_UPGRADE_TABLES)
Disable SAP-defined WLM thresholds and workloads if column-organized tables exist (SAP Note 1152411)
Additional settings for NON-SAPNETWAEVER databases:
Set registry variables DB2_ATS_ENABLE, DB2COMM
Update of database manager parameters: SVCENAME, DFT_MON_BUFPOOL, DFT_MON_LOCK,
DFT_MON_SORT, DFT_MON_STMT, DFT_MON_TABLE, DFT_MON_UOW, MON_REQ_METRICS,
MON_ACT_METRICS, MON_OBJ_METRICS
Create and grants access to objects required by stored procedure SYSPROC.DB2LK_GENERATE_DDL (SAP
Note 2123454)
Enables optimized pushed down objects delivered in db2sap library for SAP CDS views
Checks certain CDS objects on database level (SAP Note 2465138)
After a DB2 version upgrade (db6_update_db.sh -m -d <DBSID> or db6_update_db.bat -m -d <DBSID>):
Update the following database manager configuration parameters if they are not set:
MON_DEADLOCK, NUM_IOCLEANERS,NUM_IOSERVERS, AVG_APPLS, APPLHEAPSZ, DBHEAP, AUTO_STMT_STATS,
AUTO_REVAL, STAT_HEAP_SZ, AUTO_MAINT, AUTO_TBL_MAINT, AUTORUNSTATS, MAX_COORDAGENTS,
NUM_POOLAGANTS, MAX_CONNECTIONS, MON_HEAP_SZ
Convert DMS tablespaces to large DMS tablespaces (CONVERT TO LARGE)
Run db2rbind
REORG of all tables in the database system catalog
Enables optimized pushed down objects delivered in db2sap library for SAP CDS views

Manual Activities

This document refers to


SAP Note/KBA Title

989109 DB6: SQL0551N accessing SYSIBM.SYSDUMMY1 in DB6COCKPIT

978555 DB6: Installing FixPacks for DB2 V9.1 on Windows

978554 DB6: Installing FixPaks for DB2 V9.1 (UNIX+Linux)

975352 DB6: Configuring DB2 Auto Reorg for Space Reclamation and Index Cleanup

967556 DB6: 6.20/6.40 Patch Collection Inst. - UNIX

967555

928728 DB6: SAP System Inst. with EXT Kernel on Windows

928727 DB6: SAP System Inst. with EXT Kernel on UNIX

603981 DB6: Installing V8.2 FixPaks (as of FP9) on Win NT/Win 2000

603972 DB6: Installing V8.2 FixPaks (as of FixPak 9) on UNIX

2465138 DB6: Replace function HEXTORAW with VARCHAR_BIT_FORMAT

2123454 Table conversions using DB6CONV terminates with SQL0443N, SQL0031C or SQL0551N

2037952 DB6: db6_update_db script terminates with SQL0551N

1865427 DB6: db6_update_db tool ONLY for DB2 UDB V8


1815567 db6_update_db location for SAP LVM 2.0

1708038 DB6: Installing Fix Packs for DB2 10.1 (Windows)

1708037 DB6: Installing Fix Packs for DB2 10.1 (UNIX + Linux)

1686978 DB6: SQL0551N when executing db6util -sl

1678159 DB6: Role-Based Security Concept

1649092 DB6: Connect Non SAP NetWeaver DB to SAP Solution Manager

1645684 DB6: Upgrade to Version 10.1 of DB2 for LUW

1521392 DB6: Use of SAP specific table functions

1363170 DB6: Installing Fix Packs for DB2 V9.7 (Windows)

1363169 DB6: Installing fix packs for DB2 V9.7 (UNIX + Linux)

1332109 DB6: Upgrade to Version 9.7 of DB2

1269713 SQL0204N "SYSTOOLS.ADMINTASKS" is an undefined name

1263266 DB6: Error in db2diag.log after importing DB2 V9.5FP1 or FP2

1152411 DB6: Using Db2's Workload Management in an SAP Env.

1138550 DB6: Installing Fix Packs for DB2 V9.5 (Windows)

1138549 DB6: Installation of Fix Packs for DB2 V9.5 (UNIX & Linux)

1124987 DB6: Availability of administration functions

This document is referenced by


SAP Title
Note/KBA

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

2808893 Deployment Error during SUM Update with ERRORCODE=-4229

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.'

2843629 ADM14000E DB2 is unable to open diagnostic log file

2775485 DB2 'DB2COMM' Registry Parameter is not associated with the DB2_WORKLOAD aggregate

2739121 SUM upgrade error "DB Version out of range (too low)"

2709149 Seeing errors SQL1437N or SQL1439N while executing a system copy.

2704813 DB2 LUW SQL0440N CREATE VIEW with FUNCTION SUM DMO Migration

2644871 SAPCAR rc=127 when executing the db6_update_client.sh script

2340123 SQL0440N No authorized routine named "MEMORY_TABLE"

1998529 SQL0727N, SQL0104N errors involving SYSTOOLS.ADMIN and SYSIBM.SYSDUMMY1

2605029 Routine SAPTOOLS.DBH_NETSTATS_COLLECT does not exist

2594886 SAP application server not starting - SQL30081N

2543928 ERROR => DB2 software level mismatch between client and server.

2508138 DB6: SQL0104N error in SAP system log

1612105 DB6: FAQ on Db2 High Availability Disaster Recovery (HADR)

2303766 DB6: Installing Fix Packs for DB2 11.1 (Windows)

2303756 DB6: Installing Fix Packs for DB2 11.1 (UNIX + Linux)

2277581 DB6: db6_update_db script shows SQL Warning SQL0361W

2037952 DB6: db6_update_db script terminates with SQL0551N

1977966 DB6: SQL0551N on SYSPROC.ENV_GET_REG_VARIABLES


1825340 DB6: Use of BLU Acceleration with SAP BW and Applications Based on SAP BW

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)

1363170 DB6: Installing Fix Packs for DB2 V9.7 (Windows)

1708038 DB6: Installing Fix Packs for DB2 10.1 (Windows)

1645684 DB6: Upgrade to Version 10.1 of DB2 for LUW

967556 DB6: 6.20/6.40 Patch Collection Inst. - UNIX

1332109 DB6: Upgrade to Version 9.7 of DB2

1815567 db6_update_db location for SAP LVM 2.0

978555 DB6: Installing FixPacks for DB2 V9.1 on Windows

978554 DB6: Installing FixPaks for DB2 V9.1 (UNIX+Linux)

603981 DB6: Installing V8.2 FixPaks (as of FP9) on Win NT/Win 2000

603972 DB6: Installing V8.2 FixPaks (as of FixPak 9) on UNIX

1138550 DB6: Installing Fix Packs for DB2 V9.5 (Windows)

1138549 DB6: Installation of Fix Packs for DB2 V9.5 (UNIX & Linux)

928727 DB6: SAP System Inst. with EXT Kernel on UNIX

928728 DB6: SAP System Inst. with EXT Kernel on Windows

1686978 DB6: SQL0551N when executing db6util -sl

1649092 DB6: Connect Non SAP NetWeaver DB to SAP Solution Manager

1124987 DB6: Availability of administration functions

1678159 DB6: Role-Based Security Concept


Attachments
File Name File Size Mime Type

db6_update_client.SAR 11 application/octet-stream

db6_update_db.SAR 80 application/octet-stream

You might also like