Create/drop database link - Oracle Database Script. -- Create public database link Create public database link LINK_PUB connect to system identified by oracle using 'PRODB'; where PRODB - > tnsname of the target db added in tnsnames.ora -- Create private database link under Scott connect scott/tiger create database link LINK_PRIV connect to system identified by oracle using 'PRODB'; -- Drop public database link drop public database link TEST_LINK ; -- Drop private database link connect scott/tiger drop database link LINK_PRIV; NOTE - Private database link can be dropped only by the owner of the database link
-- Create public database link Create public database link LINK_PUB connect to system identified by oracle using 'PRODB'; where PRODB - > tnsname of the target db added in tnsnames.ora -- Create private database link under Scott connect scott/tiger create database link LINK_PRIV connect to system identified by oracle using 'PRODB'; -- Drop public database link drop public database link TEST_LINK ; -- Drop private database link connect scott/tiger drop database link LINK_PRIV; NOTE - Private database link can be dropped only by the owner of the database link