3.4 Database Connections

The adapter definition requires defining a database connection to access the database schema. Because the Data Integrator is a tool for the development environment, the development database connection could differ from the production database accessed at run-time. You can define two different database connections. For more information, see Section 4.6, Setting a Run-Time Database Connection.

If you do not create and assign a schedule to the database element or alarm definition, the DEFAULT_SCHEDULE is automatically used.

If the current database connection is deleted for a definition currently being edited, then the current connection remains in effect. The next time the definition is edited, a new database connection must be defined.

Figure 3-3 Database Navigator Pane

View and use database schema to create queries for extracting element and alarm information into Operations Center.

The following sections cover defining and testing a development database:

3.4.1 Viewing a Database Schema

During the adapter definition creation process, a development database is defined as you specify basic details in the Create Adapter Definition wizard. Data Integrator automatically discovers and displays the database schema in the Database Navigator pane.

Click the plus (+) signs next to the database elements to open and explore the tables and columns of the database schema.

3.4.2 Running a Sample Query

The Database Navigator pane provides a quick way to view sample data. Click a table, then click Run (the green arrow) in the Fetch Rows section. Table data displays in the Query Results pane.

3.4.3 Changing the Development Data Source

The development data source is specified as a step in the Create Adapter Definition wizard (Section 2.2, Creating Adapter Definitions).

After you have started to define and build out all the necessary element definitions for an adapter definition, then changing databases is restricted to the same database type. For example, if an adapter definition relies on an Oracle database, you can modify the adapter definition to use a different Oracle database with the same table names, and so on. However, you cannot change to a different database type, such as Sybase.

WARNING:If it is necessary to change the database type, close all Data Integrator Editor dialog boxes and undeploy the definition before trying to change the database type.

To change the development data source, do one the following:

Changing the Development Data Source Using a New Database Connection

  1. In the Definition Editor, click Database > Open Connection to open the Update Business Data Integration wizard.

  2. Select the Define a New Connection radio button, then click Forward.

  3. Specify the new name in the Database Name field, then click Forward to continue.

  4. Specify the database parameters using the appropriate database tab:

    Hostname: The database server name. Applies to all connection types except JDBC.

    Port: The port number where the database listens for communications. Applies to all connection types except JDBC.

    Database: The database name (when defining a SQL Server, Sybase, or DB2 database connection). Applies to all connection types except JDBC.

    Server ID: The database name (when defining an Oracle database connection). Applies to all connection types except JDBC.

    JDBC Driver: The name of the class used to initiate a JDBC driver. Typically, the class name is in a format similar to com.product.Driver. You can hide this setting by not publishing the value as an adapter property or allow the driver to be overwritten at deployment time. Applies only to JDBC connections.

    JDBC URL: Specifies how the driver connects to a JDBC database. Applies only to JDBC Connections.

    Time Stamp Query: At runtime, Data Integrator periodically queries the JDBC database for availability. This query setting specifies how the database is queried to ensure it is available and servicing requests. Applies only to JDBC Connections.

    User Name: The name of the user account.

    Password: The password associated with the user name.

    Windows Domain: The name of the Windows domain to use for Windows native authentication. Applies to JTDS and SQL Server connections.

    For information about configuring the server for Windows Authentication, see Section 2.2.6, Configuring the Server for Windows Authentication.

    Database Type: This value (Oracle, SQL Server, Sybase, DB2, and so on) is prefilled based on the selected database tab. For information about using a nondefault database driver, see Section 2.2.5, Using a Different Database Driver for a Data Source.

Changing the Development Data Source Using an Existing Database Connection

  1. In the Definition Editor, click Database > Open Connection to open the Update Business Data Integration wizard.

  2. Select the Use an Existing Connection radio button, then click Forward.

  3. Click the Connection drop-down list, then select an existing database connection.

  4. Click Forward to review or edit database settings.

Changing the Development Data Source Using a New Connection Created from an Existing One

  1. In the Definition Editor, click Database > Open Connection to open the Update Business Data Integration wizard.

  2. Select the Use a New Connection from an Existing Connection radio button, then click Forward.

  3. Click the Existing Connection drop-down list, then select an existing connection.

  4. Enter the name for the new connection in the New Connection Name field, then click Forward.

  5. Edit the prefilled parameters to customize the new connection.

  6. Click Finish to save the new settings and use the new database.

Changing Settings for the Development Data Source

  1. In the Definition Editor, click Database > Open Connection to open the Update Business Data Integration wizard.

  2. Click the Use an Existing Connection radio button, then click Forward.

  3. Click the Connection drop-down list, then select the current database connection.

  4. Click Forward to review or edit database settings.

  5. Click Finish to save the new settings and use the new database.

Refreshing the Connection to the Development Data Source

  1. In the Definition Editor, click Database > Refresh Connection.

    The editor attempts to reestablish the database connection.

3.4.4 Testing the Development Database Connection

  1. In the Definition Editor, click Database > Test Connection.

    A confirmation message displays when the test is complete.

  2. Click OK to close the message box.