Progress
Client Deployment
Guide


Logical Database Names

A logical database name is a database reference that represents the name of a connected physical database. Progress uses the logical database name to resolve database references. When a procedure is compiled against a database, Progress stores the logical database name in the procedure’s r-code. When a procedure executes, its database references must match the logical name of a connected database.

A database has a logical name whenever it is connected. When you connect to a database, Progress automatically assigns a default logical name for the current session. The default logical name consists of the physical database name without the .db suffix. For example, if you connect to a database with the physical name mydb1.db, the default logical database name is mydb1. Alternatively, you can use the Logical Database Name (-ld) startup parameter to specify a logical database name other than the default.

For example, to assign the logical name firstdb to the physical database mydb1.db using the PRO command, enter the command using the following syntax:

pro mydb1 -ld firstdb 

Logical database names allow you to run procedures on different physical databases without recompiling. To run a compiled procedure on a second physical database, the database must meet the following criteria:

A database connection fails if the logical database name of the database that you are connecting has the same logical name as an already connected database. If you try to connect a database with a logical database name that matches the logical database name of an existing connected database of the same database type (Progress, ORACLE, etc.), Progress assumes that database is connected and ignores the request.

You can change a database’s logical name in a Progress procedure with the CREATE ALIAS statement. For more information about logical and physical database names and aliases, and the CREATE ALIAS statement, see the Progress Language Reference and the Progress Programming Handbook.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095