View/Stored Procedure Contents

Posted on 2011-02-23
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.
Question by:lcor
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

Author Comment

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

Accepted Solution

slightwv (䄆 Netminder) earned 167 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.
LVL 18

Assisted Solution

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

Assisted Solution

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

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

690 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