A Setting Up Database Connections

This chapter includes the following topics:

A.1 Adding WebLogic Server Data Sources

When you run the Oracle Clinical Installer, it sets up a data source for OPA and RDC from the WebLogic Server to a the default database.

If you plan to use more than one database, you must create a data source for RDC for each additional database. If you also are using TMS, you need to create data sources for OPA and the TMS Browser. The OPA connection is used for running TMS reports.

Go through these instructions for one data source at a time.

  1. Log in to the WebLogic Server Administration Console at:

    http://host:7101/console/login/LoginForm.jsp
    
  2. Select Data Sources, then New, the Generic Data Source.

  3. Enter a name for the data source.

  4. Enter the JNDI name as:

    • For OPA: jdbc/opadatabase_nameDS

    • For RDC: jdbc/rdcdatabase_nameDS

    • For TMS: jdbc/tmsdatabase_nameDS

  5. On the next screen:

    • If the database you want to connect to is a RAC database, choose Oracle's Driver (Thin) for Service connections; Versions:9.0.1 and later

    • If the database is not a RAC database, choose Oracle's Driver (Thin) for Instance connections; Versions 9.0.1 and later

  6. On the next screen, uncheck Supports Global Transactions.

  7. On the next screen, enter the database name, host name, and port for the database. For the user, enter the following user account and its password:

    • For OPA: bc4j_internal

    • For RDC: rdc_midtier_proxy

    • For TMS Browser: ops$tms_browser

  8. On the next screen, select Test Configuration to validate if you can connect using the pool setup.

  9. On the next screen, assign OpaServer1 as the target.

  10. Click Finish.

  11. Select the newly created Data Source, click the Connection Pool tab, and then click Advanced.

  12. Add the property databaseName=OracleDataSource into Properties field.

  13. Add the property dataSourceName= sid/database_name into Properties field where sid/database_name accordingly if the property not getting created already by the weblogic admin console's create data source wizard.

  14. Uncheck Wrap Data Types and save.

  15. Review and set additional parameters in Advanced Settings as appropriate for your expected data load.

  16. Activate your changes or restart the OPA server for the changes to take effect. Also see Section D.5, "Restarting the OPA Server".

A.2 Add Service Name to tnsnames.ora

You must also add the service name used to create connection pool to tnsnames.ora on the application server.

The tnsnames.ora file is located in the application instance; for example: middleware_home\application_server_instance\config.

Note:

Oracle recommends maintaining a master tnsnames.ora file and copying it to each location—database and application servers— whenever you add a database.

A.3 Configure Maximum Connections

By default, the maximum number of database connections defined for the Application Module is 75.

You can use the following formula to determine what to set the value to. It:

  • Allows 4 connections per concurrent user to support each user having 3 data entry windows.

  • Provides an additional buffer because when a user opens data entry the system requires about 5 connections. It then releases 4 of them.

The formula is:

p + n * 3.5

where p is the Application Module pool size and n is the number or concurrent users you expect.

For example, if you expect 10 concurrent user connections and the Application Module pool size is 75, then the formula is 75 + 10 * 3.5, which means that your application can support up to 110 concurrent connections.

The value for the Maximum Capacity parameter for the data source should be equal to or greater than the number of concurrent users you expect for:

  • TMS Browser (TMS data source)

  • TMS Reports (OPA data source)

To change this value:

  1. Log in to the WebLogic Server Administration Console at:

    http://host:7101/console
    
  2. Select Data Sources, then select the data source whose setting you want to modify: for example, DS_1_rdc for RDC, DS_1_tms for TMS or DS_1_ops for OPA (TMS reports).

  3. Click the Connection Pool tab.

  4. Scroll down to find the parameter Maximum Capacity.

  5. Enter a value and save.

  6. Restart the OPA server to apply your changes.

    See Section D.5, "Restarting the OPA Server" for instructions.

Note:

When you create a new data source, create it for a particular application, such as RDC, or TMS, and ensure that it will only be used for that application.