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

Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL Code utilities?

Re: PL/SQL Code utilities?

From: <fitzjarrell_at_cox.net>
Date: 11 Sep 2006 12:05:13 -0700
Message-ID: <1158001513.442346.3020@e3g2000cwe.googlegroups.com>

Frank van Bortel wrote:
> Jeremy schreef:
> > Just occurred to me - is there anything available that would look at the
> > procedures/functions in a package and identify any variables that aren't
> > referenced in the code? SQL Developer perhaps?
> >
> >
> I believe there's a level of compilation error you
> can set - Daniel Morgan has posted something a while
> ago.
> It will (default) to errors, and level 1 will generate
> warnings, and perhaps a level will generate what you want.
>
> I know TOAD can - but that probably uses the same mechanism.
>
> --
> Regards,
> Frank van Bortel
>
> Top-posting is one way to shut me up...

DBMS_TRACE is, I believe, what you're trying to remember, documented here:

http://download-east.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_trace.htm

Use of this package requires either that you:

alter session set plsql_debug=true;
<anonymous pl/sql block or new procedure/package/function/trigger code here>

alter <package|procedure|trigger|function> <some name here> compile debug;

It also requires you to run $ORACLE_HOME/rdbms/admin/tracetab.sql as SYS to create the collection tables for the trace/debug data.

A working demo for 10.2 can be found here:

http://www.psoug.org/reference/dbms_trace.html

'MODULE' is not a valid column in the 9.2.0.x version of PLSQL_TRACE_EVENTS, so edit the queries provided accordingly to return data from this table.

David Fitzjarrell Received on Mon Sep 11 2006 - 14:05:13 CDT

Original text of this message

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