+

Search Tips   |   Advanced Search

 

Configure new data sources using scripting

 

You can configure new data sources using scripting and the wsadmin tool. Before starting this task, the wsadmin tool must be running. See the Start the wsadmin scripting client article for more information.

In WAS, any JDBC driver properties that are required by your database vendor must be set as data source properties. Consult the article Data source minimum required settings, by vendor to see a list of these properties and setting options, ordered by JDBC provider type. Consult your database vendor documentation to learn about available optional data source properties. Script them as custom properties after you create the data source. In the Related links section of this article, click the "Configuring new data source custom properties using scripting" link for more information.

 

Overview

There are two ways to perform this task; use either of the following wsadmin scripting objects:

AdminConfig gives you more configuration control than the AdminTask object. When you create a data source using AdminTask, you supply universally required properties only, such as a JNDI name for the data source. (Consult the article JDBCProviderManagement command group for the AdminTask object for more information.) Other properties that are required by your JDBC driver are assigned default values by Application Server. You cannot use AdminTask commands to set or edit these properties; use AdminConfig commands.

 

Procedure

 

What to do next

To set additional properties that are supported by your JDBC driver, script them as data source custom properties.



Configure new data source custom properties using scripting
Use the AdminConfig object for scripted administration

 

Related Reference


Commands for the AdminConfig object