nerdexam
Oracle

1Z0-062 · Question #346

The HR schema exists in two databases, BOSTON and DENVER, and has the same password, HR. You have the CREATE DATABASE LINK and CREATE SESSION privileges on both the database. BOSTON is defined as a…

The correct answer is D. Execute this command as HR user in the BOSTON database. To create a private database link that specifically allows the HR user in the BOSTON database to connect as HR to the DENVER database, the CREATE DATABASE LINK command must be executed by the HR user in the BOSTON database.

Configuring the Oracle Network Environment

Question

The HR schema exists in two databases, BOSTON and DENVER, and has the same password, HR. You have the CREATE DATABASE LINK and CREATE SESSION privileges on both the database. BOSTON is defined as a service name in the tnsnames.ora of both the databases. You plan to use the command:

CREATE DATABASE LINK hr_link CONNECT to hr IDENTIFIED BY hr USING 'denver'; What must be done to ensure only the HR user in the BOSTON database can access the HR schema in the DENVER database?

Options

  • AExecute this command as HR user in the BOSTON database and SYS user in the DENVER
  • BExecute this command as SYS user in both the databases.
  • CExecute this command as HR user in the DENVER database.
  • DExecute this command as HR user in the BOSTON database.

How the community answered

(31 responses)
  • A
    3% (1)
  • B
    10% (3)
  • C
    3% (1)
  • D
    84% (26)

Why each option

To create a private database link that specifically allows the HR user in the BOSTON database to connect as HR to the DENVER database, the `CREATE DATABASE LINK` command must be executed by the HR user in the BOSTON database.

AExecute this command as HR user in the BOSTON database and SYS user in the DENVER

Executing as SYS in DENVER is unnecessary for creating a private link from BOSTON, and executing as SYS in DENVER would not ensure the link is private to BOSTON's HR user.

BExecute this command as SYS user in both the databases.

Executing as SYS in both databases would typically create a public database link (if `PUBLIC` is specified) or a link owned by SYS, neither of which fulfills the requirement of "only the HR user in the BOSTON database can access".

CExecute this command as HR user in the DENVER database.

Executing the command as the HR user in the DENVER database would attempt to create a database link from DENVER, not from BOSTON, which is contrary to the problem statement.

DExecute this command as HR user in the BOSTON database.Correct

When the `CREATE DATABASE LINK` command is executed by the HR user in the BOSTON database without specifying `PUBLIC`, it creates a private database link owned by HR, ensuring only HR in BOSTON can use it to connect to DENVER as HR.

Concept tested: Private database link creation and ownership

Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-DATABASE-LINK.html#GUID-E1E74526-0E84-48E0-9856-F145D783CEB5

Topics

#database link#user access#private database link

Community Discussion

No community discussion yet for this question.

Full 1Z0-062 Practice