Help with "alter system set events = '1000 trace name ERRORSTACK level 3'"

Hello.
I am trying to find out wich sql code is creating the error ORA-01000 in my application (database release is 9.2.0.7). I have read this http://www.orafaq.com/node/758 and there they suggest doing this:
Sometimes you will need to get a full stack trace of the problem by setting a trace for ORA-1000 as in:
alter system set events = '1000 trace name ERRORSTACK level 3'
or...
alter session set events = '1000 trace name ERRORSTACK level 3'
Then set open_cursors to a low enough number to catch the open cursor voilator in your net.I have no idea about this traces, so these are my questions:
1. Do those commands force a trace every time the ORA-01000 errors rises in every session? (I have forced the ORA-01000 error in one sqplusl session after I wrote "alter session set events = '1000 trace name ERRORSTACK level 3'" in another sqlplus session)
2. What does level 3 mean?
3. I see that in the dump/user directory I have several trace files, how can I know which error traces are enabled in my db?
4. How do I disable the traces once I find out to solve the problem?
5. How do I identify in the traces the ORA-1000 error?
Thanks in advance.

Thanks for all the answers.
What am I doing bad? I have tried ti find out what traces are enabled, and there seems to be none.
SQL> r
  1  DECLARE
  2     OUT   BINARY_INTEGER;
  3  BEGIN
  4     DBMS_OUTPUT.put_line ('Init');
  5
  6     FOR i IN 1 .. 20000
  7     LOOP
  8        SYS.DBMS_SYSTEM.read_ev (i, OUT);
  9
10        IF (OUT <> 0)
11        THEN
12           DBMS_OUTPUT.put_line ('i: ' || i || '; ' || OUT);
13        END IF;
14     END LOOP;
15
16     DBMS_OUTPUT.put_line ('End');
17* END;
Init
EndBut, otherwise, there are trc files which have been modfiied recently? I seems as if this procedure can't detect all the tracles enabled:
(oracle)mano1re(principal)$ ls -lt *.trc | more
-rw-r-----   1 oracle   dba       348294 jul 14 18:35 reflex_ora_11706.trc
-rw-r-----   1 oracle   dba       997820 jul  9 16:32 reflex_ora_15766.trc
-rw-r-----   1 oracle   dba       399571 jul  3 15:23 reflex_ora_25955.trc
-rw-r-----   1 oracle   dba      1637069 jun  9 15:34 reflex_ora_19742.trc
PL/SQL procedure successfully completed.

