Drop private dblink from sys

— user: sys

select db_link from dba_db_links where OWNER=’USERname’;
dblink_name

— tworzymy procedurkę:

CREATE OR REPLACE PROCEDURE USERname.drop_dblink AS
BEGIN
EXECUTE IMMEDIATE 'drop database link db