Try OpenEdge Now
skip to main content
SQL Reference
SQL Reference : OpenEdge SQL Statements : CONNECT AS CATALOG
 

CONNECT AS CATALOG

Establishes a connection to an auxiliary read-only database.

Syntax

CONNECT 'database_path' AS CATALOG catalog_name;

Parameters

database_path
Full path to database directory and database name. This must be contained within quotes.
catalog_name
Catalog name to be used as an alias for the database in schema, table and column references. This must be in the form of an SQL identifier.

Notes

*Used to provide read-only access to multiple databases on a single client connection to an SQL server.
*Once connected, the catalog name for an auxiliary database may be used in SQL statements to qualify schema, table, and column access.
*The catalog name is visible, and usable, only in the client-server session in which it is defined.
*The catalog name of the primary database is the name of the primary database. The database name is the name by which the database is started (for example, by the proserve command) omitting all file system path information.
*Several client-server sessions may each connect to the same auxiliary database within an entire OpenEdge SQL Server process. Each such client-server session may use the same or different name when connecting to the same auxiliary database.
*If you are connected to a primary database that is unencrypted and it was started using the -t startup parameter, you will be unable to simultaneously connect to an encrypted auxiliary database. An attempt to do so will result in an error.

Example

In this example, the database named customer in directory '/usr/databases' is connected as a catalog named mydb1:
CONNECT 'usr/databases/customer' AS CATALOG mydb1;
* Authorization
* SQL Compliance
* Related statements