Show TOC Start of Content Area

Background documentation Working with Data Sources  Locate the document in its SAP Library structure

Definition

A Data Source is defined using:

      A Data Source XML descriptor that contains essential information, such as the name of the underlying JDBC driver, database URL, connection pooling properties, and so on.

The Data Source XML adheres to the Document Type Definition (DTD) contained in the data-sources.dtd file. The DTD is available under <install_directory>\<SID>\JC<instance_number>\j2ee\cluster\server0\dtd directory of your SAP NetWeaver Application Server Java.

For a detailed description of the data-sources.dtd elements, refer to the data-sources.dtd.

      The SAP NetWeaver Administrator.

More information: Managing JDBC Data Sources

SQL Engines

In the context of the SAP NetWeaver Application Server Java, you can use Open SQL, Native SQL or Vendor SQL as the SQL engine types in your Data Source definition.

Vendor SQL can be used with any database that provides a JDBC-compliant driver.

Native SQL is a wrapper for the vendor-specific JDBC driver and provides important enhancements such as SQL trace and statement pooling. However, it can be used only with databases supported by SAP: Oracle 9.2 and 10.2, MSSQL 8, MaxDB 7.x, and DB2 for Linux, UNIX, Windows, versions 9.x and 8.x.

Open SQL is an SAP-proprietary database abstraction layer, which is designed to provide portability across various database platforms and performance optimizations through client-side data buffering.

More information: Running JPA Applications on the System Data Source

Data Source Types

Depending on the way DataSources obtain connections from the underlying database driver, as well as the way they handle transactions, the following two types are distinguished:

      Driver-based

This type of Data Source obtains Connection objects by calling the java.sql.Driver.connect() method implemented by the underlying JDBC driver. It returns a Connection, which can participate as a resource in local transactions. Besides using the UserTransaction object, transactions in this case can be started by invoking setAutoCommit(false) and completed by invoking commit() or rollback() methods on the Connection object.

      XADataSource-based

This type of Data Source supports distributed transactions and is useful if multiple Connection objects are participating in the same transaction. The Connection is obtained from the vendor’s implementation of javax.sql.XADataSource. Explicit invocations of setAutoCommit(), commit(), or rollback() on the Connection object are prohibited.

More Information

Deploying Data Sources

Deploying Data Source Aliases

Deploying JDBC Drivers

End of Content Area