Home » SQL & PL/SQL » SQL & PL/SQL » HOW DO I LIST A STORED PROCEDURE FROM SQL PLUS???
HOW DO I LIST A STORED PROCEDURE FROM SQL PLUS??? [message #246351] Wed, 20 June 2007 12:54 Go to next message
dmanzo
Messages: 2
Registered: June 2007
Junior Member

HOW DO I LIST A STORED PROCEDURE FROM SQL PLUS???

i SAW numerous posts on how to view what Stored Procs there are in a schema but how do I simply list the proc? I am using Squrrel SQL client, and oracle 9.2. I believe it is something like select TEXT..............

Thanks,

Dave
Re: HOW DO I LIST A STORED PROCEDURE FROM SQL PLUS??? [message #246355 is a reply to message #246351] Wed, 20 June 2007 12:58 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
DBA|ALL|USER_SOURCE
Re: HOW DO I LIST A STORED PROCEDURE FROM SQL PLUS??? [message #246357 is a reply to message #246355] Wed, 20 June 2007 13:06 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
  1  select object_type,count(object_type)
  2  from dba_objects
  3  where object_type='PROCEDURE'
  4* group by object_type
SQL> /

OBJECT_TYPE         COUNT(OBJECT_TYPE)
------------------- ------------------
PROCEDURE                           38

Re: HOW DO I LIST A STORED PROCEDURE FROM SQL PLUS??? [message #246363 is a reply to message #246351] Wed, 20 June 2007 13:23 Go to previous messageGo to next message
dmanzo
Messages: 2
Registered: June 2007
Junior Member

I want to display the text of the Procedure as my result, so far all I can get is

select object_type,count(object_type)
from dba_objects
where object_type='PROC'
group by object_type

I only get the headers in my sql plus result of Object_Type and Count(Object_type). I want to be able to view/edit the procedure from sqlplus. BTW, I also tried:

select text from user_source where name='PROC';
and I got a reply of "TEXT"....

Thans for the prompt responses though....
Re: HOW DO I LIST A STORED PROCEDURE FROM SQL PLUS??? [message #246364 is a reply to message #246351] Wed, 20 June 2007 13:26 Go to previous message
MarcL
Messages: 455
Registered: November 2006
Location: Connecticut, USA
Senior Member
You must be logged in as the owner of the proc to see it.

Depending on your rights, you might be able to see it by using

 select text from all_source where name = 'PROC' 
              order by line 


Substituting the name of your procedure for 'PROC'

[Updated on: Wed, 20 June 2007 13:31]

Report message to a moderator

Previous Topic: max salary
Next Topic: How to caluculate particular characters in a string
Goto Forum:
  


Current Time: Wed Dec 07 12:23:05 CST 2016

Total time taken to generate the page: 0.07203 seconds