Siebel Connector for Oracle Applications > Developer Procedures > Understanding the Database Adapter >

Additional Information


This section provides additional information about the DB Adapter.

Generating SQL

The DB Adapter generates SQL statements based upon the integration object definitions in tools and data in the input object. The process generates multiple SQL statements, executes them, and joins the result set.

Starting at the root of the tree, the Adapter generates SQL for all children of a component type. For better performance, the Adapter may use a SQL OR clause to group these children together. (Because the maximum length of a SQL statement is limited by ODBC, the length of the SQL statements can be controlled by changing a parameter.)

The DB Adapter business service uses the ODBC API for all database access. With the algorithm outlined above, DB Adapter needs to be processing only one component at a time. All the joins will occur in memory.

The DB Adapter relies upon the ODBC API to cache the underlying ODBC cursors. The ODBC API will not perform connection pooling because it can handle only one open ODBC connection at a time. DB Adapter will cache ODBC connections, if necessary.

Handling Transactions

The DB Adapter does not perform any BeginTransaction or EndTransaction on the Siebel side of data flow transactions. It does perform BEGIN, COMMIT, and ROLLBACK transactions on the Oracle database through the ODBC API. The ODBC API provides interfaces to support manual transaction control.

Translating Data Types

The ODBC API, used by the DB Adapter, converts the generic data types specified in the tools to the corresponding ODBC data types. The SQL integration objects are expected to encode these ODBC data types as their External Data Type. The SQL wizard or Oracle Applications wizard (that generates these integration objects) is used to set this external data type. The wizard may query Oracle Applications metadata to obtain database data types such as NUMBER, VARCHAR2, and so on. Then the ODBC API translates these application-specific data types into ODBC data types.

Passing Connection Parameters

The DB Adapter passes the following connection parameters to the ODBC API for its Connect method:

  • ODBC DSN
  • Database username
  • Database password
  • Table owner

The DB Adapter looks for these parameters in the following locations:

  • Method arguments
  • Server parameters
  • Service user properties

The Adapter assumes that these parameters are passed to it by the caller. It will not explicitly retrieve these parameters.

Error Handling

The DB Adapter handles errors like other eAI external adapters. If an error occurs in the Oracle application database system, the error is reported by the underlying low-level ODBC layer. Regardless of the error type (database connectivity problem, invalid table/view/column names, and so on), the error from the ODBC layer is passed up the stack to the caller of the DB Adapter. The DB Adapter will not interpret the error or perform any recover procedure.

Passing the Oracle Operations Field to the DTE

Because Oracle Applications must be able to specify operations that will be carried out on Siebel business objects, each Siebel integration object must have a meta-operator field that can be filled in to specify the operation. The Field Type for the field is set to System (External). The DB Adapter does not use this field; it just passes the field to the Data Transformation Engine (DTE).

Siebel Connector for Oracle Applications