Home » SQL & PL/SQL » SQL & PL/SQL » viewing package body text
viewing package body text [message #269747] Mon, 24 September 2007 07:15 Go to next message
lijok
Messages: 68
Registered: April 2005
Member
How can I look up the package body script(text) from database using sqlplus?

For example, to view the script for views, the usual script is
select text from all_views where view_name = 'XXX';

I tried searching on the net, the only info I got is this script, but I get such a error when I run this.

SQL> select name,type,text from dba_source;
select name,type,text from dba_source
                           *
ERROR at line 1:
ORA-00942: table or view does not exist

Re: viewing package body text [message #269748 is a reply to message #269747] Mon, 24 September 2007 07:17 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
You may not have privileges on that table.

Try all_source / user_source, if at all you want to check the text of package body of your own.

By
Vamsi
Re: viewing package body text [message #269749 is a reply to message #269747] Mon, 24 September 2007 07:17 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Your user doesn't have access to DBA_SOURCE. If the package belongs to your schema you can query USER_SOURCE or else ALL_SOURCE (if your user has access to the package body).

MHE
Re: viewing package body text [message #269753 is a reply to message #269747] Mon, 24 September 2007 07:22 Go to previous message
lijok
Messages: 68
Registered: April 2005
Member
Thanks Maheer. I also got the reply here
http://www.orafaq.com/forum/t/53116/0/
Previous Topic: Balance amount counting on row level
Next Topic: count duplicate
Goto Forum:
  


Current Time: Sat Dec 03 14:14:00 CST 2016

Total time taken to generate the page: 0.07438 seconds