Error: ORA-00955: name is already used by an existing object in Oracle Function

35,714

You probably have another object with the same name (PERFORM_CHECK).

You can find it by quering user_objects:

select *
from   user_objects
where  object_name = 'PERFORM_CHECK'

Then drop it (replace TYPE_OF_OBJECT by the type of the object from the above query):

 drop TYPE_OF_OBJECT perform_check
Share:
35,714
Andrew
Author by

Andrew

Updated on September 29, 2020

Comments

  • Andrew
    Andrew over 3 years

    I have function which i am trying to compile and getting an error as Error: ORA-00955: name is already used by an existing object. I am really not aware of this error and try to search for this issue but did not find any solution. I dont know is this related to any grant priviledges but i dont have priviledges issue to my schema tables.

    create or replace FUNCTION "AK_CHECK" 
    -- PUBLIC
    (ID Number) RETURN Number
    IS
      TYPE_ID Number := 0;
      SUCCESS Number := 0;
      S Number := 0;
    BEGIN
      SELECT ACTIVE(ID) + MANUAL(ID) INTO S FROM DUAL;
      CASE S
      WHEN 2 THEN
       SELECT TYPE INTO TYPE_ID
       FROM SALE_SUPPLY KD
       WHERE KD.KPI_DEF_ID = ID;    
      END CASE;
    END AK_CHECK;
    
    • Lalit Kumar B
      Lalit Kumar B about 9 years
      You are using create and replace, so if the function already exists, then it will be replaced. So, there is something else causing the issue and not the function name. Compile in SQL*Plus, and use SHOW ERRORS, it will show you exact line number and the object which throws the error. Edit your question and add copy paste the complete error stack.
  • Lalit Kumar B
    Lalit Kumar B about 9 years
    OP is using create or replace for the function. If it already exists, the function will be replaced. There is something else which is causing the issue.
  • Patrick Hofman
    Patrick Hofman about 9 years
    @LalitKumarB: And what if there is a table with that exact name? It will fail with this error.
  • Patrick Hofman
    Patrick Hofman about 9 years
    @Rahul: need more help?
  • Andrew
    Andrew about 9 years
    Hello Patrick i tried everything. I also try to drop but i am getting the same error :(
  • Patrick Hofman
    Patrick Hofman about 9 years
    What was the result of the query?
  • Andrew
    Andrew about 9 years
    Which query ? The Select query you wrote ? It returns nothing
  • Khamyl
    Khamyl over 5 years
    In my case I was trying to create or replace function but a procedure with the same name existed.
  • Tukaram Bhosale
    Tukaram Bhosale about 3 years
    I see similar issue even if I drop the object