After setting up the drivers and the log mapping table, use the dsconfig tool to configure the JDBC Access Log Publisher on the Directory Server. The following example uses dsconfig interactive mode to illustrate the steps required to configure the log publisher and the external database server.

  1. Copy the database .JAR files to the <server-root>/lib directory, and then restart the Directory Server.
  2. Launch the dsconfig tool in interactive command-line mode.
    $ bin/dsconfig
  3. Enter the connection parameters to bind to the Directory Server.

    Enter the host name or IP address, type of LDAP connection (LDAP, SSL, or StartTLS) that you are using on the Directory Server, the LDAP listener port number, the user bind DN, and the bind DN password.

  4. In the main menu, enter the number corresponding to Log Publisher.
  5. In the Log Publisher management menu, enter the option to create a new log publisher.
  6. In the Log Publisher template menu, enter n to create a new Log Publisher.
  7. In the Log Publisher Type menu, enter the option to create a new JDBC-Based Access Log Publisher.
  8. Enter a name for the JDBC Access Log Publisher.
  9. In the Enabled Property menu, enter the option to enable the log publisher.
  10. In the Server Property menu, enter the option to create a new JDBC External Server.
  11. Enter the name for the JDBC External Server.

    This is a symbolic name used to represent the database management system (DBMS).

  12. In theJDBC Driver Type Property menu, enter the number corresponding to the type of JDBC database driver type.
  13. Enter a name for the database-name property.

    This is the DBMS database name. The database name must contain the table referred to in the generated DDL.

  14. Enter the host name or IP address (server-host-name) of the external server.
  15. Enter the server listener port.

    For this example, enter 1541.

  16. Review the properties for the external server, and then enter f to apply the changes.
  17. If you need to supply your own JDBC URL, enter a for advanced properties to open the jdbc-driver-url property and supply the appropriate URL.

    The example below shows how to access an Oracle Thin Client connection using a SID instead of a Service.

    >>>> Configure the properties of the JDBC External Server
    
    Property	Value(s)
    -----------------------------------------------------
    1) description	-
    2) jdbc-driver-type oraclethin
    3) jdbc-driver-url jdbc:oracle:thin@myhost:1541:my_SID
    4) database-name	jdbc-test
    5) server-host-name localhost
    6) server-port	1541
    7) user-name	- 
    8) password	-
    
    ?) help
    f) finish - create the new JDBC External Server
    a) hide advanced properties of the JDBC External Server
    d) display the equivalent dsconfig arguments to create this object
    b) back
    q) quit
    
    Enter choice [b]: f

    When the JDBC Log Publisher is created, the Directory Server automatically generates a DDL file of the Log Field Mappings in the <server-root>/logs/ddls/<name-of-logger>.sql file, and you receive the following message.

    JDBC External Server was created successfully
  18. Import the DDL file to your database.