Prev | Current Page 870 | Next

Richard Niemiec

"Oracle Database 10g Performance Tuning Tips & Techniques"


I
FIGURE 17-1 Server/Server architecture
Chapter 17: Managing Distributed Databases 601
Remote Queries
To query a remote database, you must create a database link in the database in which the query
will originate. The database link specifies the service name for the remote database and may also
specify the username to connect to in the remote database. When a database link is referenced by
a SQL statement, Oracle opens a session in the remote database, executes the SQL statement there,
and returns the data. You can create database links as public links (created by DBAs, making the
links available to all users in the local database) or as private links.
The following example creates a public database link called HR_LINK:
create public database link HR_LINK
connect to HR identified by employeeservices202
using 'hq';
NOTE
As of Oracle Database 11g, passwords are case-sensitive unless you
set the initialization parameter SEC_CASE_SENSITIVE_LOGON to
FALSE (the default is TRUE).
The create database link command shown in this example has several parameters:
The optional keyword public, which allows DBAs to create links for all users in a
database. An additional optional keyword, shared, is described later in this chapter.
The name of the link (HR_LINK, in this example).
The account to connect to. You can configure the database link to use the local username
and password in the remote database. This link connects to a fixed username in the
remote database.


Pages:
858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882
paraprotex calivita paraprotex calivita calivita