Back Forward Database form
Completing the Database tab

About Database data instances

Complete this tab to specify database connection information.

After you complete and save the form, you can click  Test Connection   to confirm database connectivity.

Field

Description

Database  
How to Connect

Select one of three choices.

  • Use configuration in preferences to refer to a database/databases/pegarules element in the prconfig.xml file that defines the location, TCP/IP port, account name and password of a relational database.
  • Use JDBC Connection Pool to use a connection pool defined by a Java Naming and Directory Interface (JNDI) facility. Complete the JNDI Name field.
  • Use JDBC URL listed below to use a Universal Resource Locator to find the Java Database Connectivity information. Complete the JDBC URL field.

Tip The Use JDBC Connection Pool approach offers the most flexibility to accommodate later changes in the systems environment and is a best practice. In contrast, the JDBC URL listed below approach may require updates to this form when system details change.

TipProcess Commander may open more than one connection to a database. When using WebSphere's pooled connection facility, a general guideline for production systems is to set the maximum number of connections for the PegaRULES database to about one-third to one-fifth of the number of simultaneous requestors (and adjust the PegaRULES database settings to allow the same number of connections. Don't forget to count listeners and agents as requestors.

The Use configuration in preferences case

For example, connection to a Microsoft SQL Server database can be defined in the prconfig.xml file as:

<env name="database/databases/Northwind/url"
      value= "jdbc:microsoft:sqlserver://shelpnt:1433;SelectMethod=cursor"/>
<env name="databases/databases/Northwind/userName" value="Smith" />
<env name="database/databases/Northwind/password" value="password" />
<env name="database/databases/Northwind/maxConnections" value="3" />

In this example, the database name is Northwind and the user name (account) is Smith with password password. The database is located on the server SHELPNT using TCP/IP port 1433.

Process Commander may open more than one database connection with this user name. To provide good performance, the system creates a pool of connections over time. (This internal connection pooling is an alternative to facilities provided by WebSphere or WebLogic.).

NoteThe maxConnections entry is optional. For the PegaRULES database, if you use this entry, set the value to 2 or more. See How to limit database connections to the PegaRULES database.

Account and password security

If you choose Use JDBC URL below or Use JDBC Connection Pool for the How to Connect field, you can later delete any elements of the prconfig.xml file that contain the account and password for a database.

If you choose Use configuration in preferences, the database password must remain in the prconfig.xml file, but you can encrypt this password in that file through a special configuration.

JDBC Definition  
JDBC URL

This field appears only when you select Use JDBC URL below for the How to Connect field.

Enter the full URL. Examples for Microsoft, Oracle, IBM DB2 and Sybase databases are:

Database

URL

SQL Server 2000 jdbc:microsoft:sqlserver://127.0.0.1:1433;
DatabaseName=Northwind;SelectMethod=cursor
SQL Server 2005 jdbc:sqlserver://127.0.0.1:1433;
DatabaseName=Northwind;SelectMethod=cursor
Oracle (thick client/
Type 2 or OCI)
jdbc:oracle:oci:@serverName:1521;dbName
Oracle (thin client / Type 4) jdbc:oracle:thin:@serverName:1521;dbName
IBM DB2 jdbc:db2://serverName:port/dbName
Sybase jdbc:sybase:127.0.0.1

where 127.0.0.1 is the node name or IP address of the server hosting the database, and 1433 or 1521 is the TCP/IP port number for database access.

NotePrecise syntax requirements vary depending on server platform, database version, and JDBC client; additional parameters may be required. Consult your database administrator (DBA) for details.

If this Data-Admin-DB-Name instance is to connect to the PegaRULES database, consult the Installation Guide for your platform. If your PegaRULES database is hosted by Oracle 9, the Type 2 (OCI or thick client) driver is required; the thin client (Type 4) works with Oracle 10g.

Sybase databases are accessible only through Connect SQL rules. Sybase is not supported as a host for the PegaRULES database .

Don't place any spaces or other extraneous characters before or after the JDBC URL value.

JDBC Datasource  
JNDI Name

This field appears only when you select Use JDB Connection Pool for the How to Connect field.

Enter the name of the JNDI server defining a connection pool. The procedure for defining a connection pool depends on two factors:

  • Which application server you use (Apache Tomcat, Oracle, IBM WebSphere, or Oracle WebLogic, for examples)
  • Which database vendor and version is in use (Oracle, Microsoft SQL Server, IBM DB2, IBM UDB and others)

TipIf during installation of Process Commander, the installer specified a JDBC Datasource for connecting to the PegaRULES database, the username and password for that data source may appear in the prconfig.xml file. These two entries are not necessary; you can delete them from the prconfig.xml file. During startup, Process Commander then obtains the username and password for the database from authentication facilities of Tomcat (or your hosting application server).

Admin JNDI Name

Optional. Leave blank unless (1) this database name instance is to access the PegaRULES database using JNDI, (2) the primary database user account does not have the ALTER TABLE and CREATE TABLE capabilities, and you want developers to have any of these capabilities:

Identify a JNDI name that defines PegaRULES database connection for which the account has the ALTER TABLE and CREATE TABLE capabilities. (This ordinarily is distinct from database account used by most application users, who only insert, update, and delete rows). Consult the Installation Guide (for your platform) for additional information on this field.

Alternatively, you can specify the username and password in the prconfig.xml file.

Authentication  
Username

Optional. Enter the user or account name for this database, if required. Use a database user that is capable of accepting unqualified table names and converting them to fully qualified table names.

If this database is to be accessed through Connect SQL rules (Rule-Connect-SQL rule type), confirm that this database user has search, update, delete, and other capabilities that support the SQL statements in those rules, and that this database is the default database of the user.

Password

Optional. If the database account requires a password, enter the password. If this field is blank, the system expects to obtain a password from a text file named pegarules.keyring, which can contain this password in encrypted form. Consult the Installation Guide V4.2 (not a more recent installation guide) for more information on this approach.

Admin Username

Optional. The Admin User Name and Admin Password field provide an alternative way to specify a PegaRULES database account for specific capabilities.

Optional. Leave blank unless (1) this database name instance is to access the PegaRULES database using JNDI, (2) the primary database user account does not have the ALTER TABLE and CREATE TABLE capabilities, and you want developers to have any of these capabilities:

Identify a PegaRULES database account (referenced by the Admin JNDI Name field) that has the ALTER TABLE and CREATE TABLE capabilities. (This account ordinarily is distinct from database account used by most application users, who only insert, update, and delete rows). Alternatively, you can specify the username and password in the prconfig.xml file. Consult the Installation Guide (for your platform) for additional information on this field.

Admin Password

Optional. Leave blank unless you have supplied an Admin Username value.

Enter a password for the database account identified in the Admin Username field.

Test Connection  
 Test Connection  

After you complete and save the form, click to test connectivity to the database. If the test fails, diagnostic information appears in a new window. (This test does not try the alternate account to the PegaRULES database, if any, specified in the Admin Username and Admin Password fields).

See Pega Developer Network article PDNPRKB-21078 Troubleshooting JDBC problems with tools from Pegasystems and others for advice on researching JDBC issues.

zzz About Database data instances