Show TOC Start of Content Area

Procedure documentation Creating a DataSource with JDBC 1.x Driver  Locate the document in its SAP Library structure

Use

You can use the administration tools that the J2EE Engine provides to create a standalone DataSource. It is deployed on the server as an application that actually contains only the deployment descriptor for the DataSource object.

Note

The installation procedure for the J2EE Engine creates a JDBC 1.x compatible DataSource that is used by the services running on the engine. This DataSource is available immediately after the JDBC Connector Service is started. For more information about its usage, see Using the Default DataSource in the Development Manual.

If your applications use the system database schema, we recommend that you use the default DataSource.

However, if you want to use other database schemas, you should create a separate DataSource for each of them.

Procedure

You can create a DataSource instance using the:

·        Visual Administrator

·        Console Administrator

Visual Administrator

...

       1.      In the Runtime tab of JDBC Connector Service, choose Resources DataSources.

       2.      Choose This graphic is explained in the accompanying text Create New Driver or DataSource on the toolbar.

       3.      Complete the following fields. All required fields are marked with an asterisk (*):

Field

Description

Example

Application Name

Specify a name to which the DataSource is associated. The system uses this name for the configuration that holds the DataSource.

Caution

Do not enter the name of an application already deployed on the server. This leads to re-deployment of the application and data loss.

myApplication

Name

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

This graphic is explained in the accompanying text

When creating a standalone DataSource, make sure the name is unique. If a DataSource or an application with the same name already exists, the new DataSource replaces it.

myDataSource

Aliases

You can specify unlimited number of aliases. They are alternative to the name of the DataSource and enable the usage of a single DataSource by multiple applications.

For more information, see Managing Aliases.

myDS

MY_DS

my_dataSource

Driver Name

Choose a 1.x-compatible driver from the drop-down menu with registered drivers.

myDriver

JDBC Version

Choose 1.x from the drop-down menu.

 

Driver Class

Enter the fully Java qualified name of the driver’s main class.

com.sap.dbtech.jdbc.DriverSapDB

Database URL

Enter the database URL.

This graphic is explained in the accompanying text

The JDBC URL consists of three parts: a protocol identifier (always JDBC), a driver identifier (for example, IDB, Oracle, and so on), and a database identifier (the format is driver specific).

jdbc:sapdb://localhost/TST?timeout=0

User

Specify the username that you use to log in to the database server.

Administrator

Password

Specify the password for your database user.

admin

Note

You can specify any additional driver-specific properties using the Additional tab of the JDBC Connector Service runtime control.

Note

If you want to create a DataSource similar to an existing one, choose This graphic is explained in the accompanying text Copy All DataSource Properties on the toolbar to copy the properties of the existing DataSource. Then choose This graphic is explained in the accompanying text Create New Driver or DataSource and then This graphic is explained in the accompanying text Paste All DataSource Properties to paste the properties. Modify the parameters and save the DataSource object with a new name or in another application.

       4.      In the Additional tab, set the SQL type support. For more information, see SQL Engine.

       5.      To save your entries, choose This graphic is explained in the accompanying text Save Changes on the toolbar.

Console Administrator

Use make_data_source command from the DBPOOL Shell command group. For more information, see DBPOOL in the Reference Manual.

 

See also:

Creating a DataSource with JDBC 2.0 Driver

 

 

End of Content Area