Name

CREATE DATABASE LINK

Synopsis

CREATE [SHARED] [PUBLIC] DATABASE LINK
dblink
[CONNECT TO {CURRENT USER | username
IDENTIFIED BY password}
[AUTHENTICATED BY username IDENTIFIED BY
password]
   USING 'connect string'

Creates a database link (dblink), which allows access to objects on a remote database; dblink must be a valid Oracle object name.

Keywords

SHARED

Specifies that the database link will share a connection through the Multi-Threaded Server.

PUBLIC

Specifies that the database link will be available to all users. If PUBLIC is omitted, the database link is private and is available only to you.

CONNECT TO

Specifies the username and password used to connect to the remote database.

CURRENT USER

Creates a “current user database link” that can only be used by users authenticated globally by the Oracle Security Server.

IDENTIFIED BY

Specifies the password for the username.

AUTHENTICATED BY

Specifies the username and password on the remote database, used when a SHARED database link is specified.

USING

Specifies the SQL*Net database specification (`connect_string') for the remote database.

Notes

You must have the CREATE DATABASE LINK privilege to create a private database link. You must have the CREATE PUBLIC DATABASE LINK privilege to create a public database link. In addition, you must have the CREATE SESSION privilege on the remote database, and SQL*Net must be operating on both the local and remote databases.

Examples

The following example creates a public database link to scott’s account on the ...

Get Oracle Database Administration: The Essential Refe now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.