Home | Previous Page | Next Page   Managing Databases > Using Distributed Queries > The Syntax of a Distributed Query >

Accessing a Remote Server and Database

The core element of any statement within a distributed query is the database segment. Using the syntax of both of these segments, you can specify a remote database server, database, or database object.

Database Name

The Database Name segment is used to specify the name of a database. The following examples show different ways of specifying a remote database:

empinfo@personnel '//personnel/empinfo'

Database Object Name

The Database Object Name segment is used to specify the name of a database object, including constraints, indexes, triggers, any synonyms. The following examples show how to access remote objects:

empinfo@personnel:markg.emp_names empinfo@personnel:emp_names

Specifying a Coserver ID (XPS)

If you are running a distributed query where Extended Parallel Server is both the coordinator and participant, you can specify a coserver as part of the database and database object segments. The following examples show how to specify the coserver id:

orders@stores.2 empinfo@personnel.3:emp_names

Note:
In any given session, the first reference to a remote server determines how subsequent references for objects on that server must be specified. Once a coserver-id is used to qualify an object on a server, subsequent references to the same server, even for any other object, must also specify the same coserver-id. Coserver-ids used for different remote servers are independent.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]