Managing JDBC
DataSources
You use this procedure to manage JDBC DataSources. The SAP NetWeaver Administrator enables you to:
· Create JDBC DataSources
· Manage connection pooling
· Manage transaction isolation levels for connections
· Define the type of connections using the SQL Engine
To manage JDBC DataSources, choose System Management → Configuration →Application Resources and select JDBC DataSources from the Show dropdown menu.
If You Want To |
Then |
Create a JDBC DataSource |
... 1. Click the Create button. The Create Resource window opens. 2. Select JDBC DataSource from the Resource Type dropdown menu. 3. Specify a unique name for the JDBC DataSource in the Resource Name field. It is used when you look up the JDBC DataSource in the naming. 4. Select a system from the System dropdown menu. 5. Specify the name of the application that is associated to the JDBC DataSource. The system uses this name for the configuration that holds the JDBC DataSource. 6. Click the OK button. The newly created DataSource appears in the list of JDBC DataSources. |
Specify a JDBC DataSource Type |
... 1. Click the General tab. 2. To specify a DataSource Type, select one of the available options on the Data Source Type dropdown menu: · Driver Based · Connection Pool Based – if you choose this option, you obtain a CPDS directly from the driver. · XA Based – with this option you obtain a XADS from JDBC Connector Service. 3. Specify a driver library to use in the Driver Library field. 4. To save the selected option, click the Save button. |
Define SQL type support |
1. ... ... 1. Click a JDBC DataSource. 2. Click the General tab. 3. To specify an SQL type support, select one of the available options from the SQL Engine dropdown menu: · 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 a part 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, click the Save button.
|
Define Transaction Isolation Level |
... 1. Click a JDBC DataSource. 2. Click the General tab. 3. Select one of the available options from the Isolation Level dropdown menu: · None – this level indicates that the database does not support transactions · Default – the isolation level of the database in use
· Read Uncommited – this level enables transactions to read data that is being modified by other transactions before they either commit or roll back · Read Commited – 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 will not 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, click the Save button.
|
Manage Connection Pooling |
2. ... ... 1. Click a JDBC DataSource. 2. Click the Connection Pooling tab. 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. · Expiration – enables the parameters for connection life control – that is, Connection Lifetime and Cleanup Thread. By default, this option is disabled. · Connection Lifetime –A period in seconds, after which the connection expires if it is not in use. · Cleanup Thread – An interval in seconds between two consecutive threads run by the system to clean up unused connections. 4. To save the parameters, click the Save button. |
For
information about managing JDBC DataSources with the Visual Administrator
tool, see
JDBC
Connector Service.