Unix Technical Forum

Convert Stored Procedure to *.SQL

This is a discussion on Convert Stored Procedure to *.SQL within the Oracle Database forums, part of the Database Server Software category; --> How do I convert a stored procedure to a *.SQL file?...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 07:52 AM
rzaleski
 
Posts: n/a
Default Convert Stored Procedure to *.SQL

How do I convert a stored procedure to a *.SQL file?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 07:52 AM
joel garry
 
Posts: n/a
Default Re: Convert Stored Procedure to *.SQL

On Feb 5, 1:43*pm, rzaleski <rzale...@gmail.com> wrote:
> How do I convert a stored procedure to a *.SQL file?


Use other procedures to get it and write it out.

http://download.oracle.com/docs/cd/B...htm#sthref1981

jg
--
@home.com is bogus.
Blame the ERP implementation: http://www.americanlafrance.com/inte...p=4&s=22&a=163
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 07:52 AM
DA Morgan
 
Posts: n/a
Default Re: Convert Stored Procedure to *.SQL

rzaleski wrote:
> How do I convert a stored procedure to a *.SQL file?


spool c:\temp\myproc.sql

SELECT dbms_metadata.get_ddl('PROCEDURE', '<your proc name here>');
FROM dual;

spool off
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-26-2008, 07:52 AM
gazzag
 
Posts: n/a
Default Re: Convert Stored Procedure to *.SQL

On 5 Feb, 21:43, rzaleski <rzale...@gmail.com> wrote:
> How do I convert a stored procedure to a *.SQL file?


Depends on your version of Oracle.

The DBA_SOURCE view may be of use to you.

HTH

-g
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:40 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com