Guest User

Untitled

a guest
Jun 21st, 2012
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  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';
Advertisement
Add Comment
Please, Sign In to add comment