Showing posts with label db_link. Show all posts
Showing posts with label db_link. Show all posts

Monday, August 1, 2022

How to drop other schema’s Database link using SYS user | Drop db_link from other user

SQL> select owner,db_link from dba_db_links; OWNER DB_LINK ------------------------------ -------------------------------------- TEST TEST_DB_LINK SQL> sho user USER is "SYS" SQL> SQL> drop database link test.test_db_link; drop database link test.test_db_link * ERROR at line 1: ORA-02024: database link not found [test@test.test.com ~]$ cat drop_schema_dblink.sh username=$1 db_link=$2 sqlplus /nolog < SQL> Connected. SQL> " DB Link Before Drop" SQL> SQL> SQL> OWNER DB_LINK ------------------------------ ------------------------------ TEST TEST_DB_LINK SQL> 2 3 4 5 Procedure created. SQL> PL/SQL procedure successfully completed. SQL> Procedure dropped. SQL> " DB Link After Drop" SQL> no rows selected SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options !

Database Options/Management Packs Usage Reporting for Oracle Databases 11.2 and later (Doc ID 1317265.1)

  Database Options/Management Packs Usage Report You can determine whether an option is currently in use in a database by running options_pa...