I used to work as a part time DBA and when I was doing my supposedely menial tasks like unlocking accounts. One of the frequent request was to get an code for the object a Function or Package or Trigger.
While this was trivial task to get an single object code it had to be quick. I never bothered to write any code or script to get that.
However one day a developer came and asked me for a code dump for a whole schema ( We had 2500 eligible objects). What he wanted was the code dump for every plsql object stored in the system.
This included triggers, functions, procedures , packages. So I searched the internet and came up with a code to do that. It was fairly small 10 liner code which was astonishing. Curiously I never saw the function used anywhere.
The function clob2file is from package dbms_xslprocessor. This one is available in oracle 11g so if you ever found yourself yearning to dump a clob object to file you should try using this.
There was just a little problem I wanted to get this dump from 10G database; So I went ahead and wrote a simple script. This script is given below.
Note : that commented line starting with dbms_xslprocessor works with oracle 11g only you should use either of the 11g or 10g call not both so one call should always be co. You also need to modify directory names and schema names (SCOTT )
Thanks.
QueryLight is a lightweight Oracle database client.
Please help us in betterment of the software by donating generously. Your encouragement and funds will keep the site going.
Donate Here on Paypal.
Subscribe to:
Post Comments (Atom)
AWS solution architect exam questions.
Before taking this let it be known that the questions are sourced from random sites using simple algorithms. The authenticity of questions a...
-
If you have 3000 lines of code and a custom exception handler like when others. The ORA 06502 can be notoriously elusive to find. This er...
-
This is a Beginner level article but can be referred readily by guys using Oracle Database moderately for a refernence. You can identify t...
-
In this tutorial video we have demonstrated how to use oracle analytical functions like lag , lead , sum and avg etc. Example 1. Use of...
No comments:
Post a Comment
Please leave your relevant comments and questions only.