Show TOC Start of Content Area

Procedure documentation Managing JDBC DataSources  Locate the document in its SAP Library structure

Use

You use this procedure to manage JDBC DataSources. The SAP NetWeaver Administrator enables you to:

·         Create JDBC DataSources

·         Delete JDBC DataSources

·         Manage connection pooling

·         Manage transaction isolation levels for connections

·         Define the type of connections using the SQL Engine

Caution

When you perform and operation involving the default data source, you must restart the cluster node for the changes to take effect.

Prerequisites

You are in the Configuration Management Infrastructure Application Resources function.

Procedure

If You Want To

Then

Create a Custom JDBC Data Source

...

       1.      Choose Create New Resource New JDBC Custom DataSource. The New JDBC Custom DataSource Creation area opens.

       2.      Specify the name of the application that is associated to the JDBC DataSource in the Application Name field. The system uses this name for the configuration that holds the JDBC DataSource.

       3.      Specify a unique name for the JDBC DataSource in the DataSource Name field. It is used when you look up the JDBC DataSource in the naming.

       4.      Select a driver from the Driver Name dropdown list box.

       5.      Select the SQL type support from the SQL Engine dropdown list box.

       6.      Select the transaction isolation level from the Isolation Level dropdown list box.

       7.      Select the JDBC type support from the JDBC Version dropdown list box. Depending on the JDBC version you choose, you have to enter the following additional information:

      If you choose JDBC 1.x support, you have to enter a driver class name, database URL, user name, and password.

      If you choose JDBC 2.0 support, you have to enter the data source type, ConnectionPool DataSource or XA DataSource. You must also enter the class name for the corresponding implementation provided by the driver and the vendor-specific initialization properties (serverName, portNumber, and so on).

You may also specify the class name for the ObjectFactory, which provides instances of ConnectionPoolDataSource or XADataSource objects if there is one implemented by the driver vendor.

       8.      Choose Save. The newly created DataSource appears in the list of JDBC Custom DataSources.

Delete a JDBC Custom Data Source

...

       1.      Select a JDBC Custom DataSource from the Resources List.

       2.      Choose Delete Selected Resource.

Define SQL type support

1.           ...

...

       1.      Select a JDBC DataSource from the Resources List.

       2.      Choose the Settings tab in the Resource Details.

       3.      To specify an SQL type support, select one of the available options from the SQL Engine dropdown list box:

·         Open SQL – the system returns a Database Interface (DBI) CommonConnection. By choosing this option, you choose to use all functions provided by SAP’s Open SQL for Java – that is, database vendor independence, SQL semantics, portability and syntax checks, SQL tracing mechanisms, statement caches, and table buffering.

·         Native SQL – the system returns a DBI DirectConnection. It provides only some of the functions of Open SQL for Java – SQL tracing, and statement caching.

·         Vendor SQL – the system returns a standard JDBC connection without using DBI at all.

       4.      To save the selected option, choose Save.

 

Define Transaction Isolation Level

...

       1.      Select a JDBC DataSource from the Resources List.

       2.      Choose the Settings tab in the Resource Details.

       3.      Select one of the available options from the Isolation Level dropdown list box:

·         None – this level indicates that the database does not support transactions

·         Default – the isolation level of the database in use

Note The default isolation level for an Open SQL data source is Read Uncommitted.

·         Read Uncommitted – this level enables transactions to read data that is being modified by other transactions before they either commit or roll back

·         Read Committed – this level enables transactions to read data only after the modifying transaction has committed

·         Repeatable Read – this level guarantees that the data the transaction reads is not being modified by another transaction and is not going to change unless the reading transaction modifies it and commits.

·         Serializable – this level guarantees maximum data integrity, since only one transaction run as a single serial operation can both read and modify the data at a time. Other transactions can access the data only after the serializable transaction has committed or rolled back.

       4.      To save the selected option, choose Save.

 

Manage Connection Pooling

2.           ...

...

       1.      Select a JDBC Data Source from the Resources List.

       2.      Choose the Connection Pooling tab in the Resource Details.

       3.      Specify the following parameters:

·         Initial Connections – number of connections that are obtained initially when the DataSource is created.

·         Maximum Connections – number of maximum connections from a single DataSource that are kept in the pool.

·         Maximum Time to Wait for Connection – when the maximum number of supported connections is reached and there are no free connections in the pool, the client waits the specified interval to obtain a connection. If the system does not return a connection to the pool during the interval, you get an exception thrown.

·         Connection Lifetime – A period in seconds after which the connection expires if it is not in use.

·         Cleanup Interval – An interval in seconds between two consecutive threads run by the system to clean up unused connections.

       4.      To save the parameters, choose Save.

 

End of Content Area