SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)
Managing Database Applications
HP NonStop SQL/MX Installation and Management Guide—523723-004
11-11
Ensuring Proper Name Resolution
•
In a distributed SQL/MX database environment, statically compiled queries in SQL
programs can execute successfully when:
°
Either the node that stores a given query object’s metadata is available or the
query does not use late name resolution of ANSI names or automatic
recompilation.
°
The data that a given program query attempts to access is stored on available
disks on the local node or on available remote nodes.
For more information about local autonomy in a distributed database environment, see
Section 13, Managing an SQL/MX Distributed Database.
Ensuring Proper Name Resolution
SQL/MX statements in programs must refer to database objects that exist on the
production system or are visible on a remote node. If the database object names in
programs refer to DEFINEs, these DEFINEs should be set in the environment where
the programs will run. If the database object names in programs refer to SQL/MP
aliases, the SQL/MP aliases must be created on the production system. The DEFINEs
and SQL/MP aliases must map to existing database objects on the production system
or on a remote node.
Ensuring name resolution in the production system environment involves:
•
Setting DEFINEs on page 11-11
•
Setting SQL/MP Aliases on page 11-12
Setting DEFINEs
You can refer to an SQL/MP table or view with a class MAP DEFINE that resolves to a
Guardian physical name. When NonStop SQL/MX compiles such statements, it
replaces the DEFINE name in the statement with the Guardian name currently
associated with the DEFINE.
The DBA is responsible for setting the DEFINEs for all applications running in the
SQL/MX production environment, including:
•
After moving applications from a development to a production system, make sure
that the DEFINEs are set in the production environment. Otherwise, programs do
not SQL compile, and if already SQL compiled on the development system, might
execute unpredictably or not at all on the production system.
•
In response to periodic changes to the database in the production environment,
reset DEFINEs to the latest database objects.
Use OBEY command files or scripts (OSS, Korn shell) to automate the process of
setting large numbers of DEFINEs for the applications running in a particular operating
environment (OSS or Guardian). Within each OBEY command file or script, check that