Drop Oracle Database Link
before implementing them on a production server.
Dropping a database link from your Oracle database is as easy as doing the following:
drop database link remotedb;
or
drop public database link remotedb;
You will need no other system privilege other than the 'create database
link' privilege granted directly
to your username or granted via a role to drop your own database link.
It is not possible to drop a database link belonging to another user.
If you try to specify another schema's database link by qualifying it
with a name,
Oracle will just look for a private database link in your schema with
a name
which includes the other schema's name and will not find it.
To drop a public database link, you will need the system privilege 'drop public database link'.
For example:
SQL> connect / as sysdba
Connected.
SQL> drop database link scott.remotedb;
drop database link scott.remotedb
*
ERROR at line 1:
ORA-02024: database link not found
SQL> connect scott/tiger
Connected.
SQL> drop database link scott.remotedb;
drop database link scott.remotedb
*
ERROR at line 1:
ORA-02024: database link not found
SQL> drop database link remotedb;
Database link dropped.
Next: How to 'hide' a database link.
Click here to read about troubleshooting database link errors.