Sun Java System Directory Server Enterprise Edition 6.0 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 \
     -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:

    db-name

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

    db-url

    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.)

    driver-class

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

    driver-url

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

  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