Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

View/Stored Procedure Contents

Posted on 2011-02-23
4
Medium Priority
?
777 Views
Last Modified: 2012-06-22
Does anyone know how to spit out the contents of a view and stored procedure using an sql statement?  I can't use Oracle's SQL scratchpad.

Oracle 10g is database being used.
0
Comment
Question by:lcor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:lcor
ID: 34964826
this way, I can see code inside view, procedure
0
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 668 total points
ID: 34964851
all source can be queried from DBA_SOURCE.

select text from dba_source where name='SOMEPROCEDURE' order by line;

If you have several objects there is an TYPE column in that view.
0
 
LVL 18

Assisted Solution

by:sventhan
sventhan earned 1332 total points
ID: 34964862
You can user dba_views, all_views to get the view code
0
 
LVL 18

Assisted Solution

by:sventhan
sventhan earned 1332 total points
ID: 34964884
elect 'create or replace '||text,line
from
 dba_source
where
 owner = upper('&&owner') and
 type = upper('&&obj_type') and
 name = upper('&&obj_name') and
 line = 1
UNION
select text,line
from
 dba_source s2
where
 s2.name = upper('&&3') and
 s2.owner = upper('&&1') and
 s2.type = upper('&&2') and
 s2.line > 1
order by 2;

http://dba-oracle.com/t_display_oracle_stored_procedures.htm
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question