Skip Headers
Oracle® Real-Time Decisions Installation and Administration Guide
Version 3.0.0.1

Part Number E13856-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

8 Configuring Data Access for Oracle Real-Time Decisions

JDBC data sources are used by Oracle RTD to access outside data. Data sources are application-server specific, and are used to identify new JDBC data sources that are to be used as suppliers in Inline Services. These data sources can be RDBMS databases, as well as ODBC identified data sources. For detailed information about supported versions for enterprise data sources, refer to Oracle Real-Time Decisions System Requirements and Supported Platforms for Version 3.0.

This chapter contains the following topics:

8.1 Creating Additional JDBC Data Sources in OC4J

If you are running Real-Time Decision Server on OC4J, follow the steps in this section to configure JDBC data sources so that your Inline Services can access outside data.

This section contains the following topics:

8.1.1 Providing Access to JDBC Jar Files for Your Data Source

Follow the steps in this section to give OC4J access to the JDBC jar files for your data source. The jar file names vary, depending on the type of database you are adding as a data source.

To provide access to JDBC jar files:

  1. If you are using standalone OC4J, copy the appropriate jar files to OC4J_HOME/j2ee/home/applib. If you are using Oracle Application Server, copy the appropriate jar files to ORACLE_AS_HOME/j2ee/oc4j_instance/applib. Copy the jars appropriate for your data source:

    • For SQL Server, copy the file sqljdbc.jar in the directory RTD_HOME/lib/jdbc.

    • For DB2, copy the files db2jcc.jar and db2jcc_license_cu.jar in RTD_HOME/lib/jdbc.

    • For Teradata, For Teradata, copy the files tdgssconfig.jar and terajdbc4.jar.

      You can download these files from the Teradata Web site at http://www.teradata.com. Make sure the jar files are from Teradata JDBC Driver for Teradata 12.0. This JDBC driver supports both Teradata V2R6 and 12.0.

    • For Oracle BI EE, copy the file bijdbc.jar.

      You can find this file in your Oracle BI EE installation.

  2. Restart OC4J.

You do not need to copy any jar files if you are adding an Oracle Database or Oracle's Siebel Analytics Server data source.

8.1.2 Creating a Connection Pool and Data Source in OC4J

You can use the Application Server Control to create a connection pool and data source in OC4J. Before you begin, ensure that OC4J is started.

