QuestionQ138

VerifiedConfiguring Oracle Net Services

The SCOTT/TIGER user exists in two databases, BOSTON_DB and DALLAS_DB, at two different locations.

Each database has a tnsnames.ora file that defines DALLAS_DB as a service name.

Consider this command:

CREATE DATABASE LINK dblink1 CONNECT TO scott IDENTIFIED BY tiger USING 'dallas_db';  

How should the command be executed so that only SCOTT in BOSTON_DB can access the SCOTT schema in DALLAS_DB?

Explanation

Omitting PUBLIC creates a private database link, which is available only to its owner. When SCOTT executes the statement in BOSTON_DB, the link belongs to the BOSTON_DB SCOTT schema and uses the specified SCOTT/TIGER credentials to connect to DALLAS_DB, limiting use of the link to that local SCOTT schema.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!