Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 21st, 2012  |  syntax: None  |  size: 0.46 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. to search and replace the string in all db objects source code in oracle database
  2. select name,text from user_source where text like '%DZONE';
  3.        
  4. select regexp_replace (dbms_metadata.get_ddl (object_type, object_name, USER),'DZONE','SZONE')
  5. from (
  6. select distinct object_name, object_type
  7.  from user_procedures where object_name in (select name from user_source where text like '%DZONE%')
  8. )
  9.        
  10. Update user_source
  11. Set text = 'SZONE'
  12. Where text like '%DZONE';