Is it possible to determine which database objects were created with quoted identifiers in Oracle?

StackOverflow https://stackoverflow.com//questions/9696550

  •  13-12-2019
  •  | 
  •  

Question

I have a schema in which a small number of the thousands of stored procedures have been created with quoted identifiers. I need to fix them. The only way I currently have of identifying them is by opening them up in SQLDeveloper, one at a time, and checking to see if the CREATE OR REPLACE... bit at the top has quotes around the procedure name. Does anyone have any cunning method of identifying these troublesome objects more easily? Have I overlooked some Oracle system view with a this_uses_quoted_identifiers flag, perhaps? Please enlighten me!

Was it helpful?

Solution

There are at least 2 ways:

select * from all_source where type = 'PROCEDURE' and line = 1 and text like '%"%'

and

select * from all_procedures where procedure_name != upper(procedure_name)

However, none of them is 100% correct and complete. The first one looks for any double quote in the first line. The second one would only find procedures with lower caps in their name which would mean that double quotes have been used.

OTHER TIPS

As far as I know, if you quote an identifier, but all the letters are in capital form, it is just equivalent to non quoted identifier. So you can select from ALL_OBJECTS to see which object names have names with non capital letters.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top