Error At Line 1 Ora-02024 Database Link Not Found
me a comment will try to explore and post my experience ~Ajay Subscribe via Email Friday, October 31, 2008 ORA-02024: database link not found Posted by AJ at 6:41 PM If you are trying to drop a database link after changing the global_name of the database , you usually end up with ora-02024: database link not foundBut when you query user_db_linksview you found DB link exists .Possible root cause would beInitially when we create a database without domain in the global name, a null value will be used from domain as opposed to .world in Oracle releases 9i and before.Later on when the global_name is altered to contain the domain part that is "world",this domain remains even when the global_name is altered back a name without domain name.In order to drop the desired database linkI would recommend to try this solution in Development DB then in TestAndwith a cold backup in production.1)Conn sys as sysdba2) find out current global_name value using below sqlSQL> select * from global_name;GLOBAL_NAME---------------------------------------------------------THESIMPLEORACLE.WORLDFind out the valueofGLOBAL_NAME FROM props$ TABLESelect name, value$ fromprops$ where name = 'GLOBAL_DB_NAME';NAME------------------------------VALUE$----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
【知识库】深度学习知识图谱上线啦 Cannot drop a database link after changing the global_name ORA-02024 [ID 382994.1] 标签: databasedomainsqloraclesystemuser 2011-01-23 20:52 7119人阅读 评论(0) 收藏 举报 本文章已收录于: 分类: Oracle Troubleshooting(193) 作者同类文章X 版权声明:本文为博主原创文章,未经博主允许不得转载。 Cannot drop a database link after changing the global_name ORA-02024 [ID 382994.1] Modified 22-NOV-2010Type PROBLEMStatus MODERATED In this DocumentSymptomsCauseSolution Platforms: 1-914CU; This document is being delivered to you via Oracle Support's http://thesimpleoracle.blogspot.com/2008/10/ora-02024-database-link-not-found.html Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review. Applies to: Oracle Server - Enterprise Edition - Version: 9.2.0.6 and later[Release: 9.2 and later ]Information in this document applies to any platform.***Checked for relevance on 14-Jan-2010*** Symptoms Not able to http://blog.csdn.net/tianlesoftware/article/details/6160082 drop a database link after changing the global_name of the database Earlier global_name had did not have domain name attached to it. The newly added global_name has a domain name attached to it When trying to drop the database link after this change throws the following error ORA-02024: database link not found But database link is present and the query on user_db_links displays the value Example :- SQL> select * from global_name; GLOBAL_NAME --------------------------------------------------------- DB10GR2 SQL> create database link l1 connect to scott identified by tiger; Database link created. SQL> select db_link from user_db_links; DB_LINK --------------------------------------------------------- L1 SQL> alter database rename global_name to DB10GR2.WORLD; Database altered. SQL> select * from global_name; GLOBAL_NAME --------------------------------------------------------- DB10GR2.WORLD SQL> drop database link l1; drop database link l1 * ERROR at line 1: ORA-02024: database link not found E
CommunityOracle User Group CommunityTopliners CommunityOTN Speaker BureauJava CommunityError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please https://community.oracle.com/thread/2278080 type your message and try again. More discussions in PL/SQL and SQL All PlacesDatabaseDatabase Application DevelopmentPL/SQL and SQL This discussion is archived 12 Replies Latest reply on Oct 5, 2012 5:50 AM by Billy~Verreynne Dynamic drop http://dbaoracletips.blogspot.com/2011/11/how-to-dropcreate-database-link-from.html database link User341075 Aug 30, 2011 2:10 PM Hi, As user SYS i need to Dynamically DROP all the database link in the Database. I cant drop private database link . For example i have error at few database links under APPS schema that i would like to drop. Please note that it should be done by SYS user SQL> declare 2 3 cursor c is 4 select * 5 from dba_db_links; 6 7 8 begin 9 for c_rec in c loop 10 11 if c_rec.owner = 'PUBLIC' then 12 execute immediate ' drop public database link '||'"'||c_rec.db_link||'"'; 13 else 14 error at line dbms_output.put_line (' drop database link '||'"'||c_rec.db_link||'"'); 15 execute immediate ' drop database link '||'"'||c_rec.db_link||'"'; 16 end if; 17 end loop; 18 19 end; 20 / drop database link "APPS_TO_APPS" declare * ERROR at line 1: ORA-02024: database link not found ORA-06512: at line 15Thanks I have the same question Show 0 Likes(0) 3329Views Tags: none (add) anotherContent tagged with another, createContent tagged with create, databaseContent tagged with database, dbms_sys_sqlContent tagged with dbms_sys_sql, inContent tagged with in, linkContent tagged with link, schemaContent tagged with schema This content has been marked as final. Show 12 replies 1. Re: Dynamic drop database link BluShadow Aug 30, 2011 2:20 PM (in response to User341075) You need to include the owning schema name in the drop command so that it would be e.g. drop database link apps.app_to_appHowever, it sounds like a very dangerous procedure to me. Like Show 0 Likes(0) Actions 2. Re: Dynamic drop database link 737517 Aug 30, 2011 2:25 PM (in response to User341075) I think, you should define owner - c_rec.owner DECLARE CURSOR c IS SELECT * FROM dba_db_links; BEGIN FOR c_rec IN c LOOP IF c_rec.owner = 'PUBLIC' THEN DBMS_OUTPUT.PUT_LINE (' drop public database link '||'"'||c_rec.db_link|| '"'); ELSE DBMS_OUTPUT.PUT_LINE (' drop
tiger using ''testdb''';END create_db_link; 2 3 4 5 6 /Procedure created.SQL> show userUSER is "SYS"SQL> exec scott.create_db_linkPL/SQL procedure successfully completed.SQL> select * from dba_db_links where OWNER='SCOTT';OWNER DB_LINK USERNAME HOST CREATED------------------------------ -------------------- ------------------------------ -------------------- ---------SCOTT LINK1 SCOTT testdb 04-NOV-11SQL> drop database link scott.LINK1;drop database link scott.LINK1 *ERROR at line 1:ORA-02024: database link not foundSQL> CREATE PROCEDURE scott.drop_db_link ASBEGIN EXECUTE IMMEDIATE 'drop database link LINK1';END drop_db_link; 2 3 4 5 /Procedure created.SQL> exec scott.drop_db_linkPL/SQL procedure successfully completed.SQL> select * from dba_db_links where OWNER='SCOTT';no rows selectedSQL> Posted by Yusuf E Ibrahim at 11:14 AM 4 comments: Sathiyamoorthy N said... Really good one :-) August 12, 2013 at 10:35 PM DOT said... Very useful.Many thanks. August 21, 2013 at 4:47 AM Muhammad Saeed said... find solutions herehttp://solutions-ever.blogspot.com/2014/06/how-to-create-drop-db-link-in-oracle.html June 18, 2014 at 6:45 PM Leslie Lim said... I have found your blogs to be friendly and welcoming. Thanks for making this one. I really enjoy reading and surfing it. Try to visit my site @ www.imarksweb.orgLiam October 27, 2015 at 12:01 PM Post a Comment Newer Post Older Post Home Subscribe to: Post Comments (Atom) Oracle RAC Certified OCE in 10g &11g OCP in 9i,10g, 11g & 12c Labels apps (2) Dataguard (2) GoldenGate (5) Installation (8) Mysql (2) ORA Errors (4) Oracle9i (1) RAC (14) RMAN (1) Scripts (1) Unix (3) VMWARE (6) About Me New Jersey, United States View my complete profile Blog Archive ► 2016 (11) ► September (1) ► August (2) ► July (3) ► June (2) ► May (2) ► January (1) ► 2015 (10) ► October (1) ► August (1) ► July (1) ► June (2) ► May (4) ► February (1) ► 2014 (7) ► November (2) ► October (3) ► March (1) ► February (1) ► 2013 (23) ► November (1) ► October (3) ► September (1) ► August (4) ► July (1) ► June (2) ► March (3) ► February (2) ► January (6) ► 2012 (34) ► December (3) ► November (6) ► October (3) ► June (1) ► May (2) ► April (6) ► March (6) ► February (1) ► January (6) ▼ 2011 (16) ► December (2) ▼ November (3) Oracle Silent Installation... version GLIBC_2.0 not defined in file libc.so.6 wi... Ho