Upgrading your existing embedded SQL applications to DB2® Version 9.7 involves managing
the changes between DB2 Version
9.7 and previous releases that impact these applications and verifying
that these applications function as expected.
About this task
Restrictions
This
procedure only applies to database applications programmed in C, C++,
COBOL, FORTRAN, and REXX.
Procedure
To upgrade your embedded SQL applications to DB2 Version 9.7:
- If you modified the library path environment variables,
ensure that those variables include the correct DB2 shared library path for your applications
as shown in Table 2.
The environment variables listed in this table specify additional
paths to enable your applications to find the appropriate DB2 shared library at runtime (in
most cases).
On the Linux operating
system: if you link an application using the RPATH link option
without also specifying the RUNPATH link option, the LD_LIBRARY_PATH environment
variable will be ignored at application run time, which can cause
your application to fail.
- Test your embedded SQL applications in a DB2 Version 9.7 testing environment. If testing
is successful, you do not need to perform any additional steps.
- If you bound your embedded applications using the BIND command
with the BLOCKING ALL or BLOCKING UNAMBIGIOUS clause
to enable the blocking of cursors for LOB columns, ensure that the instance_memory or database_memory database
configuration parameters are set to AUTOMATIC or
increase their numeric value to account for the extra memory usage.
If you cannot increase these database configuration parameters, you
have the following options:
- Rebind them using the BIND command specifying BLOCKING
NO or precompile them using the PRECOMPILE command
specifying the SQLRULES STD command parameter.
The BLOCKING NO clause disables blocking of all
cursors in the application. The SQLRULES STD command
parameter might have other effects than disabling blocking cursors.
- Modify the application source code and declare the cursor with
the FOR UPDATE clause to disable blocking.
- To explicitly specify the correct DB2 shared library path for your applications,
do one of the following:
If the application source code is available, rebuild the
application. Specify the required DB2 shared
library path as shown in Table 1. This is the
best option.
Create a wrapper script to run your application. In the
wrapper script, explicitly set the library path environment variable
to the required DB2 shared library
path as shown in Table 2.
If you do not have the original source code available,
run the db2chglibpath command to update the embedded
runtime library path within the binary code of your application. This
command is provided as-is and should therefore be considered a last
resort.
What to do next
After upgrading your embedded SQL applications, perform the
remaining steps in the
upgrading database
applications task.