IBM DB2 Manual page 427

Table of Contents

Advertisement

-DBRMdir applies to programs that are to be run on DB2 for z/OS database
servers only.
-tracefile file-name
Enables tracing and identifies the output file for trace information. This option
should be specified only under the direction of IBM Software Support.
-tracelevel
If -tracefile is specified, indicates what to trace while db2sqljcustomize runs.
The default is TRACE_SQLJ. This option should be specified only under the
direction of IBM Software Support.
serialized-profile-name
Specifies the name of one or more serialized profiles from which the package is
bound. A serialized profile name is of the following form:
program-name_SJProfileIDNumber.ser
program-name is the name of the SQLJ source program, without the extension
.sqlj. n is an integer between 0 and m-1, where m is the number of serialized
profiles that the SQLJ translator generated from the SQLJ source program.
If you specify more than one serialized profile name to bind a single DB2
package from several serialized profiles, you must have specified the same
serialized profile names, in the same order, when you ran db2sqljcustomize.
Examples
db2sqljbind -user richler -password mordecai
-url jdbc:db2://server:50000/sample -bindoptions "EXPLAIN YES"
pgmname_SJProfile0.ser
Usage notes
Package names produced by db2sqljbind: The names of the packages that are
created by db2sqljbind are the names that you specified using the-rootpkgname or
-singlepkgname parameter when you ran db2sqljcustomize. If you did not specify
-rootpkgname or -singlepkgname, the package names are the first seven bytes of
the profile name, appended with the isolation level character.
DYNAMICRULES value for db2sqljbind: The DYNAMICRULES bind option
determines a number of run-time attributes for the DB2 package. Two of those
attributes are the authorization ID that is used to check authorization, and the
qualifier that is used for unqualified objects. To ensure the correct authorization for
dynamically executed positioned UPDATE and DELETE statements in SQLJ
programs, db2sqljbind always binds the DB2 packages with the
DYNAMICRULES(BIND) option. You cannot modify this option. The
DYNAMICRULES(BIND) option causes the SET CURRENT SQLID statement to
have no impact on an SQLJ program, because those statements affect only dynamic
statements that are bound with DYNAMICRULES values other than BIND.
With DYNAMICRULES(BIND), unqualified table, view, index, and alias names in
dynamic SQL statements are implicitly qualified with value of the bind option
QUALIFIER. If you do not specify QUALIFIER, DB2 uses the authorization ID of
the package owner as the implicit qualifier. If this behavior is not suitable for your
program, you can use one of the following techniques to set the correct qualifier:
v Force positioned UDPATE and DELETE statements to execute statically. You can
use the -staticpositioned YES option of db2sqljcustomize or db2sqljbind to do
Chapter 7. JDBC and SQLJ reference information
411

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents