top of page
CerebroSQL

Oracle:

CREATE DATABASE LINK

CREATE [ SHARED ] [ PUBLIC ] DATABASE LINK dblink
[ CONNECT TO
{ CURRENT_USER
| user IDENTIFIED BY password [ dblink_authentication ]
}
| dblink_authentication
]
[ CONNECT TO
{ CURRENT_USER
| user IDENTIFIED BY password [ dblink_authentication ]
}
| dblink_authentication
]...
[ USING connect_string ] ;CREATE [ SHARED ] [ PUBLIC ] DATABASE LINK dblink
[ CONNECT TO
{ CURRENT_USER
| user IDENTIFIED BY password [ dblink_authentication ]
}
| dblink_authentication
]
[ CONNECT TO
{ CURRENT_USER
| user IDENTIFIED BY password [ dblink_authentication ]
}
| dblink_authentication
]...
[ USING connect_string ] ;

dblink_authentication ::=
AUTHENTICATED BY user
IDENTIFIED BY password

example

CREATE DATABASE LINK local
CONNECT TO hr IDENTIFIED BY hr
USING 'local';
<=or=>
CREATE DATABASE LINK remote.us.oracle.com
CONNECT TO CURRENT_USER
USING 'remote';

bottom of page