To create a connection pool and data source in OC4J:

  1. Log in to the Application Server Control as the oc4jadmin user. You can access the Application Server Control at http://oc4j_host:port/em. For the standalone version of OC4J, the port number is typically 8888.

  2. Click the Administration tab. Then, under the Services heading, click the JDBC Resources task. Under the Connection Pools heading, click Create to create a new connection pool for your enterprise database.

    If you are using OC4J as part of Oracle Application Server, first click home under the Groups heading, then proceed to the Administration tab.

  3. On the Create Connection Pool - Application page, ensure the following:

    • For SQL Server and DB2 connection pools, default is selected for Application

      For Oracle connection pools, OracleRTD is selected for Application

    • New Connection Pool is selected for Connection Pool Type.

    Then, click Continue.

    Note:

    If the enterprise data source you want to add is the same type of database as your Oracle RTD Database, you may want to select New Connection Pool from Existing Connection Pool for Connection Pool Type. Then, select "RTDConnectionPool" from the Existing Connection Pool list.
  4. On the Create Connection Pool page, enter db_name_Pool for Name (for example, mydatabase_Pool).

  5. For Connection Factory Class, enter one of the following:

    • SQL Server: com.microsoft.sqlserver.jdbc.SQLServerDriver

    • Oracle Database: oracle.jdbc.pool.OracleDataSource

    • DB2: com.ibm.db2.jcc.DB2Driver

    • Teradata: com.teradata.jdbc.TeraDriver

    • Oracle BI EE: oracle.bi.jdbc.AnaJdbcDriver

    • Siebel Analytics Server: sun.jdbc.odbc.JdbcOdbcDriver

  6. For JDBC URL, enter one of the following:

    • SQL Server:

      jdbc:sqlserver://db_host:db_port;databaseName=db_name
      

      Note:

      If the data source is on a SQL Server named instance, specify the db_host parameter using the format host_name\instance_name.
    • Oracle Database:

      jdbc:oracle:thin:@db_host:db_port:sid
      
    • DB2:

      jdbc:db2://db_host:db_port/db_name
      
    • Teradata:

      jdbc:teradata://server_name:port/db_name/param1,param2,...
      

      Note:

      If db_name is missing, the current login user's default database is used. For example, with default database RTD30, jdbc:teradata://64.181.232.117//TMODE=ANSI,CHARSET=ASCII executes as jdbc:teradata://64.181.232.117/RTD30/TMODE=ANSI,CHARSET=ASCII
    • Oracle BI EE:

      jdbc:oraclebi://server_name:9703/user=bi_user_name;password=bi_password;
      catalog=catalog_name;
      

      The catalog name is optional.

    • Siebel Analytics Server:

      jdbc:odbc:SAS_DSN_name
      

      Note:

      To add a Siebel Analytics Server data source, you must first create and configure a Siebel Analytics ODBC data source name (SAS_DSN_name). Refer to Siebel Analytics Server Administration Guide for complete details. The Siebel Analytics Server data source name cannot contain spaces.
  7. Under the Credentials heading, for Username, provide a database user name with run-time privileges for the enterprise instance. Then, provide the corresponding password. See Oracle Fusion Middleware Security Guide for information about whether to provide a cleartext password or an indirect password.

    If you are adding an Oracle BI EE or Siebel Analytics Server data source, provide credentials for Oracle BI EE or Siebel Analytics Server rather than a database user name.

  8. Click Finish.

  9. On the JDBC Resources page, under the Data Sources heading, click Create to define a new data source.

  10. On the Create Data Source - Application & Type page, ensure the following:

    • For SQL Server and DB2 data sources, default is selected for Application

      For Oracle data sources, OracleRTD is selected for Application

    • Managed Data Source is selected for Data Source Type

    Then, click Continue.

    Note:

    If the enterprise data source you want to add is the same type of database as your Oracle RTD Database, you may want to select New Data Source from Existing Data Source for Data Source Type. Then, select SDDS from the Existing Data Source list.
  11. On the Create Data Source - Managed Data Source page, follow these steps:

    1. For Name, enter a name for the data source (for example, the name of your database).

    2. For JNDI Location, enter a jndi_name of your choice. The jndi_name you provide will be used by Oracle RTD to look up the data source.

    3. For Connection Pool, select db_name_Pool.

    4. Click Finish.

  12. On the JDBC Resources page, in the Data Sources table, click Test Connection for the enterprise data source you just added.

    Note:

    Do not test the connection if you are adding an Oracle BI EE or Siebel Analytics Server data source.

    Follow these steps to test the data source:

    1. If you are adding an Oracle Database data source, keep the default settings and click Test.

    2. If you are adding a SQL Server or DB2 data source, change the SQL Statement to select * from your_table_name, where your_table_name is the name of an existing table in the database, then click Test.

    3. If you are adding a Teradata data source, for test connection purposes, it is better to test a small table. Change the SQL Statement to either select count(*) from your_table_name or LOCK TABLE your_table_name FOR READ SELECT * FROM your_table_name. Then click Test.

    If the connection is not established successfully, restart OC4J and then test the data source again. If it still fails, ensure that your connection pool settings are correct.

8.1.3 Adding the New Data Source to Oracle RTD

After you create a connection pool and data source in OC4J, you must add the new data source to Oracle RTD. To do this, you must add a resource reference to four different XML files. Before you begin, ensure that OC4J is not running.

To add the new data source to Oracle RTD:

  1. If Oracle RTD is running on standalone OC4J, go to the directory OC4J_HOME/j2ee/home/applications/OracleRTD. If Oracle RTD is running on Oracle Application Server, go to ORACLE_AS_HOME/j2ee/oc4j_instance/applications/OracleRTD.

    This directory is the location where the RTD.ear file was expanded when you deployed it as an application.

  2. Locate the file ./rtis/web.xml and open it for editing. Scroll to the bottom of the file. Copy the section for the definition of the resource reference of SDDS_RTIS and paste it after the existing section. In the copied section, replace the string SDDS with the JNDI name (jndi_name) you entered in Step 11 of Section 8.1.2. For example:

    <resource-ref id="jndi_name_RTIS">
    <res-ref-name>jndi_name</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Unshareable</res-sharing-scope>
    </resource-ref>
    

    Then, save the changes and close the file.

  3. Locate the file ./soap/web.xml and open it for editing. Scroll to the bottom of the file. Copy the section for the definition of the resource reference for SDDS_Axis and paste it after the existing section. In the copied section, replace the string SDDS with the JNDI name (jndi_name) you entered in Step 11 of Section 8.1.2. For example:

    <resource-ref id="jndi_name_Axis">
    <res-ref-name>jndi_name</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Unshareable</res-sharing-scope>
    </resource-ref>
    

    Then, save the changes and close the file.

  4. Go to the directory OC4J_HOME/j2ee/home/application-deployments/OracleRTD. Make sure to go to the application-deployments directory, not the applications directory.

  5. Locate the file ./soap/orion-web.xml and open it for editing. Scroll to the bottom of the file. Copy the line for the definition of the resource reference mapping of SDDS and paste it after the existing line. In the copied line, replace the string SDDS with the JNDI name (jndi_name) you entered in Step 11 of Section 8.1.2. For example:

    <resource-ref-mapping name="jndi_name" location="jndi_name"/>
    

    Then, save the changes and close the file.

  6. Locate the file ./rtis/orion-web.xml and open it for editing. Scroll to the bottom of the file. Copy the line for the definition of the resource reference mapping of SDDS and paste it after the existing line. In the copied line, replace the string SDDS with the JNDI name (jndi_name) you entered in Step 11 of Section 8.1.2. For example:

    <resource-ref-mapping name="jndi_name" location="jndi_name"/>
    

    Then, save the changes and close the file.

  7. Start OC4J.

