Name
CREATE/DROP DATABASE LINK
Synopsis
CREATE Syntax:
CREATE [SHARED] [PUBLIC] DATABASE LINKdblink
[CONNECT TO {CURRENT USER |username
IDENTIFIED BYpassword
[AUTHENTICATED BYusername
IDENTIFIED BYpassword
] }] [USING'connectstring
']
DROP Syntax:
DROP [PUBLIC] DATABASE LINK dblink
Creates or removes a database link, which allows access to objects on a remote database.
Keywords
- dblink
Specifies the name of the database link being created. Must be a valid Oracle object name.
- SHARED
Specifies that a single network connection be shared across users when the Multi-Threaded Server/Shared Server is configured.
- PUBLIC
Specifies that the database link be available to all users. If omitted, the database link is private and available only to you.
- CONNECT TO CURRENT USER
Specifies that a current user database link be created, which requires a global user with a valid account on the remote database.
- CONNECT TO username IDENTIFIED BY password
Specifies the username and password used to connect to the remote database.
- AUTHENTICATED BY
Specifies a username and password on the remote database to be used for authentication when the SHARED keyword is used.
- USING
Specifies the Oracle Net Services database specification (connectstring) for the remote database.
Tip
If the CONNECT TO clause is omitted, the account username and password currently logged in, not the username and password of the creator, will be used when the database link is invoked.
Get Oracle in a Nutshell 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.