Description: To create a current user database link, use the CONNECT TO CURRENT_USER clause in the link creation statement. Current user links are only available through the Oracle Advanced Security option.
The following syntax creates a current user database link, where dblink is the name of the link and net_service_name is an optional connect string.
A database link is a pointer in the local database that lets you access objects on a remote database. To create a private database link, you must have been granted the proper privileges.
Language: PL/SQL Highlight Mode: PLSQL Last Modified: March 07th, 2009
CREATE[SHARED][PUBLIC] DATABASE LINK dblink
[USING 'net_service_name'];-- A public link called pu_link to the database with -- service name 'supply'. The link uses the userid/password -- of the current user to log onto the remote database. CREATEPUBLIC DATABASE LINK pu_link
CONNECTTO CURRENT_USER USING 'supply';-- A public fixed user link to the remote vehicles database. -- The link connects to the remote database with the -- userid/password of mike/rogers.CREATEPUBLIC DATABASE LINK vehicles.cardealer.com
CONNECTTO mike IDENTIFIED BY rogers;