Return-Path: <oracle-l-bounce@freelists.org>
Received: from air189.startdedicated.com (root@localhost)
 by orafaq.com (8.11.6/8.11.6) with ESMTP id i1DJeFX03124
 for <oracle-l@orafaq.com>; Fri, 13 Feb 2004 13:40:15 -0600
X-ClientAddr: 206.53.239.180
Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180])
 by air189.startdedicated.com (8.11.6/8.11.6) with ESMTP id i1DJeCo02927
 for <oracle-l@orafaq.com>; Fri, 13 Feb 2004 13:40:15 -0600
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP
 id 2538E39662B; Fri, 13 Feb 2004 14:06:06 -0500 (EST)
Received: with ECARTIS (v1.0.0; list oracle-l); Fri, 13 Feb 2004 14:04:34 -0500 (EST)
X-Original-To: oracle-l@freelists.org
Delivered-To: oracle-l@freelists.org
Received: from smtp.wangtrading.com (smtp.wangtrading.com [167.206.68.5])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 5EB7D395E71
 for <oracle-l@freelists.org>; Fri, 13 Feb 2004 13:53:10 -0500 (EST)
Received: from mladen.wangtrading.com (Not Verified[192.168.3.47]) by smtp.wangtrading.com with NetIQ MailMarshal (v5.5.5.8)
 id <B00004429a>; Fri, 13 Feb 2004 13:53:12 -0500
Received: from mladen (localhost.localdomain [127.0.0.1])
 by mladen.wangtrading.com (8.12.8/8.12.8) with ESMTP id i1DIs0uH002325
 for <oracle-l@freelists.org>; Fri, 13 Feb 2004 13:54:01 -0500
Date: Fri, 13 Feb 2004 13:54:00 -0500
From: Mladen Gogala <mladen@wangtrading.com>
To: oracle-l@freelists.org
Subject: Re: Using a trigger to turn on tracing
Message-ID: <20040213185400.GE2211@mladen.wangtrading.com>
References: <20040213182948.28845.qmail@web13421.mail.yahoo.com>
Mime-Version: 1.0
Content-type: text/plain; charset=ISO-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20040213182948.28845.qmail@web13421.mail.yahoo.com> (from treegarden@yahoo.com on Fri, Feb 13, 2004 at 13:29:48 -0500)
X-Mailer: Balsa 2.0.16
Lines: 66
X-archive-position: 664
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-To: oracle-l-bounce@freelists.org
X-original-sender: mladen@wangtrading.com
Precedence: normal
Reply-To: oracle-l@freelists.org
X-list: oracle-l

Or the trigger must invoke a procedure owned by someone having 'ALTER  
SESSION' privilege.
On 02/13/2004 01:29:48 PM, Paul Baumgartel wrote:
> The user must have ALTER SESSION granted directly, not via a role.
> 
> 
> --- "Schauss, Peter" <peter.schauss@ngc.com> wrote:
> > I am trying to use a trigger to turn on tracing for a specified
> user.
> > I copied the example from Cary Millsap's _Optimizing Oracle
> > Performance_.
> >
> > The text of the trigger is:
> >
> > create or replace trigger trace_user after logon on database
> > begin
> > 	 if user = 'TEST' then
> > 	 	execute immediate 'alter session set
> timed_statistics =
> > true';
> > 		execute immediate 'alter session set
> max_dump_file_size =
> > unlimited';
> > 		execute immediate
> > 				'alter session set events ''10046
> trace name
> > context forever, level 8''';
> > 	 end if;
> > end;
> > /
> >
> > When I try to log on as user TEST, I get:
> >
> > ORA-00604: error occurred at recursive SQL level 1
> > ORA-01031: insufficient privileges
> > ORA-06512: at line 5
> >
> > What privilege does TEST need here?
> >
> > Thanks,
> > Peter Schauss
> > ----------------------------------------------------------------
> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > ----------------------------------------------------------------
> > To unsubscribe send email to:  oracle-l-request@freelists.org
> > put 'unsubscribe' in the subject line.
> > --
> > Archives are at http://www.freelists.org/archives/oracle-l/
> > FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> > -----------------------------------------------------------------
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance: Get your refund fast by filing online.
> http://taxes.yahoo.com/filing.html
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to:  oracle-l-request@freelists.org
> put 'unsubscribe' in the subject line.
> --
> Archives are at http://www.freelists.org/archives/oracle-l/
> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------
> 
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