8.2 Creating Additional JDBC Data Sources in WebSphere

If you are running Real-Time Decision Server on WebSphere, follow the steps in this section to configure JDBC data sources so that your Inline Services can access outside data.

This section contains the following topics:

8.2.1 Creating a Data Provider and Data Source in WebSphere

You can use the Integrated Solutions Console to create a data provider and data source in WebSphere. Before you begin, ensure that WebSphere is started.

To create a data provider and data source in WebSphere:

  1. If the enterprise data source you want to add is a Teradata data source, you must first copy the files terajdbc4.jar, tdgssjava.jar, and tdgssconfig.jar to RTD_HOME/lib/jdbc. You can download these files from the Teradata Web site at http://www.teradata.com. Make sure the jar files are version 3.3.0.2 or later.

  2. Access the Integrated Solutions Console at the URL http://websphere_host:port/ibm/console. At the login prompt, enter the administrator user name and password. On Windows, you can also access the Integrated Solutions Console through Start > Programs.

  3. In the tree on the left, expand Resources, then expand JDBC and choose JDBC Providers.

  4. Ensure that the scope is set correctly (to Node=host_nameNode_number), then click New.

  5. For Database type, select User-defined.

  6. For Implementation class name, enter one of the following values:

    • SQL Server:

      com.microsoft.sqlserver.jdbc.SQLServerConnectionPoolDataSource
      
    • Oracle Database:

      oracle.jdbc.pool.OracleConnectionPoolDataSource
      
    • DB2:

      com.ibm.db2.jcc.DB2ConnectionPoolDataSource
      
    • Teradata:

      com.teradata.jdbc.TeraConnectionPoolDataSource
      
  7. For Name, enter a name for this provider (such as the name of the database). You can also enter an optional description (recommended). Then, click Next.

  8. For Class path, enter one of the following values:

    • SQL Server:

      RTD_HOME/lib/jdbc/sqljdbc.jar
      
    • Oracle Database:

      RTD_HOME/lib/jdbc/ojdbc14.jar
      
    • DB2:

      RTD_HOME/lib/jdbc/db2jcc.jar;RTD_HOME/lib/jdbc/db2jcc_license_cu.jar
      
    • Teradata:

      RTD_HOME/lib/jdbc/terajdbc4.jar;RTD_HOME/lib/jdbc/tdgssconfig.jar
      

    Make sure to replace RTD_HOME with the actual Oracle RTD installation path.

  9. Click Next, then click Finish, then click Save.

  10. Create a J2C authentication entry for the data source, as follows:

    1. In the tree on the left, expand Security and choose Secure administration, applications, and infrastructure.

    2. Under the Authentication heading, expand Java Authentication and Authorization Service and choose J2C authentication data. Then, click New.

    3. For Alias, enter a descriptive name for the authentication entry (such as db_name_auth).

    4. For User ID and Password, enter the user name and password for the enterprise database.

    5. Click OK, then click Save.

  11. In the tree on the left, expand Resources, then expand JDBC and choose JDBC Providers. Then, click the name of the JDBC provider you added for this database.

  12. Under the Additional Properties heading, click Data sources.

  13. Create a new data source, as follows:

    1. Click New.

    2. For Data source name, provide a descriptive name for the data source (for example, db_name_DS.

    3. For JNDI name, enter the same value you provided for Data source name. This value will appear in Decision Studio when you perform an Import in a data source object.

    4. For Component-managed authentication alias and XA authentication, select the J2C authentication alias you created in Step 10.

    5. Click Next, then click Finish, then click Save.

  14. Click the name of the data source you just added.

  15. If you are adding a SQL Server data source, follow these steps to set properties for the data source:

    1. Under the Additional Properties heading, click Custom properties.

    2. Click the Select All icon, then click Delete to delete any existing custom properties.

    3. Click New, enter databaseName for Name, then enter the name of your database for Value. Then, click OK.

    4. Click New, enter portNumber for Name, then enter the port number of your database (typically 1433) for Value. Then, click OK.

    5. Click New, enter serverName for Name, then enter the name of your database server for Value.

      Note:

      If the data source is on a SQL Server named instance, specify the name of your database server using the format host_name\instance_name.
    6. Click OK.

    7. Click Save.

  16. If you are adding an Oracle Database data source, follow these steps to set properties for the data source:

    1. Scroll to the bottom of the page and locate the Oracle data source properties section.

    2. For URL, enter jdbc:oracle:thin:@db_host:db_port:sid.

      For example:

      jdbc:oracle:thin:@dbhost.company.com:1521:orcl
      
    3. Click OK, then click Save.

  17. If you adding a DB2 data source, follow these steps to set properties for the data source:

    1. Scroll to the bottom of the page and locate the DB2 Universal data source properties section.

    2. For Database name, enter the name of your database.

    3. For Driver type, enter 4.

    4. For Server name, enter the name of your database server.

    5. For Port number, enter the port number of your database.

    6. Click OK, then click Save.

  18. If you are adding a Teradata data source, follow these steps to set properties for the data source:

    1. Under the Additional Properties heading, click Custom properties.

    2. Click DSName, enter the name of the Teradata database server host for Value, and click OK.

    3. Click databaseName, enter the name of the Teradata database for Value, and click OK.

    4. Click Save.

8.2.2 Adding the New Data Source to Oracle RTD

After you create a data provider and data source in WebSphere, you must add the new data source to Oracle RTD. To do this, you must add a resource reference to two different web.xml files, as follows:

  1. Open the following file for editing:

    WEBSPHERE_HOME/AppServer/profiles/profile_name/config/cells/server_name/
    applications/OracleRTD.ear/deployments/OracleRTD/rtis.war/WEB-INF/web.xml
    
  2. Create a new <resource-ref> entry, as follows:

    1. Copy the existing <resource-ref> entry for the Oracle RTD Database (SDDS) and paste it directly below.

    2. Modify the id attribute by entering a descriptive value followed by _RTIS, similar to the SDDS entry. The id must have a unique value within the file.

    3. Modify the <res-ref-name> tag by entering the JNDI name you provided in Step 13 of Section 8.2.1.

    The following example shows a new <resource-ref> entry for a Teradata data source:

    <resource-ref id="TeradataDS_RTIS">
      <res-ref-name>TeradataDS</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      <res-sharing-scope>Unshareable</res-sharing-scope>
    </resource-ref>
    
  3. After you have completed the new entry, save and close the file.

  4. Open the following file for editing:

    WEBSPHERE_HOME/AppServer/profiles/profile_name/config/cells/server_name/
    applications/OracleRTD.ear/deployments/OracleRTD/soap.war/WEB-INF/web.xml
    
  5. Create a new <resource-ref> entry, as follows:

    1. Copy the existing <resource-ref> entry for the Oracle RTD Database (SDDS) and paste it directly below.

    2. Modify the id attribute by entering a descriptive value followed by _Axis, similar to the SDDS entry. The id must have a unique value within the file.

    3. Modify the <res-ref-name> tag by entering the JNDI name you provided in Step 13 of Section 8.2.1.

    The following example shows a new <resource-ref> entry for a Teradata data source:

    <resource-ref id="TeradataDS_Axis">
      <res-ref-name>TeradataDS</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      <res-sharing-scope>Unshareable</res-sharing-scope>
    </resource-ref>
    
  6. After you have completed the new entry, save and close the file.

8.2.3 Updating Resource References in WebSphere

After you add resource references to the web.xml files, you must configure the resource references in WebSphere using the Integrated Solutions Console. Before you begin, ensure that WebSphere is started.

To update resource references in WebSphere:

  1. Access the Integrated Solutions Console at the URL http://websphere_host:port/ibm/console. At the login prompt, enter the administrator user name and password. On Windows, you can also access the Integrated Solutions Console through Start > Programs.

  2. In the tree on the left, expand Applications, then choose Enterprise Applications. Then, click Oracle RTD.

  3. Under the References heading, click Resource references.

  4. Scroll down to the table that shows the resource references and locate the two entries that you added to the web.xml files.

  5. For each entry, set the Target Resource JNDI Name to the JNDI name you provided in Step 13 of Section 8.2.1.

  6. Select both entries, then scroll up to the Specify authentication method heading and select Use default method (many-to-one mapping). Then, for Authentication data entry, select the J2C authentication entry you created in Step 10 of Section 8.2.1.

  7. Click Apply.

  8. Scroll to the bottom of the table and click OK, then click Save.

8.2.4 Adding Additional Data Sources

If you want to add another data source of the same type, start from Step 10 of Section 8.2.1. You do not need to create an additional JDBC provider if you have already created one for a particular database type.

If you want to add another data source of a different type, you must repeat all the steps.

8.3 Creating Additional JDBC Data Sources in WebLogic

If you are running Real-Time Decision Server on WebLogic, follow the steps in this section to configure JDBC data sources so that your Inline Services can access outside data.

This section contains the following topics:

8.3.1 Setting the Path to JDBC Jar Files for Your Data Source

To set the path to JDBC jar files for your data source, you may need to add paths to the Classpath for your managed server, if your data source database is different from the Oracle RTD database, and you have not previously edited the Classpath.

  1. If the enterprise data source you want to add is a Teradata data source, copy the files terajdbc4.jar, and tdgssconfig.jar to RTD_HOME/lib/jdbc. You can download these files from the Teradata Web site at http://www.teradata.com. Make sure the jar files are from Teradata JDBC Driver for Teradata 12.0. This JDBC driver supports both Teradata V2R6 and 12.0.

  2. If the enterprise data source you want to add is an Oracle BI EE data source, copy the file bijdbc.jar to RTD_HOME/lib/jdbc. You can find this file in your Oracle BI EE installation.

  3. Log in to the Administration Console for your Oracle RTD domain.

    http://weblogic_host:port/console.

  4. Navigate the path:

    Environment > Servers > managed_server_name > Configuration > Start Server tab.

  5. Add the appropriate path or paths to ClassPath, replacing RTD_HOME with your Oracle RTD directory, and including Windows or Linux/Unix separators between entries. Do not include spaces between your entries.

    • For Oracle

      RTD_HOME\lib\jdbc\ojdbc14.jar

    • For SQLServer

      RTD_HOME\lib\jdbc\sqljdbc.jar

    • For DB2

      RTD_HOME\lib\jdbc\db2jcc.jar

      RTD_HOME\lib\jdbc\db2jcc_license_cu.jar

    • For Teradata

      RTD_HOME\lib\jdbc\terajdbc4.jar

      RTD_HOME\lib\jdbc\tdgssconfig.jar

    • For Oracle BI EE

      RTD_HOME\lib\jdbc\bijdbc.jar

    Note:

    If it is not already specified in the Classpath, add the entry MW_HOME\wlserver_10.3\server\lib\weblogic.jar, after replacing MW_HOME with the directory where WebLogic is installed.
  6. Save.

8.3.2 Creating a Data Source in WebLogic

You can use the WebLogic Server Administration Console to create a data source in WebLogic. Before you begin, ensure that WebLogic is started.

Notes:

  1. For general information about configuring WebLogic JDBC data sources, see Oracle Fusion Middleware Configuring and Managing JDBC for Oracle WebLogic Server.
  2. If your WebLogic version is 11g 10.3.3+ and your Oracle RTD database is in an Oracle database server, see Section 8.3.2.1, "Creating an Oracle JDBC Provider for the Oracle RTD Database on WebLogic 11g 10.3.3+."

To create a data source in WebLogic:

  1. Access the WebLogic Server Administration Console for your Oracle RTD domain at the URL http://weblogic_host:port/console. At the login prompt, enter the administrator user name and password. On Windows, you can also access the WebLogic Server Administration Console through Start > Programs > Oracle WebLogic > User Projects > domain_name > Admin Server Console.

  2. Navigate the path Services -> Data Sources -> New -> Generic Data Source.

  3. Click New. You may need to click Lock & Edit first to enable the New button.

  4. On the JDBC Data Source Properties page, follow these steps:

    1. For Name, provide a descriptive name for the data source (for example, db_name_DS).

    2. For JNDI Name, enter the same value you provided for Name. This value will appear in Decision Studio when you perform an Import in a data source object.

    3. Set the Database Type to Other.

    4. Ensure that the Database Driver is set to Other, then click Next.

  5. On the Transaction Options page, deselect Supports Global Transactions, then click Next.

  6. On the Connection Properties page, follow these steps:

    1. For Database Name, enter the name of your database. If you are adding an Oracle BI EE data source, enter any non-empty string; the value does not matter because this property is not used for Oracle BI EE. If you are adding a Siebel Analytics Server data source, enter the SAS_DSN_name.

      Note:

      To add a Siebel Analytics Server data source, you must first create and configure a Siebel Analytics ODBC data source name (SAS_DSN_name). Refer to Siebel Analytics Server Administration Guide for complete details. The Siebel Analytics Server data source name cannot contain spaces.
    2. For Host Name, enter the name of the computer hosting the database server. If you are adding an Oracle BI EE or Siebel Analytics Server data source, enter the name of the computer hosting Oracle BI EE or Siebel Analytics Server.

    3. For Port, enter the port number on the database server used to connect to the database (such as 1433 for SQL Server, 1521 for Oracle Database, 50000 for DB2, or 9703 for Oracle BI EE and Siebel Analytics Server).

    4. For Database User Name, enter the name of the database run-time user. If you are adding an Oracle BI EE or Siebel Analytics Server data source, enter the name of an Oracle BI EE or Siebel Analytics Server user.

    5. For Password, enter the password of the database run-time user. If you are adding an Oracle BI EE or Siebel Analytics Server data source, enter the password of the Oracle BI EE or Siebel Analytics Server user. Then, click Next.

  7. On the Test Database Connection page, for Driver Class Name, enter the full package name of the JDBC driver class used to create the physical database connections in the connection pool (note that this driver class must be in the classpath of any server to which it is deployed):

    • SQL Server: com.microsoft.sqlserver.jdbc.SQLServerDriver

    • Oracle Database: oracle.jdbc.pool.OracleDataSource

    • DB2: com.ibm.db2.jcc.DB2Driver

    • Teradata: com.teradata.jdbc.TeraConnectionPoolDataSource

    • Oracle BI EE: oracle.bi.jdbc.AnaJdbcDriver

    • Siebel Analytics Server: sun.jdbc.odbc.JdbcOdbcDriver

  8. For URL, enter the URL of the database to which you want to connect. The format of the URL varies by data source type:

    • SQL Server: jdbc:sqlserver://db_host:db_port

      Note:

      If the database is on a SQL Server named instance, specify the db_host parameter using the format host_name\instance_name.
    • Oracle Database: jdbc:oracle:thin:@db_host:db_port:sid

    • DB2: jdbc:db2://db_host:db_port/db_name

    • Teradata: jdbc:teradata://server_name:port/db_name/param1,param2,...

      Note:

      If db_name is missing, the current login user's default database is used. For example, with default database RTD30, jdbc:teradata://64.181.232.117//TMODE=ANSI,CHARSET=ASCII executes as jdbc:teradata://64.181.232.117/RTD30/TMODE=ANSI,CHARSET=ASCII
    • Oracle BI EE: jdbc:oraclebi://server_name:9703/user=bi_user_name;password=bi_password;catalog=catalog_name;

      The catalog name is optional.

    • Siebel Analytics Server: jdbc:odbc:SAS_DSN_name

  9. In the Properties field, enter properties and their values required by the JDBC driver. The properties you need to provide vary by data source type:

    • For SQL Server, enter the properties user=db_user_name and DatabaseName=db_name on separate lines

    • For Oracle Database, enter the property user=db_user_name

    • For DB2, enter the property user=db_user_name

    • For Teradata, enter the property username=db_user_name

    • For Oracle BI EE, there are no required properties. Leave the Properties field blank.

    • For Siebel Analytics Server, enter the property user=SAS_user_name

  10. Scroll to the bottom of the page. For Test Table, enter the name of an existing table in the database.

    Note:

    Do not test the connection if you are adding an Oracle BI EE or Siebel Analytics Server data source. Instead, skip to Step 12.
  11. Click Test Configuration. If the test fails, go back and check your settings. If the test succeeds, click Next.

  12. Select the server where you want the changes to be made available (for example, RTD_Server). You must perform this step before completing the data source configuration.

  13. Click Finish.

  14. Click Activate Changes.

8.3.2.1 Creating an Oracle JDBC Provider for the Oracle RTD Database on WebLogic 11g 10.3.3+

To create a JDBC provider when your Oracle RTD database is in an Oracle database server, and Oracle RTD is deployed on WebLogic 11g 10.3.3+, perform the following steps:

  1. Log into the WebLogic Server Administration Console with the administrator user name and password.

  2. Navigate the path Services -> Data Sources -> New -> Generic Data Source.

  3. On the JDBC Data Source Properties page, follow these steps:

    1. For Name, provide a descriptive name for the data source (for example, db_name_DS).

    2. For JNDI Name, enter the same value you provided for Name. This value will appear in Decision Studio when you perform an Import in a data source object.

    3. For Database Type, select Oracle.

    4. For the Database Driver, select Oracle's Driver (Thin) for Instance connections; Versions: 9.0.1 and later, then click Next.

  4. On the Transaction Options page, deselect Supports Global Transactions, then click Next.

  5. On the Connection Properties page, follow these steps:

    1. For Database Name, enter the name of your database.

    2. For Host Name, enter the name of the computer hosting the database server.

    3. For Port, enter the port number on the database server used to connect to the database.

    4. For Database User Name, enter the name of the database run-time user.

    5. For Password, enter the password of the database run-time user, then click Next.

  6. On the Test Database Connection page, leave all the settings already filled, except enter SDAPPS for Test Table Name.

  7. Click Test Configuration. If the test fails, go back and check your settings. If the test succeeds, click Next.

  8. Select the server where you want the data source to be made available (for example, RTD_Server). You must perform this step before completing the data source configuration.

  9. Click Finish, then click Activate Changes.

8.3.3 Adding the New Data Source to Oracle RTD

After you create a data source in WebLogic, you must add the new data source to Oracle RTD. To do this, you must add a resource reference to the web.xml file within the soap.war and rtis.war archives, as follows:

  1. Log into the WebLogic Server Administration Console for your Oracle RTD domain at the URL http://weblogic_host:port/console.

  2. In the tree to the left under Domain Structure, navigate to Deployments.

  3. Select OracleRTD under Deployments.

  4. Select Stop -> Force Stop Now.

  5. In the tree to the left under Domain Structure, navigate to Environment and then Servers.

  6. Select your server, for example, RTD_Server, under Servers.

  7. Select the Control tab.

  8. Select the checkbox for your server, for example, RTD_Server, under Servers.

  9. Select Shutdown -> Force Shutdown Now.

  10. Go to the directory where you expanded the RTD.ear file during installation, for example, c:\bea\user_projects\domains\oraclertd_domain\servers\RTD_Server\stage\OracleRTD\expanded.

  11. Open the rtis.war archive and extract web.xml, then open web.xml for editing. Scroll to the bottom of the file. Copy the section for the definition of the resource reference of SDDS_RTIS and paste it after the existing section. In the copied section, replace the string SDDS with the JNDI name you entered in Step 4 of Section 8.3.2. For example:

    <resource-ref id="jndi_name_RTIS">
      <res-ref-name>jndi_name</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      <res-sharing-scope>Unshareable</res-sharing-scope>
    </resource-ref>
    

    Save the changes and close the file, then re-archive the file back in rtis.war.

  12. Open the soap.war archive and extract web.xml, then open web.xml for editing. Scroll to the bottom of the file. Copy the section for the definition of the resource reference for SDDS_Axis and paste it after the existing section. In the copied section, replace the string SDDS with the JNDI name you entered in Step 4 of Section 8.3.2. For example:

    <resource-ref id="jndi_name_Axis">
      <res-ref-name>jndi_name</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      <res-sharing-scope>Unshareable</res-sharing-scope>
    </resource-ref>
    

    Save the changes and close the file, then re-archive the file back in soap.war.

  13. Return to the Administration Console.

  14. In the tree to the left under Domain Structure, navigate to Environment and then Servers.

  15. Select your server, for example, RTD_Server, under Servers.

  16. Select the Control tab.

  17. Select the checkbox for your server, for example, RTD_Server, under Servers.

  18. Select Start.

  19. In the tree to the left under Domain Structure, navigate to Deployments.

  20. Select the checkbox next to OracleRTD under Deployments.

  21. Select Start -> Servicing all requests.

8.4 Creating Additional JDBC Data Sources in JBoss

If you are running Real-Time Decision Server on JBoss 4.3 EAP, follow the steps in this section to configure JDBC data sources so that your Inline Services can access outside data.

This section contains the following topics:

8.4.1 Creating a Connection Pool and Data Source in JBoss

To create a connection pool and data source in JBoss, and to copy the data source to the JBoss deploy directory, perform the folloiwng steps:

  1. In RTD_HOME/package/jboss, choose your supported database. Copy the file appropriate to that database and rename it, as follows:

    • For DB2:

      rtd-db2-ds.xml -> rtd-custom-db2-ds.xml

    • For Oracle:

      rtd-oracle-ds.xml -> rtd-custom-oracle-ds.xml

    • For SQL Server:

      rtd-sqlserver-ds.xml -> rtd-custom-sqlserver-ds.xml

  2. Open the renamed file and replace the following:

    • ${DB_SERVER} with your database server

      For example: localhost

      Note:

      If the database is on a SQL Server named instance, specify the name of your database server using the format host_name\instance_name.
    • ${DB_PORT} with your database port

      For example: 50000 for db2, 1521 for oracle, 1433 for sqlserver

    • ${DB_NAME} with your database name

      For example: RTD for db2 and sqlserver, orcl for oracle

    • ${DB_USER} with your database user name

      For example: jsmith

    • ${DB_PASSWORD} with your database user password

    • SDDS (in <jndi-name>SDDS</jndi-name>) with a jndi name of your choice

      For example, the name of your database

  3. Save the file (rtd-custom-*-ds.xml) and copy it to JBOSS_HOME/jboss-as/server/default/deploy/.

8.4.2 Adding the New Data Source to Oracle RTD

After you create a connection pool and data source in JBoss, you must add the new data source to Oracle RTD. To do this, you must add a resource reference to four different XML files. Before you begin, ensure that JBoss is not running.

To add the new data source to Oracle RTD:

  1. Locate RTD_HOME/package/RTD.ear and make a backup copy. Then open RTD.ear with an archive utility such as WinZip.

  2. In RTD.ear, locate and extract the file ./rtis.war.

  3. In rtis.war, locate and extract the file ./WEB-INF/web.xml.

  4. Open web.xml for editing and scroll to the bottom of the file. Copy the section for the definition of the resource reference of SDDS_RTIS and paste it after the existing section. In the copied section, replace the string SDDS with the JNDI name (jndi_name) that you entered in Step 2 of Section 8.4.1. For example:

    <resource-ref id="jndi_name_RTIS">
    <res-ref-name>jndi_name</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Unshareable</res-sharing-scope>
    </resource-ref>
    

    Then, save the changes and close the file.

  5. In rtis.war, locate and extract the file ./WEB-INF/jboss-web.xml.

  6. Open jboss-web.xml for editing and scroll to the bottom of the file. Copy the section for the definition of the resource reference of SDDS and paste it after the existing section. In the copied section, replace the string SDDS with the JNDI name (jndi_name) that you entered in Step 2 of Section 8.4.1. For example:

    <resource-ref>
    <res-ref-name>jndi_name_RTIS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <jndi-name>jndi_name</jndi-name>
    </resource-ref>
    

    Then, save the changes and close the file.

  7. Using your archive utility, copy web.xml and jboss-web.xml back into rtis.war at ./WEB-INF/ (replacing the original files). Save rtis.war.

  8. Using your archive utility, copy rtis.war back into RTD.ear at ./ (replacing the original file). Save RTD.ear.

  9. In RTD.ear, locate and extract the file ./soap.war.

  10. In soap.war, locate and extract the file ./WEB-INF/web.xml.

  11. Open web.xml for editing and scroll to the bottom of the file. Copy the section for the definition of the resource reference of SDDS_Axis and paste it after the existing section. In the copied section, replace the string SDDS with the JNDI name (jndi_name) that you entered in Step 2 of Section 8.4.1. For example:

    <resource-ref id="jndi_name_Axis">
    <res-ref-name>jndi_name</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Unshareable</res-sharing-scope>
    </resource-ref>
    

    Then, save the changes and close the file.

  12. In soap.war, locate and extract the file ./WEB-INF/jboss-web.xml.

  13. Open jboss-web.xml for editing and scroll to the bottom of the file. Copy the section for the definition of the resource reference of SDDS and paste it after the existing section. In the copied section, replace the string SDDS with the JNDI name (jndi_name) that you entered in Step 2 of Section 8.4.1. For example:

    <resource-ref>
    <res-ref-name>jndi_name_Axis</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <jndi-name>jndi_name</jndi-name>
    </resource-ref>
    

    Then, save the changes and close the file.

  14. Using your archive utility, copy web.xml and jboss-web.xml back into soap.war at ./WEB-INF/ (replacing the original files). Save soap.war.

  15. Using your archive utility, copy soap.war back into RTD.ear at ./ (replacing the original file). Save RTD.ear.

8.4.3 Updating RTD.ear in JBoss

To complete the process of adding the data source to Oracle RTD and JBoss, copy the updated RTD.ear file to the JBoss deploy directory when JBoss has been stopped, as follows:

  1. Stop JBoss.

  2. Copy the updated RTD.ear in RTD_HOME/package/ to JBOSS_HOME/jboss-as/server/default/deploy/, replacing the existing file.

  3. Start JBoss.

For information about starting and stopping JBoss on your operating system, see the Note - which refers to both start and stop scripts - at the end of the section appropriate to your installation:

8.5 Testing a New Enterprise Data Source

After you add a new enterprise data source, follow the steps in this section to ensure the data source is configured properly. Before you begin, ensure that Oracle RTD is started.

To test a new enterprise data source:

  1. Start Decision Studio by running eclipse.exe in RTD_HOME\eclipse. Then, create a new Inline Service, or open an existing Inline Service. See the Decision Studio Help for more information about how to do this.

  2. Expand the Service Metadata folder, then right-click Data Sources and select New SQL Data Source.

  3. For Display Label, enter a name for the data source you want to test, then click OK.

  4. Click Import. Then, select the data source you want to test from the JDBC Data Source drop-down list. The list of Tables and Views is updated with tables and view names from that data source.

  5. Select a particular table or view, then click Finish in the Import dialog box. The list of available columns appears in the Output table in the Data Source editor.

  6. Write some basic code to ensure that the actual rows are retrieved from the tables at run time.

If you were not able to complete any of the preceding steps, check your data source configuration settings and try again.