Previous Topic Next topic Print topic


Connect (Set Location) Access

The second method of accessing data in a remote location involves connecting to the remote XDB Server. To connect to the remote XDB Server interactively, use the SET LOCATION command (an SQL extension). To connect to the remote XDB Server with embedded SQL, use the CONNECT command.

A client interactively issues a SET LOCATION command or an application created using embedded SQL issues a CONNECT command. Based on information in the system catalog tables on the current XDB Server, the client's connection is transferred to the appropriate XDB Server and data is returned. This configuration is also referred to as a remote unit of work (RUW).

When a client is connected to a remote server while still logged in to the initial XDB Server, the system tables used for any new queries are the system tables on the remote location. Note that when connecting to a different XDB Server, you are not completely detached from previous XDB Servers. The routing software on each XDB Server is still used to determine from where the request came and to where it should go.

In this way, a client application can connect to any XDB Server in the distributed environment, as long as the Server and the locations it controls are registered in the system catalog tables.

Previous Topic Next topic Print topic