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-9
Running Applications on a Remote Node
Running Applications on a Remote Node
In a distributed database environment:
You can always run a local Guardian or OSS application from the local node by
running the local program file.
You can run a local Guardian or OSS application on a remote node by copying the
application to the remote node and running the remote program file there.
To run a remote Guardian or OSS application from the local node, you must copy
the application from the remote node to the local node and then recompile the
module definitions for that application from the local node.
Using REGISTER CATALOG to Access Objects on Remote
Nodes
Statements in an embedded SQL program can refer to SQL/MX objects on a remote
node without changes to the database object names in the source code. However, the
catalog that contains the objects must be visible from the local node before you can
process and run the program. Use the REGISTER CATALOG statement to create an
empty catalog reference on the local node that enables local programs to query the
catalog’s objects on a remote node or nodes. Use the UNREGISTER CATALOG
statement to remove the empty catalog reference from the local node.
From an SQL program, you can create, alter, or drop an SQL/MX object that resides
entirely on one remote node or is partitioned across several remote nodes. To create,
alter, or drop an entire object located on one or more remote nodes, the catalog for the
object must be registered on the node from which the SQL program runs.
Before issuing a REGISTER CATALOG or UNREGISTER CATALOG statement,
consider these requirements:
Make sure that a catalog with an identical name does not already exist on the node
from which you run the program.
To execute the REGISTER CATALOG or UNREGISTER CATALOG statement from
the local node, you must be the owner of the catalog or the super ID user.
Before executing REGISTER CATALOG and UNREGISTER CATALOG for a
remote node, you must establish remote password access from the local node to
the local node and from the remote node to the local node. For information about
this and other aspects of security in a distributed SQL/MX database environment,
see Security Guidelines on page 13-6.
For more information about using the REGISTER CATALOG and UNREGISTER
CATALOG statements, see Section 13, Managing an SQL/MX Distributed Database,
the SQL/MX Reference Manual and the SQL/MX Programming Manual for C and
COBOL.