12 Data Source Configuration

This chapter describes how you can use Oracle Stream Analytics Visualizer to view, edit, and add data source configuration for use with Oracle Stream Analytics.

This chapter includes the following sections:

For more information, see Data Source Management.

12.1 View a Data Source Configuration

Using the Oracle Stream Analytics Visualizer, you can view the data source configuration for a selected Oracle Stream Analytics server.

View a Data Source Configuration

  1. In the left pane, click the Domain > Server node, where Domain refers to the name of your Oracle Stream Analytics domain and Server refers to the name of the server instance.
  2. In the right pane, click the DataSource tab.

    The DataSource tab appears as Figure 12-1 shows.

12.2 Edit Data Source Configuration

Using the Oracle Stream Analytics Visualizer, you can edit the data source configuration for a selected Oracle Stream Analytics server.

Edit Data Source Configuration

  1. In the left pane, click the Domain > Server node, where Domain refers to the name of your Oracle Stream Analytics domain and Server refers to the name of the server instance.
  2. In the right pane, click the DataSource tab.

    The DataSource tab appears as Figure 12-2 shows.

  3. In the Data Sources table, select the data source you want to edit by clicking on its name.
  4. Click Edit.

    The Datasource dialog displays.

  5. In the Datasource dialog, click the Data Source tab.

    The DataSource tab appears as Figure 12-3 shows.

    Figure 12-3 Edit Datasource: Data Source Tab

    Description of Figure 12-3 follows
    Description of "Figure 12-3 Edit Datasource: Data Source Tab"
  6. Configure the DataSource tab as Table 12-1 describes.

    Table 12-1 Edit Datasource: Data Source Parameters

    Parameter Description

    Name

    The name for this data source configuration.

    JNDI Name

    JNDI path to where this data source will be bound. This is the name your Oracle Stream Analytics application uses to look up the data source in JNDI.

    Global Tx Protocol

    Select the protocol for Oracle Stream Analytics to use for the transaction branch when processing a global transaction:

    • OnePhaseCommit (Default)

    • TwoPhaseCommit

    • LoggingLastResource

    • EmulateTwoPhaseCommit

    • None

  7. Click the Global Tx Protocol tab.

    The Global Tx Protocol tab displays.

  8. Configure the Global Tx Protocol tab as Table 12-2 describes.

    Table 12-2 Edit Datasource: Global Tx Protocol Parameters

    Parameter Description

    Database Type

    Select the type of JDBC driver to use:

    • Oracle

    • SQL Server 2005

    • Other

    URL

    Specify the database connection URL appropriate for your database. This URL includes the name of the database, the host and port of the computer on which the database server is running, and so on. Oracle Stream Analytics populates a default URL for database types it provides.

    Driver Name

    Specify the name of the driver for the selected database type. Oracle Stream Analytics automatically populates the driver name for types it provides.

    User Name

    Specify database user account name that you want to use for each connection in the data source.

    Password

    Specify database user password that you want to use for each connection in the data source

    Use XA

    Specify whether or not to use distributed transactions:

    • true: enable distributed transactions.

    • false: disable distributed transactions.

  9. Click the Connection Pool tab.

    The Connection Pool tab appears as Figure 12-4 shows.

    Figure 12-4 Edit Datasource: Connection Pool Tab

    Description of Figure 12-4 follows
    Description of "Figure 12-4 Edit Datasource: Connection Pool Tab"
  10. Configure the Connection Pool tab as Table 12-3 describes.

    Table 12-3 Edit Datasource: Connection Pool Parameters

    Parameter Description

    Initial Capacity

    Specify the number of physical connections to create when creating the connection pool.

    Max Capacity

    Specify the maximum number of physical connections that this connection pool can contain.

    Capacity Increment

    Specify how many connections to add when all the connections in the connection pool are in use and the connection pool receives a new connection request.

    Test

    Enter the name of a small table to use in a query if you want to test the database connection before handing it to the requesting application. The standard query is select 1 from table_name. If you prefer to use a different query as a connection test, enter SQL followed by a space and the SQL code you want to use to test database connections.

  11. Click Save.

    The datasource is updated in the Oracle Stream Analytics server configuration.

