Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How do I know the line number in a stored procedure?

Re: How do I know the line number in a stored procedure?

From: Geoffrey Stewart <geoffrey_stewart_at_uow.edu.au>
Date: Tue, 23 Nov 1999 10:08:07 +1100
Message-ID: <3839CCD7.A3010246@uow.edu.au>

Joe Sugden wrote:
>
> I have been creating some lengthy stored procedures lately, and using
> Enterprise Manager to help de-bug them. The problem for me is finding the
> right line when there is an error. I know there is a V$ view that has the
> line numbers and corresponding code, but I don't remember which one that is.
>
> Does anyone have any recommendations? How do you deal with this?

Joe

Use this little Sql*Plus script...



SET PAGESIZE 2000
COLUMN text FORMAT A72 trunc
COLUMN line FORMAT 9999
SET LINESIZE 80 accept xobj char prompt 'Please enter procedure to list :'

ttitle '** SOURCE FOR PROCEDURE: &xobj **'

SELECT          line,text
FROM            user_source
WHERE           name = upper('&xobj')
and             type like 'PROCEDURE%'
ORDER BY        type,line

/

ttitle off


cheers
Geoffrey Stewart Received on Mon Nov 22 1999 - 17:08:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US