SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)
Name Resolution, Similarity Checks, and Automatic
Recompilation
HP NonStop SQL/MX Programming Manual for C and COBOL—523627-004
8-7
Distributed Database Considerations
Distributed Database Considerations
The SQL statements in an embedded SQL program can refer to SQL/MX and SQL/MP
database objects on remote nodes.
Remote SQL/MX Objects
To refer to remote SQL/MX database objects in an embedded SQL program, you need
not change the database object names in the source code. However, the catalog that
contains the SQL/MX objects must be visible (that is, registered) on the local node
before you compile and run your embedded SQL program. For information on
registering catalogs and managing an SQL/MX distributed database, see the SQL/MX
Installation and Management Guide.
Remote SQL/MP Objects
To refer to remote SQL/MP objects by Guardian name in an embedded SQL program,
you should fully qualify the SQL/MP object name, including the name of the remote
node.
If the embedded SQL program uses a class MAP DEFINE or SQL/MP alias name for a
remote SQL/MP object, you should specify a fully qualified SQL/MP object name when
you add the DEFINE or create the SQL/MP alias. The SQL/MP aliases must be in
SQL/MX user catalogs that are visible on the node where the program executes. For
information on registering catalogs to make them visible in an SQL/MX distributed
database environment, see the SQL/MX Installation and Management Guide.
For information on managing an SQL/MP distributed database, see the SQL/MX
Installation and Management Guide.
RDF Considerations
The Remote Duplicate Database Facility (RDF) subsystem monitors changes to a
production database on a local (primary) system and maintains a copy of the database
on a remote (backup) system. RDF stores a backup of the database objects in a
different catalog on the backup node than on the primary node. For more information,
see the RDF/IMP, IMPX, and ZLT System Management Manual.
An embedded SQL application must be able to run on both the primary and backup
nodes. Because RDF stores database objects in different catalogs on the primary and
backup nodes, applications in an RDF environment should not refer to hard-coded
database object names that refer to a specific node or catalog.
To enable easier deployment of your embedded SQL applications in an RDF
environment, follow these guidelines:
Note. NonStop SQL/MX Release 2.x applications cannot query remote SQL/MP objects on a
node that has NonStop SQL/MX Release 1.8 installed. To query these remote objects, you
must upgrade the node to SQL/MX Release 2.x. For more information, see the SQL/MX
Installation and Management Guide.