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 dblink_name’;
END drop_dblink;

— odpalamy

exec USERname.drop_dblink;