Oracle7 Server Administrator's Guide

Contents Index Home Previous Next

Managing Object Name Resolution

Object names referenced in SQL statements can consist of several pieces, separated by periods. Oracle resolves an object name using the following algorithm:

    1. 1.1 In the current schema, Oracle searches for an object whose name matches the first piece of the object name. If it does not find such an object, it continues with Step 1.2.
    1. 1.2 If no schema object is found in the current schema, Oracle searches for a public synonym that matches the first piece of the name. If it does not find one, it continues with Step 1.3.
    1. 1.3 If no public synonym is found, Oracle searches for a schema whose name matches the first piece of the object name. If it finds one, it returns to Step 1.1, now using the second piece of the name as the object to find in the qualified schema. If the second piece does not correspond to a object in the previously qualified schema or there is not a second piece, Oracle returns an error.
      If no schema is found in Step 1.3, the object cannot be qualified and Oracle returns an error.
When global object names are used in a distributed database, either explicitly or indirectly within a synonym, the local Oracle resolves the reference locally. For example, it resolves a synonym to a remote table's global object name. The partially resolved statement is shipped to the remote database, and the remote Oracle completes the resolution of the object as described here.


Contents Index Home Previous Next