RE: How to use "lifetime" clause to limit the number of traces correctly

From: Mark W. Farnham <mwf_at_rsiz.com>
Date: Tue, 19 Nov 2019 15:31:31 -0500
Message-ID: <001801d59f18$53f89850$fbe9c8f0$_at_rsiz.com>



off the top of my head you could write (or add to an existing) logon trigger or glogin sequence for the application to update a two column numeric and varchar2 if the current value of the numeric is less than some number and execute the string stored in the varchar2 and update the numeric plus 1. Probably best to stash that all in a package, but pick whatever is easiest for you.  

Stash the alter in the varchar2 and set the number to zero. (Oh, change that from system to session).  

Then in the future you can update the number to zero and the string to a new value. (Oh, and people with authority to do so can add things ad nauseum to the cost of your login, so beware of that.) You could do all sorts of fancification, perhaps using a date and a number instead of a number and only doing the payload n times per time window. But remember, few (if any) user interfaces can be improved by adding features. That’s a paraphrase of my friend Cary if I recall correctly.  

Or, if you don’t want to automate it, set the alter system as you do now, wait for a few sessions to connect, and alter the system again to stop tracing.  

Now, there could well be a nifty way to do this in OEM or whatever the latest name of enterprise manager is. But I’m a dinosaur, so someone else will have to help you on that.  

mwf  

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of kunwar singh Sent: Tuesday, November 19, 2019 12:34 PM To: Jonathan Lewis
Cc: ORACLE-L
Subject: Re: How to use "lifetime" clause to limit the number of traces correctly  

Hi Jonathan,

You are right. it is per session .

Yes i am concerned about lot of sessions doing the dumps , there are like 7000 sessions through app and i dont want trace directory to get flooded. Is there a way we can limit database wide to just 2 or some number i decide?    

On Tue, Nov 19, 2019 at 9:49 AM Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk> wrote:

When you say "keeps dumping" do you mean a single session keeps dumping ? Or are you concerned that you see lots of sessions doing dumps ?

You've used alter system, so every session gets a lifetime of 2. (In fact, on some tests I did a while back when messing about with an ORA-01652, it looked like I got "lifetime" (nearly identical) error stacks at the same time on one occurrence of the error, but only got dumps on the first dump.)

Regards
Jonathan Lewis



From: oracle-l-bounce_at_freelists.org <oracle-l-bounce_at_freelists.org> on behalf of kunwar singh <krishsingh.111_at_gmail.com> Sent: 19 November 2019 13:52
To: ORACLE-L
Subject: How to use "lifetime" clause to limit the number of traces correctly

Hi Listers,
I am reading this link:
https://blog.tanelpoder.com/2009/03/03/the-full-power-of-oracles-diagnostic-events-part-1-syntax-for-ksd-debug-event-handling/

then i tried to test the tracing using the below example.

 alter system set events '942 trace name errorstack level 3,lifetime 2';

but it keeps dumping error stack even after 2nd incident of the error. Is something broken/wrong with my syntax or tracing level or do i have use some alternative syntax. I am trying this in 12.2.0.1 .

The reason i am playing with it is to troubleshoot issue in an 11.2.0.4 for a different ORA error thrown by the application.

--

Cheers,
Kunwar  

--

Cheers,
Kunwar

--

http://www.freelists.org/webpage/oracle-l Received on Tue Nov 19 2019 - 21:31:31 CET

Original text of this message