Now V7R1- SQL statements can now reference objects from more than one IBM i system.
Page 1 of 1
Now V7R1- SQL statements can now reference objects from more than one IBM i system.
The GA version of the DB2 for i 7.1 release simplified access to DB2 objects on remote systems by eliminating the need for explicit remote connections with the new three-part name support. Instead of developers having to use an extra CONNECT or SET CONNECTION statement to explicitly connect statement, they can now simply run an SQL statement like the following to retrieve data from a table on a different system or partition.
SELECT lastname, address, city FROM rmtsystem.datalib.customer
WHERE state='IA'
The SELECT statement in this example accesses a remote table with a three-part name value of rmtsystem.rmtschema.customers. The first part of the name is the remote database server name: rmtsystem. This value must correspond to an entry in the IBM i relational database directory entry that was added with the Add Relational Database Directory Entry (ADDRDBDIRE) command. The second component is the schema name, datalib, on the remote server. The final part of the three-part name is the name of the DB2 object, customer, on the remote server. Whenever an SQL statement references an object with a three-part name that resides on a different system, DB2 starts an implicit Distributed Relational Database Architecture (DRDA) connection to enable the DB2 object on the remote server to be accessed.
SELECT lastname, address, city FROM rmtsystem.datalib.customer
WHERE state='IA'
The SELECT statement in this example accesses a remote table with a three-part name value of rmtsystem.rmtschema.customers. The first part of the name is the remote database server name: rmtsystem. This value must correspond to an entry in the IBM i relational database directory entry that was added with the Add Relational Database Directory Entry (ADDRDBDIRE) command. The second component is the schema name, datalib, on the remote server. The final part of the three-part name is the name of the DB2 object, customer, on the remote server. Whenever an SQL statement references an object with a three-part name that resides on a different system, DB2 starts an implicit Distributed Relational Database Architecture (DRDA) connection to enable the DB2 object on the remote server to be accessed.
Archana K- Posts : 76
Join date : 2013-01-27
Age : 32
Location : chennai
Similar topics
» Add library - System Part
» Run Backup based on objects count
» Now V7R1 - Default parameter values are supported for both SQL and external stored procedures
» Field modification impact on other related objects
» How to use TCP/IP services while the system is down? Is there any way??
» Run Backup based on objects count
» Now V7R1 - Default parameter values are supported for both SQL and external stored procedures
» Field modification impact on other related objects
» How to use TCP/IP services while the system is down? Is there any way??
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|