The remote create-jdbc-resource command enables you to create a JDBC resource. Creating a JDBC resource is a dynamic event and does not require server restart.
Because all JNDI names are in the java:comp/env subcontext, when specifying the JNDI name of a JDBC resource in the Administration Console, use only the jdbc/name format is used. For example, a payroll database might be specified as jdbc/payrolldb.
Before creating a JDBC resource, you must first create a JDBC connection pool. For instructions, see To Create a JDBC Connection Pool.
Ensure that the server is running.
Remote commands require a running server.
Create a JDBC resource by using the create-jdbc-resource(1) command.
If necessary, notify users that the new resource has been created.
The following example command creates a JDBC resource named DerbyPool:
asadmin create-jdbc-resource --connectionpoolid DerbyPool jdbc/DerbyPool |
Information similar to the following is displayed if the connection pool is usable:
Command create-jdbc-resource executed successfully. |
To see the full syntax and options of the command, type asadmin create-jdbc-resource --help at the command line.