Creating a Database Connector

Set up a database connector to enable Sybase Data Federation to access a relational database.

Prerequisites 

Create and configure the grid domain controller (GDC) for the domain that will host this database connector before performing this task.

To extract data from a relational database, your view model needs a pair of Data Federation services: a database operation to select the data, and a database connector to access the database. Database connectors are typically configured by database administrators.

  1. To connect to the GDC for the domain where you want to create the new database connector, go to Enterprise Explorer and right-click the GDC, then click Connect.
  2. Right-click the GDC and select New > Database Connector . The database connector wizard opens.
  3. Complete the following information on the wizard pages:
    Table 1. Name and Description page
    Field Description
    Name Enter a name for this database connector. For example, you can use the name of the database.
    Note: Do not include spaces in the name.
    Description (Optional) Enter some descriptive information about this database connector and the database it accesses.
    Table 2. Database Connector Information page - Connection tab
    Field Description
    Copy driver and connection detail from a database connection profile (Optional) Click Browse to select the database connection profile from which you want to copy connection details. When you click OK, its information displays in the wizard and you can edit it as needed.
    Data Federation grid server Select the grid server on which this database connector will run.
    Select a driver from the drop-down Select a database JDBC driver. A default JDBC driver is displayed. (The database connector won’t work until this driver is copied into the drivers directory of the local Data Federation installation directory.) For example:
    Sybase ASA v10.x Default

    You can click [...] to open the Driver Definitions dialog and define one.

    URL Enter the URL (connection string) for your JDBC driver. For more information, see the documentation for your database. Here is a sample connection string:
    jdbc:sybase:Tds:db-host-name:port/[db-name]

    Replace database host name, port, and database name placeholders in the connection string with actual values. The default port for most Sybase jConnect (TDS-based) drivers is 15000.

    Database Enter the name of the database this database connector will access.
    User name Enter the name of a database user account. The database connector will use this account to authenticate the database connection. All database operations associated with this database connector will be executed using this account.
    Password Enter the password for the user account specified in the User name field.
    Table 3. Database Connector Information page - Advanced Properties tab
    Field Description
    Allow ad hoc queries, schema browsing, and SQL view provisioning Select this option if you want to enable users to perform direct SQL queries against the database, browse the database’s metadata, or provision SQL views. Ad hoc queries can be thought of as single-use database operations; you can run an ad hoc query using either the CLI (see the Data Federation Command Reference, part of the DI Suite documentation set, which is available on the Sybase Product Manuals Web site at http://sybooks.sybase.com) or the Data Federation native Avaki JDBC driver (see the Data Federation API Guide, part of the DI Suite documentation set, which is available on the Sybase Product Manuals Web site at http://sybooks.sybase.com).
    Allow database identity mappings Select this option if database identity mappings are allowed on this database connector. A database identity mapping is a special-purpose user alias. It allows operations performed by a Data Federation user on a particular database connector to be executed in the name of an alternate user/password combination. For information on configuring database identity mappings, see the Data Federation Administration Guide, part of the DI Suite documentation set, which is available on the Sybase Product Manuals Web site at http://sybooks.sybase.com.
    Custom JDBC fetch size Select this option to fine-tune the performance of database operations. When an application uses the JDBC driver to execute a database operation, it typically processes the rows that are returned one after another, but the driver applies a buffering optimization by fetching rows in batches; the fetch size is the number of rows to be fetched in such a batch. In most circumstances, the driver’s default fetch size will be optimal, so you’ll want to keep the default setting. But if you decide that database operations executed through this database connector should generally use a nondefault fetch size, check this box and enter the relevant number of rows in the field.

    You can also set the fetch size for individual database operations. For more information, see the Data Federation Provisioning and Advanced Data Integration Guide, part of the DI Suite documentation set, which is available on the Sybase Product Manuals Web site at http://sybooks.sybase.com.

    Use Data Federation connection pooling When connection pooling is enabled, database connections can be reused, which typically improves performance for JDBC applications. By default, Data Federation connection pooling will keep up to 15 connections open to a back-end database. If your driver has built-in connection pooling, it might not be necessary to use Data Federation connection pooling. If you choose to use pooling, you can keep the default value of 15 connections or specify a different value in the Connections field.
    Connection property/Value (Optional) Specify connection properties for your database in the Connection property and Value fields; use the Add button to add each one to the list below. Use the Up and Down buttons to reorder properties in the list.

    For information about database-specific properties, see the documentation for your database and its JDBC driver.

    Table 4. Database Connector Information page - XA Properties tab
    Option Description
    XA driver class (Optional) Specify an XA driver class if you plan to use this database connector to support distributed transactions. This class must reside in the JAR file for the database vendor’s JDBC driver.
    Connection property/Value connection properties: for XA drivers (Optional) Specify XA connection properties allowed or required by your XA driver.
    Table 5. Database Connector Information page - Admin Information tab
    Field Description
    Name (Optional) Enter the database administrator’s full name.
    Email (Optional) Enter the database administrator’s email address.
    Phone (Optional) Enter the database administrator’s telephone number.
    Organization (Optional) Enter the name of the department or group to which the database administrator belongs.
  4. (Optional) You can test the connection by clicking Test connection.

    If the ping fails, verify the connection values.

  5. (Optional) Click Next and review the Summary page. Click Back to make changes if needed.
  6. Click Finish to create the database connector.

WorkSpace Data Federation creates the database connector, tests it, and displays the results.

You can find the new database connector in the Enterprise Explorer tree under the grid domain controller: Categories/ViewLibrary/DatabaseServices/database_connector_name/domain_name.database_connector_name.

Later, if you want to modify the database connector: right-click it in Enterprise Explorer and select Edit from the context menu. WorkSpace displays the database connector wizard, which lets you edit all the properties described in this procedure.

Next 

To use a database connector, configure a database operation or provision a SQL view. Database operations and SQL views extract data from the database.

For product-related issues, contact Sybase Technical Support at 1-800-8SYBASE. Send your feedback on this help topic directly to Sybase Technical Publications: pubs@sybase.com