Consultor Eletrônico



Kbase P27314: Is it possible to have 2 databases with the same logical nam
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   17/12/2003
Status: Unverified

GOAL:

Is it possible to have 2 databases with the same logical name in the same directory?

FIX:

Yes - but you cannot connect to both databases simultaneously from a single client session.

1. Create 2 databases one with physical name db1 and one with physical name db2.
2. Proserve both databases.
3. Run: mpro db1 -ld x
4. From the resulting editor run: connect db2 -ld "x".
5. You will see the following messages:

** Warning -- database <name> is already connected. (1012)

You tried to connect to a database with the same logical name twice. The connect is not actually done. Use the CONNECTED function to test whether the database is connected before using CONNECT, or use the NO-ERROR option on the CONNECT statement. If you disconnected a database before issuing the CONNECT, note that the disconnection may have been deferred until the end of the transaction or until there are no longer any active procedures that depend on the database.

Database physical names <name> and <name> do not match. No connect. (1018)

You tried to connect two databases with different names at once, using the same logical name for both. Disconnect one of the databases before connecting the other if you need to use the same logical name. Remember that a database disconnect does not take effect until the transaction has terminated, and all the currently executing PROGRESS r-code files that reference that database have completed.