Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search for sql function

I have a sql function in oracle
create or replace function testfunc.....

Compile it succesfully. When i verify all_procedures system table it's not there. select * from all_procedures where procedure_name like '%testfunc%';

Not sure whether i am looking at the correct system table

like image 829
Arav Avatar asked Dec 07 '22 00:12

Arav


2 Answers

Unless you are using double-quoted identifiers to enforce case-sensitivity (something you almost certainly don't want to do), Oracle will always store identifiers in upper case in the data dictionary. So you would want

SELECT *
  FROM all_procedures
 WHERE procedure_name = 'TESTFUNC'
like image 144
Justin Cave Avatar answered Jan 05 '23 14:01

Justin Cave


Log in as system or sys as sysdba and query:

SELECT *
FROM dba_objects 
WHERE object_name LIKE '%TESTFUNC%'
AND object_type='FUNCTION';

or

Log in as your user and query:

SELECT *
FROM all_objects
WHERE object_name LIKE '%TESTFUNC%'
like image 32
kupa Avatar answered Jan 05 '23 15:01

kupa