Similar Messages

  • Alter system set events '1460 trace name errorstack level 10';

    Hi,
    If I issue :
    alter system set events '1460 trace name errorstack level 10';
    How can I come back after operation ?
    Thank you.

    SQL> alter system set events '1460 trace name errorstack level 10';
    System altered.
    SQL> alter system set events '1460 trace name off';
    alter system set events '1460 trace name off'
    ERROR at line 1:
    ORA-02194: event specification syntax error 230 (minor error 213) near 'OFF'
    SQL> alter system set events '1460 trace name errorstack off';
    System altered.

  • Enabling alter system set events '1422 trace name errorstack level 1'

    Hello, please i need some help:
    I need to set events '1422 trace name errorstack level 1',
    where does this sentence generate the trace logs?.
    Once collected the information how do i disable it?
    Thanks in advance.

    Normally user dumps are written to the udump database parameter destination. See v$spparameter or v$parameter.
    You can set the level to "0" (zero) to set tracing off.
    HTH -- Mark D Powell --

  • Alter system set events '1460 trace name errorstack off';

    Hi,
    if I issue :
    alter system set events '1460 trace name errorstack off';
    Is there any query that can make me sur and help me to see the value of events '1460' ?
    Thank you.

    Is there any query that can make me sur and help me to see the value of events '1460' ?No one, because you turned off the trace level.
    Nicolas.

  • Alter system set events

    Hi all,
    I'm using a 10.2.0.4 Oracle version.
    My colleague active trace generation using: alter system set events '942 trace name errorstack level 3';
    How can I know if this is active now? And, How can I deactivate it?
    Regards,
    dbajug

    How can I know if this is active now?To get all events set at system level, try and check trace file created in USER_DUMP_DEST directory:
    alter system set events 'immediate trace name events level 4';
    And, How can I deactivate it?Try:
    alter system set events '942 trace name errorstack off';

  • Alter system set events Question

    Version 10202 on AIX
    sql> alter system set events '4030 trace name heapdump level 536870917; name errorstack level 3';
    Questions about this statement..
    what this command is doing, i guess creating tracefile for event 4030...& the location of trace file would be the current direcotry?
    & how to setup same kind of event trace for other events, any tips....& what to check in tracefile for problem?

    The values for level I have record are 1, 2, 3, 8, and 32 so I am guessing the number shown is the address of a specific heap to be dumped. The address of a heap would potentially change with a change in the shared pool storage parameters. Where did you get the address value?
    The dump should go to the user background dump destination and not the current directory.
    PS - if you have metalink look at document: #218105.1 Introduction to ORACLE Diagnostic EVENTS
    HTH -- Mark D Powell --
    Message was edited by: MDP add PS to Metalink Doc
    mpowel01

  • ALTER SYSTEM SET processes=1000 generates ORA-00064: object is too large to

    Hi All
    I'm using Oracle Release 10.2.0.1.0.
    When performing:
    =============
    ALTER SYSTEM SET processes=10000 SCOPE=SPFILE;
    We can't start the 10g DB: ORA-00064: object is too large to allocate on this O/S (1,5282400)
    When reducing the size to 150 there is no problem starting the db. I can not start it. ORA-00064: object is too large to allocate on this O/S (1,5282400)
    I refered to ORA-00064: object is too large to allocate on this O/S :::Plz Help Me
    But I can not resolve this problem.
    Please help me.
    thiensu

    Not sure, because i haven't got ORA-00064 yet.
    ORA-00064: object is too large to allocate on this O/S num, num
    Cause: The initialization parameter DB_BLOCK_SIZE is set to a value that calls for more contiguous space than can be allocated on the operating system being used.
    Action: Reduce the value of DB_BLOCK_SIZE so that the requested contiguous space is within the capacity of the operating system.
    http://www.pitt.edu/~hoffman/oradoc/server.804/a58312/newch2a1.htm
    Regards
    Girish Sharma

  • Alter system or alter session set events

    Can we use interchangeably alter session or alter system set events?
    Thank you.

    DBA-ES wrote:
    For example this statement
    alter session set events '8103 trace name errorstack level 3';
    Can it be done at the system level? How to check it?Sure it can be,
    SQL*Plus: Release 11.2.0.1.0 Production on Fri Oct 21 15:32:54 2011
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> alter session set events '8103 trace name errorstack level 3';
    Session altered.
    SQL> alter system set events '8103 trace name errorstack level 3';
    System altered.
    SQL>And to check, for the alter system , the statement would be logged in the alert log,
    Fri Oct 21 15:31:46 2011
    OS Pid: 4656 executed alter system set events '8103 trace name errorstack level 3'
    D:\app\aristadba\diag\rdbms\orcl112\orcl112\trace>sqlplus / as sysdbaHTH
    Aman....

  • How to scan 'immediate trace name SYSTEMSTATE level 10' trace files?

    Hi ,my 20 TB of database is hanging and my manager told me to run the following system state dump and anaylse the trace file to see which processes etc are hanging the database.
    SQL>alter session set events 'immediate trace name SYSTEMSTATE level 10';
    I got 2 trace files which are quite large....not sure what to look into.....can anybody plz suggest what to see if in them if database is not responsing
    Thanks
    gagan

    If you dump a couple of hanganalyze every 60 seconds or so. You will be able to see wait chains and identify sessions that are progressing(slow) and those that aren't(hung). Then you can reference this information with the process information in the system state dump. A level 3 or 4 is ok for what you want. Still, if you are not sure where to look in the first place, best to log a SR with Oracle.

  • Is it risky to use statement : "alter session set events"

    Hi guys,
    I am extracting data from cxml documents.
    I had to run the following code "EXECUTE IMMEDIATE ('alter session set events ''31156 trace name context forever, level 2'''); " to disable the DTD validation...b4 running any xml extract function on it.
    Example:
    CREATE OR REPLACE FUNCTION f_test (
    p_cxml IN CLOB
    RETURN BOOLEAN
    AS
    l_payload varchar2(100);
    l_cXML sys.xmltype := sys.xmltype.createXML(p_cxml);
    BEGIN
    EXECUTE IMMEDIATE ('alter session set events ''31156 trace name context forever, level 2''');
    SELECT EXTRACTVALUE(l_cXML,'/cXML/@payloadID')
    INTO l_payload
    FROM DUAL;
    RETURN TRUE;
    DBMS_OUTPUT.PUT_LINE (l_payload);
    EXCEPTION
    WHEN OTHERS
    THEN
    DBMS_OUTPUT.PUT_LINE (SQLCODE || ' - '||SQLERRM);
    RETURN FALSE;
    END;
    The vlaue of the parameter p_cxml could be
    p_cXML clob:=
    '<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.021/Fulfill.dtd">
    <cXML payloadID="[email protected]"
    timestamp="2000-10-12T18:39:09-08:00" xml:lang="en-US">
    <Request deploymentMode="test">
    <OrderRequest>
    <OrderRequestHeader orderID="DO1234" orderDate="2000-10-12T18:41:29-08:00"
    type="new">
    <Total>
    <Money currency="USD">187.60</Money>
    </Total>
    <ShipTo>
    <Address>
    <Name xml:lang="en">Acme</Name>
    <PostalAddress name="default">
    <DeliverTo>Joe Smith</DeliverTo>
    <DeliverTo>Mailstop M-543</DeliverTo>
    <Street>123 Anystreet</Street>
    <City>Sunnyvale</City>
    <State>CA</State>
    <PostalCode>90489</PostalCode>
    <Country isoCountryCode="US">United States
    </Country>
    </PostalAddress>
    </Address>
    </ShipTo>
    </OrderRequestHeader>
    </OrderRequest>
    </Request>
    </cXML>';
    It is seems to be working.......................
    MY QUESTION IS...
    Is there any risk Involved to Using the
    EXECUTE IMMEDIATE ('alter session set events ''31156 trace name context forever, level 2'''); statment.
    Any Help will be greatly appreciated.
    Thanks.

    Most "set events" are workarounds or needed for Oracle support to do some debugging. Using them is at your own risk, and probably not supported by Oracle if you get into trouble.

  • Insufficient privileges when creating MV with alter session set current_sch

    I am getting Insufficient privileges when creating MV with alter session set current_schema=Application schema name. User running the alter session is DBA user. If run as SYSDBA, MV is created successfully. DB Version is 10.2.0.3
    I observed similiar issue with regular View also in 9.2.0.6 also.
    Any advice is greatly appreciated.
    Thanks,
    Siva

    Sounds like your management needs a stern lecture on the concept of change management. <g>
    I am not debating what you do. I am questioning the logic, or lack thereof, of doing it that way. My recommendation would be to change your procedure to one that:
    A. Is more in line with good change management practices.
    B. Works.

  • How can I check and change the system set events trace level?

    Dear all:
    How can I check the system set events trace level? I don't want the alert_log so big.
    Regards
    Terry

    Hi Terry;
    Please check :
    How to determine which system events are currently being set? [ID 845043.1]
    How To List All The Named Events Set For A Database [ID 436036.1]
    How to set EVENTS in the SPFILE [ID 160178.1]
    Also check:
    http://www.dba-oracle.com/t_grid_rac_events_in_Oracle.htm
    http://www.akadia.com/services/ora_events.html
    Hope it helps
    Regard
    Helios

  • Question on alter system set cluster_database = true

    11.2.0.2.0 windows 2008
    doing a restore to a development RAC I noticed the following. I took the database out of cluster mode on one instance
    alter system set cluster_database=false scope=spfile sid='PRD1';
    shutdown, start up, do the restore, all good, I go to set cluster_Database=true but had issue instance would only start on one node, I reviewed my notes and found problem was when I set cluster_Database back to true I had typed
    alter system set cluster_database=true scope=spfile sid='*';
    instead of
    alter system set cluster_database=true scope=spfile sid='PRD1';
    So issue fixed.
    I retested and confirmed '*' wont take. Ive seen many examples of '*' working online and I am sure I have used '*' many times so had just typed it off my head. Anyone explain? probably quotes or something.

    Any chance there are multiple lines for cluster_database in the spfile ?I had thought maybe this, but confirmed no, it was a fresh build anyway that I was restoring to.
    >
    - Dump the spfile to a pfile ... edit ... recreate the spfile on all nodes.
    >
    Im not sure what this will achieve? the spfile is shared on the ASM.
    >
    As the cluster_database=true is a parameter to enable the RAC configuration. As you typed sid='*' it will try to enable the cluster_database parameter in all the instances(nodes) as it is RAC.
    In your case as you did on a single node by specifiying the sid name it will work as it will look only for that sid and enable that particular node.
    >
    I find this hard to read but I think this misinterprets as well.
    Thanks for the contribution. I think Ive found the solution
    the asterisk doesnt apparently mean actually "all instances", from here
    http://www.comp.dit.ie/btierney/oracle11gdoc/rac.111/b28254/admin.htm#BCEFICEE
    and
    "Setting SPFILE Parameter Values for Oracle Real Application Clusters"
    -- this is a good example of what happened to me
    >
    *.OPEN_CURSORS=500
    prod1.OPEN_CURSORS=1000
    Note:
    The value before the dot in an SPFILE entry identifies the instance to which the particular parameter value belongs. When an asterisk precedes the dot, the value is applied to all instances that do not have a subsequent, individual value listed in the SPFILE.
    For the instance with the Oracle system identifier (SID) prod1, the OPEN_CURSORS parameter is set to 1000 even though it has a database-wide setting of 500. Parameter file entries that have the asterisk (*) wildcard character only affect the instances without an instance-specific entry. This gives you control over parameter settings for instance prod1. These two types of settings can appear in any order in the parameter file.
    If another DBA runs the following statement, then Oracle updates the setting on all instances except the instance with SID prod1:
    ALTER SYSTEM SET OPEN_CURSORS=1500 sid='*' SCOPE=MEMORY;
    >
    so when I was on node 1 and ran it for *, I was setting it for all the nodes except the node I was on which holds true from what Ive seen. I'll remember that one.

  • Alter system set nls_length_semantics

    Hi all,
    my question concerns the scope in the change of NLS_LENGTH_SEMANTICS can be performed.
    The 10gR2 documentation only the
    "Modifiable      ALTER SESSION"
    But what about altering the system and making your own setting to default for all sessions? With which scope?
    I tried
    alter system set nls_length_semantics='CHAR';
    alter system set nls_length_semantics='CHAR' scope=spfile;
    alter system set nls_length_semantics='CHAR' scope=both;
    None had really any effect. Do I have to bounce the database?

    Hello,
    Do I have to bounce the database?Yes, you have to shutdown and startup the database.
    Else the NLS_LENGTH_SEMANTICS change won't be effective.
    You may have more details on the following thread:
    nls_database_parameters->nls_length_semantics Help!
    There's also an interesting Note from MOS:
    Examples and limits of BYTE and CHAR semantics usage (NLS_LENGTH_SEMANTICS) [ID 144808.1]They give many information about NLS_LENGTH_SEMANTICS and the following Bug:
    Bug 1488174
    Problem: ALTER SYSTEM does not change the setting of NLS_LENGTH_SEMANTICS for the current and new (!) sessions.
    Workaround: Don't use ALTER SYSTEM SET NLS_LENGTH_SEMANTICS scope=both; but set NLS_LENGTH_SEMANTICS as a init.ora parameter or issue ALTER SYSTEM SET NLS_LENGTH_SEMANTICS=CHAR scope=spfile; and bounce the database.Hope this help.
    Best regards,
    Jean-Valentin
    Edited by: Lubiez Jean-Valentin on May 27, 2010 2:06 PM

  • Alter system set shared_pool_size extremely slow.

    I am trying to increase my shared_pool_size from 60m to 200m by simply typing alter system set shared_pool_size=200m;
    I did alter system flush shared_pool; before to clear out the current shared_pool.
    I'm on 9i and my SGA_MAX_SIZE is 3g and I have plenty room to grow.
    show sga
    Total System Global Area 3222769016 bytes
    Fixed Size 744824 bytes
    Variable Size 2382364672 bytes
    Database Buffers 838860800 bytes
    Redo Buffers 798720 bytes
    My event in v$session_wait is background parameter adjustment.
    Any help would be appreciated. I know that I can bounce the server and let it read it from the init.ora. However, I'm trying to fix some current 4031s in my shared pool. The flush did fix them temporarily.

    Are you sure your instance was in the state you thought it was ? This is what you reported from show sga:
    Total System Global Area  3222769016 bytes
    Fixed Size                    744824 bytes
    Variable Size             2382364672 bytes
    Database Buffers           838860800 bytes
    Redo Buffers                  798720 bytesYou say your shared_pool_size is 60M and you want to grow it to 200M, but the Variable Size in the output above suggests that your shared pool had already grown to about 2.3 GB, so your command would have been trying to shrink it quite dramatically. (And 9i isn't very good at shrinking the shared pool because of the problems of pinned and "KEEP"ed objects in the library cache.
    Things to check (from another session):
    v$sga_current_resize_ops to see if your resize operation is still running, and what it's trying to do.
    v$sga_resize_ops to see i f your resize operation completed some time ago - leaving your session stuck somewhere else. (There's a convenient query I wrote against this view published here: http://jonathanlewis.wordpress.com/2007/04/16/sga-resizing/ )
    v$session_wait (for the resize session) to see if the session is waiting or working
    v$sesstat (for the resize session) to see if it gives you any clues about current activity
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk

Maybe you are looking for