About this task
The examples in these instructions use the C language and
assume that conn is a pointer to a valid, but unconnected, connection
handle. The variable rc is assumed to have a data type of SQLRETURN.
Before you begin
If the database server you are connecting to is configured
to allow it, you can create an explicit trusted connection when connecting
through CLI.
This procedure assumes that you are not using an
XA transaction manager. If you are using an XA transaction manager
you only need to make sure that the transaction manager is configured
to set the configuration value TCTX to TRUE when it calls xa_open.
If that is done then any connection that can be an explicit trusted
connection will be. To verify that a connection is an explicit trusted
connection see step 3.
- The database that you are connecting to must support trusted contexts.
- A trusted context must be defined that will recognize the client
as being trustable.
- You must know the system authorization ID that is specified in
the trusted context. The system authorization ID of a trusted connection
is the authorization ID you provide to the server as a user name when
creating the connection. For your connection to be trusted by a particular
trusted context the system authorization ID must be the one specified
in that trusted context. Ask your security administrator for a valid
system authorization ID and the password for that ID.