Everyone commonly knows that, the private db_links can be dropped only by the owner of the database_link. But you don’t have the password that db_link owner, then you can go for below steps.
SQL>select * from dba_db_links where OWNER='HR';
OWNER DB_LINK USERNAME HOST CREATED
------------------------------ -------------------- ------------------------------ -------------------- ---------
HR testlink HR testdb 04-Feb-19
Now create one procedure under scoot user:
SQL> CREATE PROCEDURE hr.drop_db_link AS
BEGIN
EXECUTE IMMEDIATE 'drop database link testlink';
END drop_db_link;
/
Procedure created
No comments:
Post a Comment