Scalable Database Server, HiRDB Version 8 UAP Development Guide
This section explains use of an SQL connection to a distributed RD-node as the current SQL connection for accessing a remote database.
When an SQL connection to a distributed RD-node is used as the current SQL connection, only the databases at the current RD-node can be accessed.
Using an SQL-connection to a distributed RD-node offers the following advantage: It is not necessary to use an RD-node name as a modifier or a table alias, as is required when the default SQL connection is used for accessing a remote database. The table name and procedure name defined in the current RD-node can be specified directly in the SQL statement.
Because the current SQL connection becomes the SQL connection to the distributed RD-node when the CONNECT statement with RD-node specification is executed, the SQL connection to the distributed RD-node can be used immediately.
CONNECT TO RDNODE10 USER:USER2 USING :PSWD2SELECT SQUANTITY INTO :QUANTITY FROM MANAGER.STOCK WHERE PCODE='302S'
If the current SQL connection is not the SQL connection to the distributed RD-node that is to be accessed, the current SQL connection can be changed with the SET CONNECTION statement. The SQL connection to the distributed RD-node must be created before the SET CONNECTION statement is issued.
SET CONNECTION RDNODE10CALL MANAGER.PROC10 (arguments)
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.