How to get all stored procedure?


How do you pull out all procedures owned by one user and put the
output into a file, so I can take it to another db and complie them there.
I would like to use sql to do it and do it in a few steps rather than
using OEM and doing the cut and paste thing.


Ans1:
) Export the user with User = user, Rows = No, Indexes=Yes ...
This will create a file that contains the procedures, then you'll have to
extract them from the file. Doable but not thrilling.
2) Use a tool like TOAD, SQL Navigator, SQL Programmer and others that will
write scripts to a file that can be used to re-create the objects in the
other database.

Mike Rose



Ans2:
Select the text of the stored procedure from DBA_SOURCE. Place the code
into a file using SPOOL in SQL*Plus, or a shell script. Execute the code as the
other user in the other database.
Hosted by www.Geocities.ws

1