12.3 Add a Data Source Configuration

Using the Oracle Stream Analytics Visualizer, you can add the data source configuration for a selected Oracle Stream Analytics server.

Add a Data Source Configuration

  1. In the left pane, click the Domain > Server node, where Domain refers to the name of your Oracle Stream Analytics domain and Server refers to the name of the server instance.
  2. In the right pane, click the DataSource tab.

    The DataSource tab appears as Figure 12-5 shows.

  3. Click Add.

    The New Datasource dialog appears as Figure 12-6 shows. There are three accordion tabs:

    • Data Source: use this tab to identify the data source and specify whether or not to use a global transaction protocol.

    • Global Tx Protocol: use this tab to specify connection properties and whether or not to use XA.

    • Connection Pool: use this tab to specify connection pool properties.

  4. Click the Data Source tab.

    The DataSource tab appears as Figure 12-6 shows.

    Figure 12-6 New Datasource: Data Source Tab

    Description of Figure 12-6 follows
    Description of "Figure 12-6 New Datasource: Data Source Tab"
  5. Configure the DataSource tab as Table 12-4 describes.

    Table 12-4 New Datasource: Data Source Parameters

    Parameter Description

    Name

    The name for this data source configuration.

    JNDI Name

    JNDI path to where this data source will be bound. This is the name your Oracle Stream Analytics application uses to look up the data source in JNDI.

    Global Tx Protocol

    Select the protocol for Oracle Stream Analytics to use for the transaction branch when processing a global transaction:

    • OnePhaseCommit (Default)

    • TwoPhaseCommit

    • LoggingLastResource

    • EmulateTwoPhaseCommit

    • None

  6. Click the Global Tx Protocol tab.

    The Global Tx Protocol tab displays.

  7. In the Global Tx Protocol tab, set the configuration as Table 12-5 describes.

    Table 12-5 New Datasource: Global Tx Protocol Parameters

    Parameter Description

    Database Type

    Select the type of JDBC driver to use:

    • Oracle

    • SQL Server 2005

    • Other

    URL

    Specify the database connection URL appropriate for your database. This URL includes the name of the database, the host and port of the computer on which the database server is running, and so on. Oracle Stream Analytics populates a default URL for database types it provides.

    Driver Name

    Specify the name of the driver for the selected database type. Oracle Stream Analytics automatically populates the driver name for types it provides.

    User Name

    Specify database user account name that you want to use for each connection in the data source.

    Password

    Specify database user password that you want to use for each connection in the data source

    Use XA

    Specify whether or not to use distributed transactions:

    • true: enable distributed transactions.

    • false: disable distributed transactions.

  8. Click the Connection Pool tab.

    The Connection Pool tab appears as Figure 12-7 shows.

    Figure 12-7 New Datasource: Connection Pool Tab

    Description of Figure 12-7 follows
    Description of "Figure 12-7 New Datasource: Connection Pool Tab"
  9. Configure the Connection Pool tab as Table 12-6 describes.

    Table 12-6 New Datasource: Connection Pool Parameters

    Parameter Description

    Initial Capacity

    Specify the number of physical connections to create when creating the connection pool.

    Max Capacity

    Specify the maximum number of physical connections that this connection pool can contain.

    Capacity Increment

    Specify how many connections to add when all the connections in the connection pool are in use and the connection pool receives a new connection request.

    Test

    Enter the name of a small table to use in a query if you want to test the database connection before handing it to the requesting application. The standard query is select 1 from table_name. If you prefer to use a different query as a connection test, enter SQL followed by a space and the SQL code you want to use to test database connections.

  10. Click Save.

    The new datasource is added to the Oracle Stream Analytics server configuration.