SQL/MX 2.x Installation and Management Guide (H06.10+, J06.03+)

Managing Database Applications
HP NonStop SQL/MX Installation and Management Guide544536-007
11-10
Maintaining Local Autonomy for Programmatic
Queries
Maintaining Local Autonomy for Programmatic Queries
The ability of local programs to successfully query objects on remote nodes in a
distributed SQL/MX database depends on the operations they perform and the
availability of remote nodes that contain the queried object data and its metadata.
Local programs that perform DDL or dynamic DML operations must have access to
the node that contains the metadata for each referenced object. If the node where
object metadata is located becomes unavailable, local programs cannot perform a
DDL or dynamically compiled DML operations on those objects, even if the objects
reside on available nodes.
For local programs that perform late name resolution of ANSI names or automatic
recompilation of static DML operations, object metadata must be on an available
node. However, local programs with static DML statements that do not use ANSI
names, late name resolution of ANSI names, or automatic recompilation can
execute successfully, even when the object metadata node is unavailable, provided
that the node or nodes that contain the objects remain available.
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-11