Sun Java System Directory Server Enterprise Edition 6.3 Administration Guide

ProcedureTo Create a JDBC Data View

You cannot use DSCC to perform this task. Use the command line, as described in this procedure.

  1. Create a JDBC data source for the relational database.

    $ dpconf create-jdbc-data-source -h host -p port -b db-name -B db-url -J driver-url \
    [-J driver-url]... -S driver-class source-name

    Currently, only one JDBC data source is supported for each JDBC data view. In other words, you cannot load balance across JDBC data sources. To access multiple JDBC data sources, you can create a data view for each data source, and join them together with a join data view.

    The following properties must be set when you create a JDBC data source:


    The name of the relational database, for example, payrolldb.


    The URL to the database, in the form jdbc:vendor:driver://dbhost:dbport.

    The db-url is not a complete JDBC database URL, because it does not contain the database name. (The database name is specified by the db-name property.)

    You must finish db-url with a / for MySQL, DB2, and Derby databases and with a : for Oracle database.


    The JDBC driver class, for example org.hsqldb.jdbcDriver.


    The path to the JDBC driver, for example file:///path/to/hsqldb/lib/hsqldb.jar.

    The driver-url property is multi-valued. Hence, driver-url can support multiple JAR files for the JDBC driver to ensure connectivity to the JDBC source on different platforms.

  2. Create a JDBC data source pool.

    $ dpconf create-jdbc-data-source-pool -h host -p port pool-name
  3. Attach the JDBC data source to the JDBC data source pool.

    $ dpconf attach-jdbc-data-source -h host -p port pool-name source-name
  4. Create a JDBC data view.

    $ dpconf create-jdbc-data-view -h host -p port view-name pool-name suffix-DN
  5. (Optional) View the list of JDBC data views to check that your data view has been created successfully.

    $ dpconf list-jdbc-data-views -h host -p port