Oracle7 Server Distributed Systems Volume I: Distributed Data

Contents Index Home Previous Next

Defining the Open String

The open string is used by the transaction monitor to open the database. The maximum number of characters in an open string is 256. The syntax of the open string is summarized as follows; later sections provide more detail on required and optional fields.

Oracle_XA{+required_fields...} [+optional_fields...]

where required_fields are:

Acc=P//

or

Acc=P/user/password

SesTm=session_time_limit

and where optional_fields are:

DB=db_name

GPwd=P/group_password

LogDir=log_dir

MaxCur=maximum_#_of_open_cursors

SqlNet=connect_string

Note the following:

Required Fields

Required fields for the open string are described in this section.

Acc=P//

or

Acc=P/user/password

Acc Specifies user access information.
P Indicates that explicit user and password information is provided.
P// Indicates that no explicit user or password information is provided and that the operating system authentication form will be used.
For more information see "Managing Users and Resources," in Chapter 12 of the Oracle7 Server Administrator's Guide.
user A valid Oracle Server account.
password The corresponding current password.
For example, Acc=P/scott/tiger indicates that user and password information is provided. In this case, the user is scott and the password is tiger.

As previously mentioned, make sure that scott has the SELECT privilege on the V$XATRANS$ table.

Acc=P// indicates that no user or password information is provided, thus defaulting to operating system authentication.

SesTm=session_time_limit

SesTm Specifies the maximum length of time a transaction can be inactive before it is automatically deleted by the system.
session_time_limit This value should be the maximum time allowed in a transaction between one service and the next, or a service and the commit or rollback of the transaction.
For example, if the TPM uses remote procedure calls between the client and the servers, then SesTM applies to the time between the completion of one RPC and the initiation of the next RPC, or the tx_commit, or the tx_rollback.
The unit for this time limit is in seconds. The value of 0 indicates no limit, but entering a value of 0 is strongly discouraged. For example, SesTM=15 indicates that the session idle time limit is 15 seconds.

Optional Fields

Optional fields are described below.

DB=db_name

DB Specifies the database name
db_name Indicates the name used by Oracle precompilers to identify the database.
Application programs that use only the default database for the Oracle precompiler (that is, they do not use the AT clause in their SQL statements) should omit the DB=db_name clause in the open string.
Applications that use explicitly named databases should indicate that database name in their DB=db_name field.
OCI programs need to call the sqlld2() function to obtain the correct connection. See "Using OCIs with the Oracle XA Library," [*].
The db_name is not the sid and is not used to locate the database to be opened. Rather, it correlates the database opened by this open string with the name used in the application program to execute SQL statements. The sid is set from either the environment variable ORACLE_SID of the TPM application server or the sid given in the SQL*Net clause in the open string. The SQL*Net clause is described later in this section.
Some TPM vendors provide a way to name a group of servers that use the same open string. The DBA may find it convenient to choose the same name both for that purpose and for db_name.
For example, DB=payroll indicates that the database name is "payroll", and that the application server program will use that name in AT clauses.

For more information about precompilers (specifically Pro*C/C++), see "Interfacing to Precompilers and OCIs" [*].

GPwd=P/group_password

GPwd Specifies the server security group password.
P Indicates that an explicit server security group password is currently provided.
group_password Indicates the actual server security group password.
Server security groups provide an optional extra layer of protection between different applications running against the same Oracle Server instance. If no server security group option is specified, then the application using this open string will be part of an Oracle Server-defined server security group.
A transaction must be executed wholly within a server security group. For example, if a debit application specifies a different Oracle Server security group than a credit application, then the two may not be used in the same transaction.
For example, GPwd=P/banking indicates that the current server group password is "banking".

LogDir=log_dir

LogDir Specifies the directory on a local machine where the Oracle XA library error and tracing information may be logged.
log_dir Indicates the pathname of the directory where the tracing information should be stored. The default is $ORACLE_HOME/rdbms/log if ORACLE_HOME is set, otherwise it is the current directory.
For example, LogDir=/xa_trace indicates that the error and tracing information is located under the /xa_trace directory.

Note: Ensure that the directory you specify for logging exists and the application server can write to it, otherwise useful trace files may be lost without any error indication.

MaxCur=maximum_#_of_open_cursors

MaxCur Specifies the number of cursors to be alocated when the database is opened. It serves the same purpose as the precompiler option maxopencursors.
maximum_#_of_ open_cursors Indicates the number of open cursors to be cached.

For example, MaxCur=5 indicates that the precompiler should try to keep five open cursors cached.

Note: This parameter overrides the precompiler option maxopencursors that you might have specified in your source code or at compile time.

For more information on maxopencursors, see Chapter 6, Running the Oracle Precompilers," in the Programmer's Guide to the Oracle Precompilers.

SqlNet=db_link

SqlNet Specifies the SQL*Net database link.
db_link Indicates the string to use to log on to the system. The syntax for this string is the same as that used to set the TWO-TASK environment variable.
See your SQL*Net documentation for information about SQL*Net database links.
For example, SqlNet=hqfin@NEWDB indicates the database with sid=NEWDB accessed at host hqfin by TCP/IP.

The SqlNet parameter can be used to specify the ORACLE_SID in cases where you cannot control the server environment variable. It must also be used when the server needs to access more than one Oracle Server database. To use the SQL*Net string without actually accessing a remote database, use the Pipe driver.

For example:

SqlNet=localsid1

where:

localsid1 is an alias defined in the SQL*net tnsnames.ora file.
Make sure that all databases to be accessed with a SQL*Net database link have an entry in /etc/oratab.


Contents Index Home Previous Next