Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to retrieve program code ?
set linesize 200
set pagesize 0
echo off
spool c:\temp\my_proc.sql
select text
from user_source
where name='MY_PROC' and
type = 'PROCEDURE'
order by line;
spool off
Replace MY_PACKAGE with the name of your function, procedure or package, and PROCEDURE with the actual type: PACKAGE, PACKAGE BODY, PROCEDURE or FUNCTION. The type PACKAGE is actually just the package specification.
If you're not the owner, all you'll be able to see of a package is the
header. If someone else owns the procedure or function, and has granted you
EXECUTE, use the view all_source and provide the owner.
--
- Dan Clamage
http://www.telerama.com/~dclamage
If you haven't crashed the Server,
you haven't been trying hard enough.
Stephan Gloor <stgloor_at_access.ch> wrote in article
<35A1E435.70F8A7E9_at_access.ch>...
> Hello.
>
> Where is are stored procedure stored in the database ? How can the
> program code be retrieved by exectuing an SQL statement ? All I'm
> currently able to retrieve is the procedure definition, but not the
> source.
> Regards,
> Stephan
>
>
Received on Tue Jul 07 1998 - 22:05:15 CDT