 |
calling a stored procedure from a stored procedure
Hi Folks, I'm trying to define a (I thought) trivial stored procedure (SP) as a front-end to the standard SP "dbms_system.set_ev", which I want to use to generate a 10046 tracing event. I'm trying to execute the following PL/SQL: create or replace procedure rob_enable_tracing ( sid in integer, serial in integer ) is begin dbms_system.set_ev(sid, serial, 10046, 4, ''); end; and getting the error: PLS-00201: identifier 'DBMS_SYSTEM.SET_EV' must be declared If I provide the schema in which "set_ev" is defined, in this case "SYS", as in: create or replace procedure rob_enable_tracing ( sid in integer, serial in integer ) is begin sys.dbms_system.set_ev(sid, serial, 10046, 4, ''); end; I get: PLS-00201: identifier 'SYS.DBMS_SYSTEM' must be declared Any suggestions? thanks, RU
On May 10, 1:25 pm, RU <r @vakuum.de> wrote:
> Hi Folks, > I'm trying to define a (I thought) trivial stored procedure (SP) as > a front-end to the standard SP "dbms_system.set_ev", > which I want to use to generate a 10046 tracing event. I'm trying > to execute the following PL/SQL: > create or replace procedure rob_enable_tracing ( > sid in integer, > serial in integer > ) > is > begin > dbms_system.set_ev(sid, serial, 10046, 4, ''); > end; > and getting the error: > PLS-00201: identifier 'DBMS_SYSTEM.SET_EV' must be declared > If I provide the schema in which "set_ev" is defined, in this case "SYS", > as in: > create or replace procedure rob_enable_tracing ( > sid in integer, > serial in integer > ) > is > begin > sys.dbms_system.set_ev(sid, serial, 10046, 4, ''); > end; > I get: > PLS-00201: identifier 'SYS.DBMS_SYSTEM' must be declared > Any suggestions? > thanks, > RU
Look up PLS-201 in the Google archives. Your question has been asked AND answered at least a million times before. -- Sybrand Bakker Senior Oracle DBA
-----------------------------------------------Reply-----------------------------------------------
RU wrote: > Hi Folks, > I'm trying to define a (I thought) trivial stored procedure (SP) as > a front-end to the standard SP "dbms_system.set_ev", > which I want to use to generate a 10046 tracing event. I'm trying > to execute the following PL/SQL: > create or replace procedure rob_enable_tracing ( > sid in integer, > serial in integer > ) > is > begin > dbms_system.set_ev(sid, serial, 10046, 4, ''); > end; > and getting the error: > PLS-00201: identifier 'DBMS_SYSTEM.SET_EV' must be declared > If I provide the schema in which "set_ev" is defined, in this case "SYS", > as in: > create or replace procedure rob_enable_tracing ( > sid in integer, > serial in integer > ) > is > begin > sys.dbms_system.set_ev(sid, serial, 10046, 4, ''); > end; > I get: > PLS-00201: identifier 'SYS.DBMS_SYSTEM' must be declared > Any suggestions? > thanks, > RU
You don't have explicit permissions granted to execute the package. -- Daniel A. Morgan University of Washington damor @x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.org -----------------------------------------------Reply-----------------------------------------------
On May 10, 7:45 am, sybrandb <sybra @gmail.com> wrote:
> On May 10, 1:25 pm, RU <r @vakuum.de> wrote: > > Hi Folks, > > I'm trying to define a (I thought) trivial stored procedure (SP) as > > a front-end to the standard SP "dbms_system.set_ev", > > which I want to use to generate a 10046 tracing event. I'm trying > > to execute the following PL/SQL: > > create or replace procedure rob_enable_tracing ( > > sid in integer, > > serial in integer > > ) > > is > > begin > > dbms_system.set_ev(sid, serial, 10046, 4, ''); > > end; > > and getting the error: > > PLS-00201: identifier 'DBMS_SYSTEM.SET_EV' must be declared > > If I provide the schema in which "set_ev" is defined, in this case "SYS", > > as in: > > create or replace procedure rob_enable_tracing ( > > sid in integer, > > serial in integer > > ) > > is > > begin > > sys.dbms_system.set_ev(sid, serial, 10046, 4, ''); > > end; > > I get: > > PLS-00201: identifier 'SYS.DBMS_SYSTEM' must be declared > > Any suggestions? > > thanks, > > RU > Look up PLS-201 in the Google archives. Your question has been asked > AND answered at least a million times before. > -- > Sybrand Bakker > Senior Oracle DBA- Hide quoted text - >
There is an example cover package for dbms_system in the following web article: How do I switch on sql trace in another session that is already running? http://www.jlcomp.demon.co.uk/faq/alien_trace.html HTH -- Mark D Powell --
-----------------------------------------------Reply-----------------------------------------------
On Thu, 10 May 2007 08:58:26 -0700, DA Morgan wrote: > You don't have explicit permissions granted to execute the package.
spot on. thanks very much. RU
-----------------------------------------------Reply-----------------------------------------------
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 RU schreef: > On Thu, 10 May 2007 08:58:26 -0700, DA Morgan wrote: >> You don't have explicit permissions granted to execute the package. > spot on. thanks very much. > RU
The mantra is: set role none when developing stored procedures. - -- Regards, Frank van Bortel Top-posting is one way to shut me up... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (MingW32) iD8DBQFGRZCkLw8L4IAs830RAizeAKCYMaXAAQgJ2EYMIzgAFk0IUD41LACeNyWk J3zCo1OmUGgLu9DsAHfjWlA= =EOE5 -----END PGP SIGNATURE-----
|
 |