Oracle® Real-Time Decisions Installation and Administration Guide Version 3.0.0.1 Part Number E13856-02 |
|
|
View PDF |
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:
Section 8.1, "Creating Additional JDBC Data Sources in OC4J"
Section 8.2, "Creating Additional JDBC Data Sources in WebSphere"
Section 8.3, "Creating Additional JDBC Data Sources in WebLogic"
Section 8.4, "Creating Additional JDBC Data Sources in JBoss"
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:
Section 8.1.1, "Providing Access to JDBC Jar Files for Your Data Source"
Section 8.1.2, "Creating a Connection Pool and Data Source in OC4J"
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:
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.
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.
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:
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
.
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.
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.On the Create Connection Pool page, enter db_name
_Pool
for Name (for example, mydatabase_Pool
).
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
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 thedb_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:
Ifdb_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.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.
Click Finish.
On the JDBC Resources page, under the Data Sources heading, click Create to define a new data source.
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.On the Create Data Source - Managed Data Source page, follow these steps:
For Name, enter a name for the data source (for example, the name of your database).
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.
For Connection Pool, select db_name_Pool.
Click Finish.
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:
If you are adding an Oracle Database data source, keep the default settings and click Test.
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.
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.
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:
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.
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.
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.
Go to the directory OC4J_HOME
/j2ee/home/application-deployments/OracleRTD
. Make sure to go to the application-deployments
directory, not the applications
directory.
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.
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.
Start OC4J.
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:
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:
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.
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.
In the tree on the left, expand Resources, then expand JDBC and choose JDBC Providers.
Ensure that the scope is set correctly (to Node=host_nameNode_number), then click New.
For Database type, select User-defined.
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
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.
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.
Click Next, then click Finish, then click Save.
Create a J2C authentication entry for the data source, as follows:
In the tree on the left, expand Security and choose Secure administration, applications, and infrastructure.
Under the Authentication heading, expand Java Authentication and Authorization Service and choose J2C authentication data. Then, click New.
For Alias, enter a descriptive name for the authentication entry (such as db_name
_auth
).
For User ID and Password, enter the user name and password for the enterprise database.
Click OK, then click Save.
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.
Under the Additional Properties heading, click Data sources.
Create a new data source, as follows:
Click New.
For Data source name, provide a descriptive name for the data source (for example, db_name
_DS
.
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.
For Component-managed authentication alias and XA authentication, select the J2C authentication alias you created in Step 10.
Click Next, then click Finish, then click Save.
Click the name of the data source you just added.
If you are adding a SQL Server data source, follow these steps to set properties for the data source:
Under the Additional Properties heading, click Custom properties.
Click the Select All icon, then click Delete to delete any existing custom properties.
Click New, enter databaseName
for Name, then enter the name of your database for Value. Then, click OK.
Click New, enter portNumber
for Name, then enter the port number of your database (typically 1433
) for Value. Then, click OK.
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 formathost_name\instance_name
.Click OK.
Click Save.
If you are adding an Oracle Database data source, follow these steps to set properties for the data source:
Scroll to the bottom of the page and locate the Oracle data source properties section.
For URL, enter jdbc:oracle:thin:@
db_host
:
db_port
:
sid
.
For example:
jdbc:oracle:thin:@dbhost.company.com:1521:orcl
Click OK, then click Save.
If you adding a DB2 data source, follow these steps to set properties for the data source:
Scroll to the bottom of the page and locate the DB2 Universal data source properties section.
For Database name, enter the name of your database.
For Driver type, enter 4
.
For Server name, enter the name of your database server.
For Port number, enter the port number of your database.
Click OK, then click Save.
If you are adding a Teradata data source, follow these steps to set properties for the data source:
Under the Additional Properties heading, click Custom properties.
Click DSName, enter the name of the Teradata database server host for Value, and click OK.
Click databaseName, enter the name of the Teradata database for Value, and click OK.
Click Save.
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:
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
Create a new <resource-ref>
entry, as follows:
Copy the existing <resource-ref>
entry for the Oracle RTD Database (SDDS
) and paste it directly below.
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.
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>
After you have completed the new entry, save and close the file.
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
Create a new <resource-ref>
entry, as follows:
Copy the existing <resource-ref>
entry for the Oracle RTD Database (SDDS
) and paste it directly below.
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.
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>
After you have completed the new entry, save and close the file.
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:
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.
In the tree on the left, expand Applications, then choose Enterprise Applications. Then, click Oracle RTD.
Under the References heading, click Resource references.
Scroll down to the table that shows the resource references and locate the two entries that you added to the web.xml
files.
For each entry, set the Target Resource JNDI Name to the JNDI name you provided in Step 13 of Section 8.2.1.
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.
Click Apply.
Scroll to the bottom of the table and click OK, then click Save.
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.
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:
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.
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.
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.
Log in to the Administration Console for your Oracle RTD domain.
http://
weblogic_host
:
port
/console
.
Navigate the path:
Environment > Servers > managed_server_name > Configuration > Start Server tab.
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 entryMW_HOME
\wlserver_10.3\server\lib\weblogic.jar
, after replacing MW_HOME
with the directory where WebLogic is installed.Save.
You can use the WebLogic Server Administration Console to create a data source in WebLogic. Before you begin, ensure that WebLogic is started.
Notes:
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:
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.
Navigate the path Services -> Data Sources -> New -> Generic Data Source.
Click New. You may need to click Lock & Edit first to enable the New button.
On the JDBC Data Source Properties page, follow these steps:
For Name, provide a descriptive name for the data source (for example, db_name
_DS
).
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.
Set the Database Type to Other.
Ensure that the Database Driver is set to Other, then click Next.
On the Transaction Options page, deselect Supports Global Transactions, then click Next.
On the Connection Properties page, follow these steps:
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.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.
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).
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.
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.
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
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 thedb_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:
Ifdb_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
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
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.Click Test Configuration. If the test fails, go back and check your settings. If the test succeeds, click Next.
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.
Click Finish.
Click Activate Changes.
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:
Log into the WebLogic Server Administration Console with the administrator user name and password.
Navigate the path Services -> Data Sources -> New -> Generic Data Source.
On the JDBC Data Source Properties page, follow these steps:
For Name, provide a descriptive name for the data source (for example, db_name
_DS
).
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.
For Database Type, select Oracle.
For the Database Driver, select Oracle's Driver (Thin) for Instance connections; Versions: 9.0.1 and later, then click Next.
On the Transaction Options page, deselect Supports Global Transactions, then click Next.
On the Connection Properties page, follow these steps:
For Database Name, enter the name of your database.
For Host Name, enter the name of the computer hosting the database server.
For Port, enter the port number on the database server used to connect to the database.
For Database User Name, enter the name of the database run-time user.
For Password, enter the password of the database run-time user, then click Next.
On the Test Database Connection page, leave all the settings already filled, except enter SDAPPS
for Test Table Name.
Click Test Configuration. If the test fails, go back and check your settings. If the test succeeds, click Next.
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.
Click Finish, then click Activate Changes.
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:
Log into the WebLogic Server Administration Console for your Oracle RTD domain at the URL http://
weblogic_host
:
port
/console
.
In the tree to the left under Domain Structure, navigate to Deployments.
Select OracleRTD under Deployments.
Select Stop -> Force Stop Now.
In the tree to the left under Domain Structure, navigate to Environment and then Servers.
Select your server, for example, RTD_Server, under Servers.
Select the Control tab.
Select the checkbox for your server, for example, RTD_Server, under Servers.
Select Shutdown -> Force Shutdown Now.
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
.
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.
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
.
Return to the Administration Console.
In the tree to the left under Domain Structure, navigate to Environment and then Servers.
Select your server, for example, RTD_Server, under Servers.
Select the Control tab.
Select the checkbox for your server, for example, RTD_Server, under Servers.
Select Start.
In the tree to the left under Domain Structure, navigate to Deployments.
Select the checkbox next to OracleRTD under Deployments.
Select Start -> Servicing all requests.
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:
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:
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
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 formathost_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
Save the file (rtd-custom-*-ds.xml
) and copy it to JBOSS_HOME
/jboss-as/server/default/deploy/.
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:
Locate RTD_HOME
/package/RTD.ear
and make a backup copy. Then open RTD.ear
with an archive utility such as WinZip.
In RTD.ear
, locate and extract the file ./rtis.war
.
In rtis.war
, locate and extract the file ./WEB-INF/web.xml
.
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.
In rtis.war
, locate and extract the file ./WEB-INF/jboss-web.xml
.
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.
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
.
Using your archive utility, copy rtis.war
back into RTD.ear
at ./
(replacing the original file). Save RTD.ear
.
In RTD.ear
, locate and extract the file ./soap.war
.
In soap.war
, locate and extract the file ./WEB-INF/web.xml
.
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.
In soap.war
, locate and extract the file ./WEB-INF/jboss-web.xml
.
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.
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
.
Using your archive utility, copy soap.war
back into RTD.ear
at ./
(replacing the original file). Save RTD.ear
.
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:
Stop JBoss.
Copy the updated RTD.ear
in RTD_HOME
/package/
to JBOSS_HOME
/jboss-as/server/default/deploy/
, replacing the existing file.
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:
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:
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.
Expand the Service Metadata folder, then right-click Data Sources and select New SQL Data Source.
For Display Label, enter a name for the data source you want to test, then click OK.
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.
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.
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.