Creating a Database Document Store

Use a SQL query to import documents from one or more database tables into Sybase Search.

Prerequisites 

Ensure that the appropriate JDBC driver is available in the install_location/OmniQ/lib directory. If it is not available, copy an appropriate JDBC driver to the same directory and restart the container that manages the database import function. For more information about the JDBC driver’s location, see your database vendor's documentation.

Sybase Search can import data from any database for which you have a JDBC driver.

  1. In the Enterprise Explorer, expand Sybase Search Servers > (Sybase Search Connection Profile) > Sybase Search Server > Document Stores.
  2. Right-click Database Import Manager and select New.
  3. Enter appropriate values for the fields that appear in the New Database Stores wizard:
    Table 1. Create Database Document Store

    Field

    Description

    Name

    Enter a name for the document store.

    Document Group Nonmembers

    Lists the document groups in which the document store is not a member.

    Select the document group to associate it with the document store.

    Document Group Members

    Lists the document groups in which the document store is a member.

    JDBC connection details

    Host

    Enter the network name or IP address of the database server.

    DB Name

    Enter the name of the database. For example, for MS Access, use the full directory path, C:\DBfiles\data\Customers.mdb.

    User Name

    Enter the name of the user for authenticating access to the database.

    Password

    Enter the user's password.

    Preset

    Select the type of database and the configuration of the JDBC options.

    Sybase Search automatically displays the port, driver, and URL, with the default values depending on the type of database that you select.

    Click Translate Placeholders to replace the URL template placeholders with the correct values.

    Port

    Enter the database server listener port.

    If you select a database from the Preset list, this field is automatically populated.

    Driver

    Enter the full class name of the JDBC driver.

    If you select a database from the Preset list, this field is automatically populated.

    URL

    Enter the JDBC URL to contact the database.

    If you select a database from the Preset pull-down list, this field is populated automatically.

    SQL Query

    Enter or select the SQL statement that designates the documents to be imported from a database. For example, SELECT au_id as DOC_REF, address as DOC_CONTENT from authors .

    DOC REF Length

    Enter the document reference length. The document reference length is only used for java.lang.String document reference types (the lengths of other types are implicit). If the document reference is not a string, this value is ignored.

  4. Click Finish to create the database document store.
Related concepts
Document Stores
Related tasks
Creating a File System Document Store
Creating a Passive Document Store
Viewing Document Store Metrics
Editing a Database Document Store
Deleting a Database Document Store
Related reference
SQL Import Query

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.