Prev | Current Page 795 | Next

Richard Niemiec

"Oracle Database 10g Performance Tuning Tips & Techniques"

You could then create a
private database link with the same name that includes the connect
to clause but not the using clause. Subsequent changes to the service
name for the data would require re-creating only the public link, while
the private links and the user passwords would be unchanged.
If the LOC instance is moved to a different server, you can redirect the database links to LOC??™s
new location simply by distributing a tnsnames.ora file that contains the modification or by
revising the listing in the directory server. You can generate the revised entry for the tnsnames.ora
file or directory server by using either the Oracle Net Configuration Assistant tool or the Oracle
Net Manager, described previously in this chapter.
To use these links, simply add them as suffixes to the table names in commands. The
following example creates a local view of a remote table, using the HR_LINK database link:
create view LOCAL_EMPLOYEE_VIEW
as
select * from EMPLOYEE@HR_LINK
where Office='ANNAPOLIS';
The from clause in this example refers to EMPLOYEE@HR_LINK. Because the HR_LINK database
link specifies the server name, instance name, and owner name, the global object name for the
table is known. If no account name had been specified, the user??™s account name would have
been used instead. If HR_LINK was created without a connect to clause, the current username
and password would be used to connect to the remote database.


Pages:
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807
wróżby miłosne cukiernia-stykowscy.pl salon kosmetyczny kraków pompy ciepła Kalkulator kredytowy