Kbase P57036: What is the difference between using -ld (Logical Database Name) parameter and CREATE ALIAS statemen
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/5/2009 |
|
Status: Verified
GOAL:
What is the difference between using -ld (Logical Database Name) parameter and CREATE ALIAS statement
FACT(s) (Environment):
All Supported Operating Systems
Progress/OpenEdge Product Family
FIX:
Both values are used as a reference to a specific database in a session, but -ld parameter is used to set the logical database name while a CREATE ALIAS statement creates an alias for the database allowing references to a the logical database using another another "name".
Another difference is that -ld parameter is used on compilation time and affects the r-code while CREATE ALIAS statement doesn't. However, any file reference that is qualified with an alias (as opposed to a logical name) generates a new instance of the file for the compilation. This new instance causes the r-code to have the alias reference and not the logical database name reference. Subsequent unqualified references to that same file within the same block, or nested blocks, will resolve to the new alias instance following the usual rules for qualifying. Unqualified references to different files in the same database do not get the alias name, but get the logical name. Anonymous references to a file, previously referenced using the alias qualifier, in a different, non-nested block get the logical name instead of the alias name.
It is simpler to just connect to a database with the desired logical name, leave all references unqualified, not create an alias, and then compile the application. However, sometimes you cannot precompile. In those cases, if you want to compile a procedure so that only the alias gets into the r-code file, then explicitly qualify all file references using the alias. You might want only the alias to get into the r-code file, so you can compile and distribute procedures that will run against any database whose logical name has been assigned the alias contained in the r-code file.