First, the name of the instance that accesses the database must be identified. Next, the name of
the host on which that instance resides must be identified. Putting together these four parts of the
FIGURE 17-4 Replication with materialized views
Chapter 17: Managing Distributed Databases 605
object??™s name??”its host, its instance, its owner, and its name??”results in a global object name. To
access a remote table, you must know that table??™s global object name.
The goal of location transparency is to make the first three parts of the global object name??”
the host, the instance, and the schema??”transparent to the user. The first three parts of the global
object name are all specified via database links, so any effort at achieving location transparency
should start there. First, consider a typical database link:
create public database link HR_LINK
connect to HR identified by employeeservices202
using 'hq';
NOTE
If the GLOBAL_NAMES initialization parameter is set to TRUE, the
database link name must be the same as the global name of the
remote database.
By using a service name (in this example, HQ), the host and instance name remain
transparent to the user. These names are resolved via the local host??™s tnsnames.ora file.
A partial entry in this file for the service name HQ is shown in the following listing:
HQ =(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=HQ_MW)
(PORT=1521))
(CONNECT DATA=
(SERVICE_NAME=LOC)))
The two lines in bold in this listing fill in the two missing pieces of the global object name.
Pages:
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887