You can connect to databases at session startup with one of the OpenEdge startup commands or with an application startup file. For example, the following PRO command starts a single-user session and connects to three databases:
pro -db mydb1 -db mydb2 -db mydb3
Note: To retain compatibility with earlier versions, OpenEdge does not require you to specify the Database Name (-db) connection parameter for the first database on the command line.
If you specify more than one database when you start a session, it is important to specify the connection parameters for each database directly after the database name to which they apply, and before the next Database Name (-db) connection parameter. OpenEdge applies database connection parameters only to the previously specified database.
The following syntax illustrates the correct location for database connection parameters:
You can specify all other parameters anywhere on the command line. If you specify the same parameter more than once, OpenEdge uses the value you specified for the last instance of the parameter.
You can also use a parameter file to specify database connection parameters. The following example shows a UNIX startup script for a client application where the last line invokes the _progres executable:
The previous startup script sets up environment variables for an application and starts an ABL client application session using two parameter files called parm1.pf and parm2.pf. The parm1.pf parameter file contains the following entry:
-db appldb1 -1 bi-file1
The parm2.pf parameter file contains the following entry:
-db appldb2 -1 bi-file2
This example illustrates a common approach to connecting multiple databases when you start OpenEdge using a parameter file for each database. Each parameter file is specified on the command line with the Parameter File (-pf) startup parameter.