'alter session' command generating a vast number of audit files

Oracle: 10.2.0.5
OS: HP Itanium.
We have requirements to turn on auditing to the operating system for security purposes. We have only set the init.ora parameters and have not actually enabled any sql statement tracing yet. The parameters we have set are:
audit_file_dest
audit_sys_operations=true
audit_trail =xml, extended (the xml is based on requirements).
We have a login trigger that runs 'alter session set current_schema=<>' This has been a part of the application for years. Every time someone logs in this gets set.
We are getting 1 trace file every time this is run.
Is this from the audit_sys_operations?
I ran some queries of the Audit views and I don't think we have anything turned on. This is an old legacy system so someone may have issued some commands at some point in the past. There are a lot of views and I may have missed this.
How do we disable auditing the 'alter session commands' ?
Edited by: Guess2 on Sep 17, 2012 6:46 AM

Hi,
You could try: noaudit alter session;
Regards,

Similar Messages

  • How to tell if a user is issuing 'alter session statements'

    When I run 'alter session' from sqlplus in my schema, this does not get parsed and go to v$sql or show up in v$open_cursor. I have a user that is running queries from informatica. He says he is passing alter session statements through informatica, I want to see if they actually get there. The person is not real versed in oracle and I don't know informatica.
    i cant turn on trace cause he connects and disconnects and this would run immediately, I am not in a position to turn on system level tracing, add a trigger, or turn on auditing (not allowed).
    anyway to tell from a data dictionary view or something like that if these were issued by a given session? The queries run for a few minutes, so I have a bit before his session disconnects to query the data. I can't get him to change his code to stay connected. Is there a view that shows parameter changes for a given session?
    oracle: 10.2.0.5
    4 alter session commands are:
    Alter session set sort_area_size=999999999;
    Alter session set hash_area_size=999999999;
    Alter session set db_file_multiblock_read_count = 128;
    alter session enable parallel dml;
    Edited by: Guess2 on Jul 17, 2012 12:49 PM

    i cant turn on trace cause he connects and disconnects and this would run immediately, I am not in a position to turn on system level tracing, add a trigger, or turn on auditing (not allowed). If Informatica connects to Oracle via network, capturing TCP/IP traffic and mining in it may be your last resort.
    you can get session's PDML status from
    select pdml_status from v$session;
    i cant turn on trace cause he connects and disconnects and this would run immediatelythis contradicts to your following statement
    The queries run for a few minutes, so I have a bit before his session disconnects to query the data.
    I can't get him to change his code to stay connected. Informatica should have debug. Ask him if he can go step by step.
    Edited by: user11181920 on Jul 17, 2012 5:53 PM

  • Alter session set NLS_DATE_FORMAT and to_date not working

    Hey folks,
    for the sake of simplicity let's assume i want to get the current system time from the table dual in a certain format, e.g. 'YY.MM.DD'.
    Currently the query
    select sysdate from dual;
    yields:
    07-JAN-08
    The desired output should look like this:
    08.01.07
    So, according to the manual, i tried the following:
    alter session set NLS_DATE_FORMAT = 'yy.mm.dd';
    No effect, date is still displayed as
    07-JAN-08
    Even the following query:
    select TO_DATE (sysdate, 'yy.mm.dd') from dual;
    yields
    07-JAN-08
    What am i doing wrong here?
    Additional information:
    -> DB is Oracle 9
    -> I am using the Oracle SQL Developer under Ubuntu Gutsy
    -> No, i did not forget to commit my commands....:-)
    Any ideas?

    select TO_CHAR (sysdate, 'yy.mm.dd') from dual;However the alter session command should work:
    SQL*Plus: Release 9.2.0.2.0 - Production on Mon Jan 7 14:32:26 2008
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.8.0 - Production
    SQL> alter session set NLS_DATE_FORMAT = 'yy.mm.dd';
    Session altered.
    SQL> select sysdate from dual;
    SYSDATE
    08.01.07
    SQL> Note: There is nothing to commit here. Only selects, no DML.
    Message was edited by:
    Sven W.

  • Oracle Alter Session not working in CF9

    Hello,
    I'm trying to understand differences between CF5 and CF9 when I retrieve numbers and dates from an Oracle Database.
    The code I ran on CF5 and CF9 servers :
    <cfoutput>
    <cftransaction>
    <cfquery datasource="intranet">
    alter session SET NLS_TERRITORY =  FRANCE
    </cfquery>
    <cfquery name="qry" datasource="intranet">
    select
         TO_NUMBER(12345/10) as nbr,
         sysdate as dt,
         TO_CHAR(1234.56,'L99G999D99') as cur
    from dual
    </cfquery>
    </cftransaction>
    #qry.nbr#<br>
    #qry.dt#<br>
    #qry.cur#
    </cfoutput>
    I've got those outputs :
    Result in CF5
    Result in CF9
    1234,5
    01/12/09
    ¿1.234,56
    1234.5
    2009-12-01 19:16:04.0
    ¿1.234,56
    The first two rows in CF5 display data in French format. That's not the same for CF9, the data are in American format.
    Then I changed the NLS_TERRITORY parameter
    alter session SET NLS_TERRITORY =  AMERICA
    Result in CF5
    Result in CF9
    1234.5
    01-DEC-09
    $1,234.56
    1234.5
    2009-12-01 19:20:39.0
    $1,234.56
    The two first row haven't changed in CF9, it seems that the "alter session" has no effect on number and date format in query results. Is that a bug or am I misunderstanding something ?
    Regards,
    Maxime

    Thank you for your reply.
    I tried what you've suggested on the CF9 server.
    The results are :
    NLS_TERRITORY =
    1) oracle JDBC database
    2) oracle JDBC thin client
    3) oracle JDBC-ODBC bridge
    AMERICA
    1234.5
    2009-12-02 13:24:30.0
    $1,234.56
    1234.5
    {ts '2009-12-02 00:00:00'}
    $1,234.56
    1234.5
    2009-12-02 13:24:30.0
    $1,234.56
    FRANCE
    1234.5
    2009-12-02 13:29:53.0
    ¿1.234,56
    1234.5
    {ts '2009-12-02 00:00:00'}
    ¿1.234,56
    1234.5
    2009-12-02 13:29:53.0
    ¿1.234,56
    The behavior is pretty much the same in the three differents ways to call the database. The only difference is on the date display using the Oracle JDBC thin client, which is another format from those I've already got.
    Regards,
    Maxime

  • How to add alter session to report query !!

    Hi all,
    I need to add
    alter session set "_optimizer_cost_based_transformation"=off
    before select query runs in Oracle discoverer.
    Recently I encountered with ORA 00600 bug and this is the way it can be solved.
    Before running the query, the session should be altered.
    Any ideas is appreciated..
    Thanks

    Hi,
    Your best option may be to turn the cost based transformation off using a logon trigger. It will then be turned off for all Discoverer sessions. You will need to create a package procedure that executes the alter session command. Then call this procedure either from a Discoverer logon trigger, or a database trigger that checks that the session is a Discoverer session. Or if you are using the eBS you can use the Applications initialization profile.
    However, an alternative approach may be to use a hint in the query. For example, you can set the optimizer features back to previous version that does not have this optimizer feature e.g. using:
    /*+ optimizer_features_enable('9.2.0') */
    Then put this hint in the query using a view. I am not sure that ther is a hint which will turn just this feature off.
    Rod West

  • EA2 - invalid option for ALTER SESSION when logging in to 9i DB via EA2

    When logging in to a 9i DB(9.2.0.7.0) i recieve the following error in the Logging Window:
    SEVERE     48     16     ORA-02248: invalid option for ALTER SESSION
    Edited by: Trotty on Nov 10, 2009 10:37 AM
    Does anyone else get this logging message when accessing a 9i DB
    Edited by: Trotty on Nov 10, 2009 10:37 AM

    Trotty wrote:
    When logging in to a 9i DB(9.2.0.7.0) i recieve the following error in the Logging Window:
    SEVERE     48     16     ORA-02248: invalid option for ALTER SESSION
    Edited by: Trotty on Nov 10, 2009 10:37 AM
    Does anyone else get this logging message when accessing a 9i DBI use 10g but have never seen that message even on 9i.
    See if you have any on-login triggers that could be issuing an incorrect alter session command. Also see if the error occurs as other users (if possible)
    If this was SQL*PLUS I'd also check the login.sql and glogin.sql files but I don't think sql*developer uses those.
    Edited by: riedelme on Nov 10, 2009 6:18 AM

  • Alter Session, same user

    Good night community,
    I have issued a command Alter Session to set a different NLS_DATE_FORMAT for only one session of an user but, the other sessions of the same user (yes, the application here use all the same database user) got the changes.
    Is that predictable to happen? Is there a clausule to issue Alter Session only for a specific session of that user?
    Thank you very much!
    PS: If this is not the right place to ask this, could you move it? Thank you very much!

    >
    I have issued a command Alter Session to set a different NLS_DATE_FORMAT for only one session of an user but, the other sessions of the same user (yes, the application here use all the same database user) got the changes.
    Is that predictable to happen? Is there a clausule to issue Alter Session only for a specific session of that user?
    >
    Show us the proof that you got that result. Post your 4 digit Oracle version and show us the sql*plus sessions you have created and the actual ALTER SESSION command you executed.
    ALTER SESSION has NO affect on other sessions whether those 'other' sessions are for the same user or not. A 'user' is NOT a session.

  • Dynamic number of xml files with a specified max size

    Hi all,
    I'm using a custom report to generate xml files (via a ST program and a call transformation) containing
    data belonging to is-u invoices (some are much more complex and rich of data than other ones).
    I'm asked to generate the minimun number of xml files, the only limit is their maximum size (40 MB).
    How can I dynamically understand when I need to save an xml file and generate the next one if the
    size is only readable after the transformation,as far as I know?
    Thanks a lot in advance for your ideas.
    Angelo

    My problem is that different users may be loading different files.
    As there may be many simultaneous users and the xml document nodes do not get edited in any way, I only want to have one copy of each file in memory .... hence the application scope.
    If I make the var name fixed then a user loading xml2.xml would overwrite any previous file xml1.xml or whatever.
    I could switch to session scope but that would load possibly hundreds of copies of any given file at any given time and the files are not small :-(
    Keith

  • Execute sql command "ALTER SESSION SET..."

    How can i execute command "ALTER SESSION SET NLS_DATE_FORMAT ='MM/DD/YYYY'" with JDBC
    api.
    And by default?
    Bye
    Ste

    I'm not sure that you want to do this in Java. I would imagine that the NLS_DATE_FORMAT would be set by the Oracle DBA, and shouldn't be changed by a Java app via JDBC.
    Besides, when you query the database for a date it's returned as a java.sql.Date, regardless of the settings in the database. Once you have that, you can format it according to your wishes by using java.text.DateFormat and java.text.SimpleDateFormat.
    I thought the point was that the JDBC driver took care of ensuring that you got java.sql.Date objects back from queries, regardless of the NSL_DATE_FORMAT setting in the database.

  • "alter session set sql_trace true"  in my pakage is not working

    Hi
    I have a package with some procedures..in one of my procedure which is executed in the first step i run the :
    execute immediate 'alter session set sql_trace true';
    this command is executed in debug mode and generate trace file(GOOD) but in running mode i haven't trcce file.
    what is wrong in my code ?

    http://download.oracle.com/docs/cd/E11882_01/server.112/e26088/statements_2013.htm#SQLRF00901 says parameter_name = parameter_value
    Regards
    Etbin

  • Alter session attributes in OBIEEreports

    Hi All,
    I want to know whethe I can 'alter session' before the SQL generated by OBIEE automatically?
    If yes, how should I configure it?
    Thank you in advance.
    Leon

    Hi Leon,
    I think that option a) is used for each connection and option b) for each SQL statement.
    Maybe something is available in the front-end that will enable you to execute the ALTER SESSION ahead of a specific statement... but I am not aware of that.
    If you want to use ALTER SESSION only for SQL commands on a specific set of tables, you can try to create a new physical database / business model / presentation catalog specifically for those requests? Then you can use option a) and or b)..
    Regards,
    Marco
    Edited by: m.siliakus on Feb 21, 2011 3:12 PM

  • RMAN-10006: error running SQL statement: alter session set remote_dependenc

    Backups are failing with following error
    RMAN-00554: initialization of internal recovery manager package failed
    RMAN-12001: could not open channel default
    RMAN-10008: could not create channel context
    RMAN-10002: ORACLE error: ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must be from among MANUAL, AUTO
    RMAN-10006: error running SQL statement: alter session set remote_dependencies_mode = signature
    Not able to change to signature
    SQL> alter session set remote_dependencies_mode=signature;
    ERROR:
    ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must
    be from among MANUAL, AUTO
    I dont see MANUAL or AUTO as valid value for this parameter (http://download.oracle.com/docs/cd/B10501_01/server.920/a96536/ch1175.htm#1023124) DB version is 9.2.0
    Parameter type
    String
    Syntax
    REMOTE_DEPENDENCIES_MODE = {TIMESTAMP | SIGNATURE}
    Default value
    TIMESTAMP
    Parameter class
    Dynamic: ALTER SESSION, ALTER SYSTEM
    =======================================
    I believe it could be because of following bug
    "A PRE-PATCHED ORACLE IMAGE CAN BE INSTALLED IN MEMORY "
    Refer: "https://metalink2.oracle.com/metalink/plsql/f?p=130:15:1613505143885559758::::p15_database_id,p15_docid,p15_show_header,p15_show_help,p15_black_frame,p15_font:BUG,4610411,1,1,1,helvetica"
    I appreciate your effort in fixing this issue.
    Edited by: user10610722 on Nov 25, 2008 4:37 PM

    Hi:
    It seems when you are starting RMAN it's executing some commands (one 'ALTER SESSION...'. It's seems to be a batch which has a bad value for SORT_AREA_SIZE. Find it and modify to a proper value as message shows. If you can't find start RMAN by calling directly the executable ($ORACLE_HOME/bin/rman or %ORACLE_HOME%/bin/rman.exe).

  • Execute immediate 'alter session set current_schema = ' failed in PL/SQL

    Hi
    I am trying to run
    EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = TEST ' ;
    in a pl/sql block but it is failing.Can anyone update me on this.
    CREATE OR REPLACE PROCEDURE test3
    IS
    A_COUNT NUMBER(15);
    BEGIN
    EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = TEST ' ;
    SELECT COUNT(*) INTO A_COUNT FROM (
    select id from solutions );
    END;
    /

    The user who owns the procedure needs to be granted direct select rights on table test.solutions (not via a role). Still will not help. Look what OP is trying to do. In a stored procedure owned by some user (other than TEST) OP is trying to reference user TEST owned table solution without prefixing it with owner. Something like:
    SQL> create table u1.test_tbl(x number);
    Table created.
    SQL> select * from test_tbl;
    select * from test_tbl
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> alter session set current_schema = U1;
    Session altered.
    SQL> select * from test_tbl;
    no rows selected
    SQL> However, OP tries to do it in a SP using dynamic SQL to change current schema to test. Such change will occur when SP will be executed, not when is it compiled. At compile time we are still under SP owner's schema and therefore select from solutions implies table solutions owned by SP owner, not by TEST. The only way to make SP compile and work OK is to select from solutions also dynamically:
    SQL> select sys_context('userenv','current_schema') from dual
      2  /
    SYS_CONTEXT('USERENV','CURRENT_SCHEMA')
    SCOTT
    SQL> CREATE OR REPLACE PROCEDURE test3
      2  IS
      3  A_COUNT NUMBER(15);
      4  BEGIN
      5  EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = U1' ;
      6  SELECT COUNT(*) INTO A_COUNT FROM (
      7  select x from test_tbl );
      8  END;
      9  /
    Warning: Procedure created with compilation errors.
    SQL> sho err
    Errors for PROCEDURE TEST3:
    LINE/COL ERROR
    6/1      PL/SQL: SQL Statement ignored
    7/15     PL/SQL: ORA-00942: table or view does not exist
    SQL> set serveroutput on
    SQL> CREATE OR REPLACE PROCEDURE test3
      2  IS
      3  A_COUNT NUMBER(15);
      4  c sys_refcursor;
      5  BEGIN
      6  EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = U1' ;
      7  OPEN C FOR 'SELECT COUNT(*) FROM (select x from test_tbl )';
      8  FETCH c INTO A_COUNT;
      9  dbms_output.put_line(a_count);
    10  CLOSE c;
    11  END;
    12  /
    Procedure created.
    SQL> insert into u1.test_tbl select rownum from emp;
    14 rows created.
    SQL> exec test3
    14
    PL/SQL procedure successfully completed.
    SQL> Obviously, as you noted SP owner must have directly granted select on test3.solutions.
    SY.

  • How to use 'alter session...' in apex

    Hello everyone, in my APEX program, I need to alter the parameter nls_date_language with 'alter session set nls_date_language = american'.
    I execute the statement in SQL Commands of APEX, but it doesn't seem it works. how can I change the parameter--nls_date_language in APEX?
    Any answer is appreciated.

    Hi,
    This might help
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/bldr.htm#BABGGAJE
    >
    Application Date Format
    Determines the date format to be used in the application.
    This date format is used to alter the NLS_DATE_FORMAT database session setting before showing or submitting any page in the application. This value can be a literal string containing a valid Oracle date format mask or an item reference using substitution syntax. If no value is specified, the default date format is derived from the database session at runtime.
    >
    Br,Jari

  • ALTER SESSION in sql script produces strange results

    Why would "alter session set NLS_DATE_FORMAT" interfere with the operation of a sql script?
    First, the script without the ALTER SESSION:
    SQL> !cat doit1.sql
    --alter session set NLS_DATE_FORMAT = "DD-MON-YYYY"
    set pagesize 99
    set trimspool on
    col BIRTH_MONTH for a11
    break on BIRTH_MONTH skip 1
    spo doit.txt
    prompt My Membership
    set feedback off heading off
    select 'As of ' || sysdate from dual;
    set heading on
    select count(*) from dual;
    spool offAnd its execution:
    SQL> @doit1
    My Membership
    As of 14-JAN-10
      COUNT(*)
    1All's well with the world. Now let's throw in the ALTER SESSION:
    SQL> !cat doit2.sql
    alter session set NLS_DATE_FORMAT = "DD-MON-YYYY"
    set pagesize 99
    set trimspool on
    col BIRTH_MONTH for a11
    break on BIRTH_MONTH skip 1
    spo doit.txt
    prompt My Membership
    set feedback off heading off
    select 'As of ' || sysdate from dual;
    set heading on
    select count(*) from dual;
    spool offAnd its execution
    SQL> @doit2
    set pagesize 99
    ERROR at line 2:
    ORA-00922: missing or invalid option
      COUNT(*)
    1
    not spooling currently
    SQL> Doesn't like the SET commands (I've played around with serveral, it doesn't like any of them) and ignores the opening SPOOL command
    I first noticed this with a 10.2.0.1 client (windows) connected to a 10.2.0.4 database (HP-UX). Confirmed on my laptop VM lab, 10.2.0.4 under OEL5, client and db on same VM.

    Chris Poole wrote:
    You're just missing the trailing ';' at the end of the alter session line. Add this, it all works.DOH! (in my best Homer Simpson imitation!)

Maybe you are looking for

  • Help need it

    I get an error while I sync my ipod the error is: Attempting to copy to the disk "ROB" failed. The disk could not be read from or written to. if anyone knows the solution to this please help me out thanks

  • Oracle 8.1.7 on Redhat 8

    Is there any way to do the subject (downloaded from here) ? 1. jre 1.1.8 takes 100% of CPU and do nothing (solved by jre 1.1.8.1) Now installation and link are successfull but: 2. Can not create database using dbassist: ORA-12547: TNS:Lost Contact 3.

  • Can XI Message be mapped to a flat file attachment in Mail adapter

    Hi guys, I have a requirement, where I have ECC system seding a XI message to XI. Now XI has to convert this to a flat file may be tab delimited and send this as an attachment in email using receiver mail adapter. I want to avoid BPM and make it simp

  • How to Force Client's DHCP Renew on Mobility Event?

    Hi All, I have a (single) client (it is a cisco IOS router) behind a wireless workgroup bridge (cisco1242). The client's IP address is obtained via DHCP from the wired network. Now, when roaming occurs, the Client will never have knowledge about this

  • My ipad does not turn sideways when i turne it it just stays straight

    someone help