Drop database link in another scheme that DBA is not working

How to remove an object for example, database 'MYDB. MYDBLINK"that is present in the SCOTT schema.

When I try the following options of logged in as DBA , it is in error.

"DROP DATABASE LINK"SCOTT" MYDB. MYDBLINK1 ';
ORA-2024: connection to database not found.

DROP DATABASE LINK SCOTT. MYDB. MYDBLINK1;
ORA-2024: connection to database not found.

DROP DATABASE LINK 'SCOTT'.' MYDB. MYDBLINK1';
ORA-2024: connection to database not found.

DROP DATABASE LINK SCOTT. MYDB. MYDBLINK1;
ORA-2024: connection to database not found.

I always connect like SCOTT to drop the MYDB database link. MYDBLINK1 that is present in the SCOTT schema.

Please provide the way to drop the database link in another schema, without logging as the schema owner, so that I can connect a DBA (SYSTEM or SYS).

You cannot remove a database link in the schema of another user. One solution is:

SQL > CREATE PROCEDURE scott.drop_db_link AS
BEGIN
EXECUTE IMMEDIATE 'drop database link LINK1. "
END drop_db_link; 2 3 4
7 m

Created procedure.

SQL > exec scott.drop_db_link

PL/SQL procedure successfully completed.

Source: http://dbaoracletips.blogspot.com/2011/11/how-to-dropcreate-database-link-from.html
http://laurentschneider.com/wordpress/2012/10/drop-database-link-in-another-schema.html

Tags: Database

Similar Questions

Maybe you are looking for

  • Is it possible to move the menu button in the new interface?

    I find the idea of the right terrible menu. Is it possible to move the button previous position or at least to the left?

  • Satellite U940 - SSD drive shows only 11.22 GB

    Hello I had a new Satellite U940 - B484 Ultrabook.The first thing I did was finishing the wizard, then I created the recovery media (using external DVD drive) on three discs 4.7 GB DVD We have Windows 8 Pro license, so my friend formatted the system

  • Satellite A660 - fan runs fast

    Hello Today, I bought a new laptop i7 A660-1FM. I'm pretty happy with it so far except the noise from the fan.The minimum speed at which it works is 68%, from to 75 and sometimes 90% sometimes. It never goes below 68% even when nothing is running (si

  • Original spare part Droid

    I'm looking for a replacement for the headphone jack. It starts to become staticky. Is it possible to get these pieces of Motorola?

  • Fixes silent installation

    Hi all I'm doing a silent installation off vWorkspace 8.01 with Microsoft SCCM. Silent installation of vWorkspace is not a problem, but when I try to do a silent install of the mandatory patches with the options/s/v/qn it will not be installed. You c