Sys.sqlerror$ table question

Could someone explain what is this table? And how could it be used. I executed several erroneous sql queries but it did not populated, do I need to set some session parameter or so in order to populate it?

You have turned on standard auditing (look at initialization parameter AUDIT_TRAIL). That, combined with audit commands leads to entries in aud$ (usually accessed via DBA_AUDIT_TRAIL). If you do not delete or truncate aud$ regularly - in line with your company audit policy if there is one - this gives you an ever growing aud$ table. If many objects/privileges/statements are being audited in many simultaneous sessions, this also leads to many open cursors.
Kind regards
Uwe Hesse
http://uhesse.wordpress.com

Similar Messages

  • Strange issue on deleting some rows on SYS.AUD$ table

    I just found out this strange thing happened on my 10gR2 database. I created a user called AUDIT_LOG and GRANT DELETE, REFERENCES, SELECT ON SYS.AUD$ TO AUDIT_LOG when I logged on as SYS dba.
    (1) Then I logged on as AUDIT_LOG user, tested the following statements:
    SELECT count(*) from sys.aud$ where ntimestamp# < TRUNC (SYSDATE-14);
    COUNT(*)
    2
    DELETE from sys.aud$ where ntimestamp# < TRUNC(SYSDATE-14);
    0 rows deleted
    (2) When I logged on as SYS account, SYS deleted them all,
    DELETE from sys.aud$ where ntimestamp# < TRUNC(SYSDATE-14);
    2 rows deleted
    I don't understand why the AUDIT_LOG user can't delete that two rows?
    Thanks for your help!
    lixidon

    Apologies for misreading the first time. I am wondering if the rows in question were related to audit actions on sys.aud$ itself as those rows should not be deleted by the AUDIT_LOG user (even if the user has been granted delete).
    Here's an excerpt from the Security Guide under the "Protecting the Standard Audit Trail" section:
    Audit records generated as a result of object audit options set for the SYS.AUD$ table can only be deleted from the audit trail by someone connected with administrator privileges, which itself has protection against unauthorized use.
    Here's a quick example illustrating this:
    SQL> connect / as sysdba
    Connected.
    SQL> grant delete, references, select on sys.aud$ to scott;
    Grant succeeded.
    SQL> connect scott/tiger
    Connected.
    SQL> select count(*) from sys.aud$ where sessionid = 30002;
      COUNT(*)
             2
    1 row selected.
    SQL> delete from sys.aud$ where sessionid = 30002;
    2 rows deleted.
    SQL> commit;
    -- now try to delete the sys.aud$ rows related to the above delete
    -- this will not succeed as user scott even though delete has been granted
    -- the session that performed the delete is 422426
    SQL> select count(*) from sys.aud$ where obj$name = 'AUD$' and action# = 7 and sessionid = 422426;
      COUNT(*)
             2
    1 row selected.
    SQL> delete from sys.aud$ where obj$name = 'AUD$' and action# = 7 and sessionid = 422426;
    0 rows deleted.
    SQL>Regards,
    Mark

  • How to override limitation of no triggers on SYS owned tables?

    Hi!
    I haven't got any answers to my earlier question so I try to make it simple now...
    Anybody have any ideas how I could override Oracles limitation of allowing no triggers on SYS owned tables?
    I would need a trigger on SYS.AUD$ that would fire and start a stored procedure every time a new audit record is inserted.
    Best regards,
    Teo Laitinen
    Student
    Department of Computer Science and Information Technology
    University of Jyvdskyld

    You cannot override Oracle's restrictions of triggers on SYS tables. You could, however, do a workaround to populate this other table with data from sys.aud$ when an audit row is inserted into that table.
    1. You could set AUDIT_TRAIL to OS and set AUDIT_TRAIL_DEST to wherever you want the file written. You could then write a program in any number of languages to format this output file and kick off a SQL*Loader session to load it into your table. The program could be scheduled to execute at a time interval, such as every five minutes.
    2. You could write a scheduled program to check for new records in sys.aud$ and execute INSERT INTO...SELECT statements to load your new table.
    Hope this helps!

  • Trigger on SYS owned tables/views

    Hello DBA's,
    I need to achive something.. for which I have to write a trigger on SYS owned tables/views.
    My question is, IS IT POSSIBLE TO WRITE A TRIGGER ON SYS OWNED OBJECTS?. If so please provide me simple example.
    Depending on the value which will be inserted or updated into to this sys.views/sys.tables, I have to submit "job" which will inturn does some operation depending on the "value" which was inserted or updated on this view/table.
    Thankz in advance..
    Binny

    Justin,
    I will give some simple example...
    User-1 is created procedure... it will be in valid state.. after some time this procedure will be invalidated...(due to some other procedure creation, etc)..
    Stage1, during successful creation of procedure the status will be VALID (in DBA_OBJECTS)
    Stage2, the status will be INVALID..
    I need to write a trigger for this status change in dba_objects.. The status change will be caused due to some other operation..
    Is it possible to write a trigger at the point of status change? if so how?.
    This is the simple example I have remembered.
    Let me about this..
    Thankz
    Binny

  • Is there a way to include the sys.aud$ table in a full database dp export?

    I am doing an export using the following parfile information:
    userid=/
    directory=datapump_nightly_export
    dumpfile=test_expdp.dmp
    logfile=test_expdp.log
    full=y
    content=all
    However when I run this I do not see the sys.aud$ in the log file. I know I can do a seperate export to specifically get the sys.aud$ table but is there any way to include it in with my full export?
    Thanks in advance for any suggestion.

    here's more background infomation... I have some audits setup on my database for one of my users. Every quarter I have an automated job that runs that creates a usage/statics report for this person using data in aud$. at the end of the job I export the aud$ table and truncate it. However last quarter I found that there was a mistake in my report and my export did not run properly thus my audit data was gone. i also have full datapump exports that run daily but found that aud$ was not there. so that is why I thought I'd like to include sys.aud$ in the full datapump exports.
    i understand why other sys tables would be left out of a full export but aud$ data cannot be reproduced so to me it makes sense to include it in a full export.
    don't worry, we run our true backups using rman which is eventually how I got the aud$ data back by creating a copy of my database up until the time of the truncate. however this was quite time consuming.

  • Table question/problem

    This is an html table question, but since I am working with
    CF on this, I thought I would post here for help.
    I query and cfoutput the data in a table. The table has ten
    columns. The first five are alpha numeric and the last five are
    numeric. The output displays fine.
    What the want to do now is to put a black border around the
    number columns, the last five.
    I tried to make each column its own table, but that just puts
    a box around each value, the columns are not connected.
    How can I do this ?
    Thanks for helping.

    Put a thin black left border in the sixth column and a
    similar right border in the tenth (last) column.
    It is neater and advisable to use CSS.
    <style type="text/css">
    <!--
    .bdrLft {
    border-left-color:#000000;
    border-left-width:thin;
    -->
    </style>
    <td class="bdrLft">
    The inline formatting will look like:
    <td style="border-left-color:##000000;
    border-left-width:thin;">
    Do the same for the top border (last 5 column headers). The
    bottom border may be trickier. The idea is to apply bottom border
    at the last query count. One can do without the top and bottom
    borders, however.

  • Sys.aud$ table

    Hi,
    I need to get the auditing information for the last seven days fron the auditing table for users other than apps.I tried the below query.Please correct me if it is wrong.The query takes
    a long time to execute and no output dispayed.Please inform me whether the below query is correct and inform me if i need to do any modifications.
    select userid,userhost,terminal,action#,obj$name, NTIMESTAMP# from sys.aud$ where action#=3 and timestamp# >=(sysdate-7) and userid not in ('APPS') order by ntimestamp# desc;
    Regards
    Aram

    You are SELECTing and ORDERing using column NTIMESTAMP#, but WHERE clause is using TIMESTAMP# (different column), most likely leading to a poor execution plan. Is the statement you posted syntactically correct ?
    MOS Doc 1025314.6 - Descriptions of Action Code and Privileges Used in Fields in SYS.AUD$ Table
    HTH
    Srini

  • Dba_scheduler_jobs for clearing the sys audit table

    Hi.
    can u please tell me how to purge a sys.aud$ table records once its reached more than once lakh ... these 1 lakh is the threshold and other more data will be peridiodically purged by automated dba_scheduler_jobs.
    My db is - 10g
    so i need to always retain 1lakh rows on the table..extra data will be purged...once breaching the threshold...i don know how to write..since i am new to this oracle.can anyone help?
    Thanks

    See these MOS Docs
    How To Shrink AUD$ IN ORACLE 10G (Doc ID 1080112.1)
    New Feature DBMS_AUDIT_MGMT To Manage And Purge Audit Information (Doc ID 731908.1)
    How to Truncate, Delete, or Purge Rows from the Audit Trail Table SYS.AUD$ (Doc ID 73408.1)
    Srini

  • Sys.aud$ Table not accesible over PL/SQL ?

    I try to do the follow.
    When you start the auditing with specific command like AUDIT
    SESSION; it will produce many many rows in the sys.aud$ table.
    This is the reason while we need to maintain the data witch exist
    then in thsi table.
    I did try it to do this with a separate user like AUDITER.
    I gave them from the sys user the follow permissions:
    GRANT select, delete, update , insert to AUDITER;
    If i try now to select from SYS.AUD$ it works if i do it with a
    separet select statement like :
    SELECT * FROM SYS.AUD$.
    If i make a PROCEDURE like folow :
    PROCEDURE proceed_audit as
    CURSOR audtab is select * from sys.aud$
    BEGIN
    END;
    Oracle generate the message :
    PLS-00201: identifier 'SYS.AUD$' must be declared
    I don't anderstand this message, becose this object exists and in
    "SQL" i can use it.
    Can anyone help me ?
    Thanks
    P.S. it's the Oracle version 8.1.7i

    Are you sure the user that is executing the PL/SQL block has
    direct grants to the tables you are referencing? I.E. NOT
    through a role? PL/SQL requires the user to have direct grants
    to the object it references. Granting DBA to the user won't have
    any affect on the execution of the PL/SQL

  • What is sessionid field in SYS.AUD$ table

    Hi,
    Can anyone say,what is sessionid field in sys.aud$ table..It seems different than the sessions

    Look at the session value in sys.aud$ table.
    QL> select sessionid from sys.aud$ where rownum<10;
    SESSIONID
    459521060
    459521607
    459521661
    459521901
    459521954
    459522004
    459522052
    459522262
    459522424
    It seems that,its not asession id.Mostly sessionid length ll be in3-4.

  • SQL and External table question

    Hello averyone,
    I have a file to be read as an external table part of it is below:
    ISO-10303-21;
    HEADER;
    FILE_DESCRIPTION((''),'2;1');
    FILE_NAME('BRACKET','2005-07-08T',('broilo'),(''),
    'PRO/ENGINEER BY PARAMETRIC TECHNOLOGY CORPORATION, 2004400',
    'PRO/ENGINEER BY PARAMETRIC TECHNOLOGY CORPORATION, 2004400','');
    FILE_SCHEMA(('CONFIG_CONTROL_DESIGN'));
    ENDSEC;
    DATA;
    #5=CARTESIAN_POINT('',(5.5E0,5.5E0,-5.1E1));
    #6=DIRECTION('',(0.E0,0.E0,1.E0));
    #7=DIRECTION('',(-1.E0,0.E0,0.E0));
    #8=AXIS2_PLACEMENT_3D('',#5,#6,#7);
    The first question is: how to ignore the lines until the DATA; line or SQL already does it for me?
    The second question is: since the fields of interest are separated by commas and the first field does not interest me (it is solved with a varchar2) how can I read the following fields as numbers ignoring the (,# and ) characters please?
    Thanks for any help.
    Sincerely yours,
    André Luiz

    The SKIP option can be used with SQL*Loader to skip a certain number of lines before starting to load. Off hand I cannot see any easy way to load the data in the format given. The format does not resemble a typical CVS format. You can look at the test cases provided for SQ*Loader in the Oracle® Database Utilities guide - or simply write PL/SQL code to load this data manually using UTL_FILE.

  • Parent child table question

    HI i have some questions which iam unclear please help me
    1) in a parent child relationship.. is it always 1-m relation from parent to child?
    2) can a parent table be on many side? i.e can a child - parent be 1- m?
    3) if i itake employee as child table and department as parent table then dept_id will be the foreigh key in employee table ...
    Now if i want to add a new employee who is not assigned to any department can i add it ?
    4) In an identifying relationship ... a child table has concatenated primary key (pk of child,pk of parent)
    should we still add any other primary key to the table....in addition to this concatenated key?
    thanks in advance
    raj

    Hi!
    1) in a parent child relationship.. is it always 1-m relation from parent to child?
    yes unless you create a unique index on the foreign key column
    2) can a parent table be on many side? i.e can a child - parent be 1- m?
    no, if you need an n-m you will need an intersection table
    e.g. employees - emp_dept - departments
    in this case the emp_dept table would contain the foreign keys of employees and departments
    3) if i itake employee as child table and department as parent table then dept_id will be the foreigh key in employee table ...
    Now if i want to add a new employee who is not assigned to any department can i add it ?
    no, you will have to insert the master first
    Best regards,
    PP

  • External Table Question

    I created the external table ext_sftm (see create statement below) and it worked until I added MISSING FIELD VALUES ARE NULL.
    Now when I run SELECT * FROM EXT_SFTM I get the following errors. [1]: (Error): ORA-29913: error in executing ODCIEXTTABLEOPEN callout ORA-29400: data cartridge error KUP-00554: error encountered while parsing access parameters KUP-01005: syntax error: found "missing": expecting one of: "exit, (" KUP-01007: at line 10 column 5 ORA-06512: at "SYS.ORACLE_LOADER", line 14 ORA-06512: at line 1
    What am I doing wrong?
    CREATE TABLE ext_sftm
    (map_id NUMBER(38,0),
    source_id NUMBER(38,0),
    member_acis VARCHAR2(20),
    source_facility_code VARCHAR2(50),
    source_facility_name VARCHAR2(100),
    source_facility_address VARCHAR2(40),
    source_facility_city VARCHAR2(30),
    source_facility_state CHAR(2),
    source_facility_zip VARCHAR2(10),
    source_name VARCHAR2(100))
    ORGANIZATION EXTERNAL (
    DEFAULT DIRECTORY DCS_DIR
    ACCESS PARAMETERS(RECORDS DELIMITED BY NEWLINE CHARACTERSET WE8ISO8859P1
    BADFILE 'DCS_DIR':'SFTM.bad'
    LOGFILE 'SFTM.log'
    READSIZE 1048576
    SKIP 1
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    REJECT ROWS WITH ALL NULL FIELDS
    MISSING FIELD VALUES ARE NULL
    LOCATION (
    DCS_DIR:'SFTM.csv'
    REJECT LIMIT UNLIMITED
    /

    According to Metalink note:
    Subject:      Select from external table gives ORA-29913 ORA-29400 KUP-00554 KUP-01005
         Doc ID:      Note:302672.1      Type:      PROBLEM
         Last Revision Date:      22-APR-2005      Status:      MODERATED
    This is an syntax error dues to wrong order of field definitions and record format info.
    I suspect something wrong with this line:
    REJECT ROWS WITH ALL NULL FIELDSSee following syntax diagram:
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14215/img_text/et_fields_clause.htm
    Message was edited by:
    Pierre Forstmann
    Message was edited by:
    Pierre Forstmann

  • Internal table question

    Hi Everybody-
    I am very new to SAP and i have question regarding internal tables. I have struture called "ZMI_VENDOR_TO_BW_GENERIC_V_TAB" which i get from another sap system thru SAP XI. Now i need to traverse thru this structure  and add these values into custom database table. So i have declared an internal table like below
    <b>data:itab_venkat type ZMI_VENDOR_TO_BW_GENERIC_V_TAB occurs 10.
      data vendorid type c.
      itab_venkat = Input-Generic_Vendor-Generic_Vendor_Record1.
      LOOP AT itab_venkat.
      vendorid = itab_venkat-generic_vendor_id1.
    endloop.
    </b>
    i am getting an error saying occurs cannot be used and also getting an error at the loop statement, Can somebody please correct me, i am very new to SAP.in the loop i am getting the vendor id and then i should update the database table.
    Please help me.
    Thank you
    Venkat

    hi venkat,
    check these links..
    http://cma.zdnet.com/book/abap/index.htm
    http://www.sapdevelopment.co.uk/
    http://www.sap-img.com/
    http://juliet.stfx.ca/people/fac/infosys/abap.htm
    http://help.sap.com/saphelp_46c/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/d6/0db357494511d182b70000e829fbfe/frameset.htm
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://www.sapgenie.com/abap/example_code.htm
    http://www.geocities.com/SiliconValley/Campus/6345/abapindx.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
    http://www.sap-img.com/abap-function.htm
    http://www.sapgenie.com/abap/code/abap19.htm
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.planetsap.com/Tips_and_Tricks.htm
    http://help.sap.com/saphelp_40b/helpdata/ru/d6/0dc169494511d182b70000e829fbfe/applet.htm
    http://www.henrikfrank.dk/abapexamples/SapScript/symbols.htm
    http://www.henrikfrank.dk/abapexamples/index.html
    http://sap.ittoolbox.com/documents/document.asp?i=752
    http://members.aol.com/_ht_a/skarkada/sap/
    http://sappoint.com/abap/
    http://members.tripod.com/abap4/SAP_Functions.html
    http://members.ozemail.com.au/~anmari/sap/index.html
    http://www.planetsap.com/Userexit_List.htm
    http://www.planetsap.com/Tips_and_Tricks.htm
    http://www.kabai.com/abaps/q.htm
    http://www.planetsap.com/Userexit_List.htm
    http://help.sap.com/saphelp_bw21c/helpdata/en/c4/3a8090505211d189550000e829fbbd/frameset.htm
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/saphelp_45b/helpdata/en/65/897415dc4ad111950d0060b03c6b76/content.htm
    http://www.sap-basis-abap.com/index.htm
    http://help.sap.com/saphelp_40b/helpdata/en/fc/eb2c46358411d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/aa/aeb23789e95378e10000009b38f8cf/frameset.htm
    http://www.geocities.com/ResearchTriangle/1635/system.html
    http://www.sapdesignguild.org/resources/MiniSG/3_Managing/3_Functions_Table_Control.htm
    http://help.sap.com/saphelp_45b/helpdata/en/d1/801bdf454211d189710000e8322d00/content.htm
    http://www.sapfans.com/sapfans/repos/saprep.htm
    http://www.planetsap.com/howdo_a.htm
    http://help.sap.com/saphelp_util464/helpdata/en/69/c2516e4ba111d189750000e8322d00/content.htm
    http://www.sapgenie.com/abap/smartforms_detail.htm
    http://www.sap-img.com/abap.htm
    http://help.sap.com/saphelp_46c/helpdata/en/fc/eb2d67358411d1829f0000e829fbfe/content.htm
    http://www.geocities.com/victorav15/sapr3/abap.html
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://abap4.tripod.com/Other_Useful_Tips.html
    http://help.sap.com/saphelp_45b/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
    http://www.sap-basis-abap.com/sapmm.htm
    http://sap.ittoolbox.com/nav/t.asp?t=303&p=448&h1=303&h2=322&h3=448
    http://sapfans.com/
    http://cma.zdnet.com/book/abap/ch03/ch03.htm
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
    http://sappoint.com/abap/
    http://www.henrikfrank.dk/abapuk.html
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://www.sapgenie.com/abap/index.htm
    http://www.sap-img.com/abap.htm
    http://www.sapdevelopment.co.uk/tips/tipshome.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://sap.ittoolbox.com/nav/t.asp?t=322&p=322&h1=322
    http://sap.ittoolbox.com/nav/t.asp?t=448&p=448&h1=448
    http://www.thespot4sap.com/
    http://www.kabai.com/abaps/q.htm
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapgenie.com/abap/tips_and_tricks.htm
    http://www.sapassist.com/code/d.asp?whichpage=1&pagesize=10&i=10&a=c&o=&t=&q=&qt=
    For FAQ
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.sapgenie.com/faq/abap.htm

  • Not able select SYS.DBA_IND_COLUMNS table.

    Dear all,
    I am not able to select the records from the table SYS.DBA_IND_COLUMNS in my procedure, it shows table or view does not exists. but i am able to select the same as a separate query (not in procedure).
    Please help me out in this.
    Thanks,
    Anand.

    This is a standard oracle security functionality. You can select in a standalone query because you have been granted the privilege through a role, but roles are not active within procedures.
    You need to have the privilege (probably select any dictionary) granted directly.

Maybe you are looking for

  • How can I change my iCloud account on ipad

    Hi, I have account xxx setup on my ipad, which I now want to change to account YYY (different iCloud account). How can I do this without loosing any purchases? Cheers.

  • Approvers names are appearing as #######

    Hello SAP experts. I'm facing an issue in SRM portal. Users create  Shopping carts and the approvers names in the list is appearing as ######. The approvers name is in Greek so something is wrong with the character encoding. This is random. For some

  • Connect sql server

    hi @all what i want to do create view (as an object in my oracle database) as select * from ms_sql_server_database_table that's what i've done till now load the ms sql jdbc driver 2005 into my oracle-database i found the following code can someone he

  • Get current PDF path when filename has unicode chars

    How do i get the current PDF path if the filename has unicode characters Thanks Swapneel

  • Radiobutton in table fields.

    HI all, I am trying to put radiobutton for one of the column in the table and textview for the rest...while doing context binding for the table.But that radiobutton is not coming ...rather the default textview is showing for that column while i run t