How to trace a USER in oracle?

Hi Sir,
I have a rquirement that I need to Trace a session created through the Application. The only data I have is that I know the application will connect to a Database schema and nothing else. How is it possilbe that I can create a trace file for it.
Also is it possilble, that i can trace complete user. how to find all the trace as it create number of process inturn number of trace, how do I find it and combine. I read the documentation but can't understand it clearly?
Any help will be great.

sanora600 wrote:
Aman, thanks for replying. This is the problem, they have not implemented dbms_application_info.
That is the reason I want to know how to trace user(all session of a schema) and combine all the session generated trace(something like trcsess) and then generate tkprof. I am on Oracle 10g.Well, first off, users connect to databases, they don't connect to schemas. And as a follow on, users have sessions, schemas don't.
That said, you might investigate a logon trigger that initiates a 1046 trace. Something like this:
-- create a logon trigger for capturing extended trace data
-- NOTE: must be run as SYS
-- NOTE: Be sure to change both occurances of the target username
-- ('user = xxx' and 'TRACEFILE_IDENTIFIER=') to the
-- correct value for the session you want to trace.
create or replace trigger logon_trigger
after logon on database
begin
if (user = 'SCOTT' ) then
execute immediate 'ALTER SESSION SET TRACEFILE_IDENTIFIER=''SCOTT_APP''';
execute immediate 'alter session set timed_statistics=true';
execute immediate 'ALTER SESSION SET EVENTS ''10046 TRACE NAME CONTEXT FOREVER, LEVEL 12''';
end if;
exception
when others then
null;
end;
end;
Of course, you can play around with the 'if' condition, and delete or disable the trigger when it is no longer needed. The resulting trace file can be run through tkprof.
Edited by: EdStevens on Dec 19, 2008 9:03 AM

Similar Messages

  • How to trace which user shutdown oracle database in unix OS?

    our organization is having 10 DBA with sysdba priviladge. We are using UNIX operating system. At morning say for example if some one (SYSDBA user) shutdown the oracle database how other sysdba user trace the user who shutdown the database? the information i need is terminal from where oracle got shutdown and the username? Please help...

    Hello,
    You are right Sybrand, SYSDBA connections are always audited.
    My answer was about enabling auditing to any connections, which may give informations about who access to the Database in general. And, this is true, it was not the scope of the OP question.
    However, so as to enlarge audit of SYS/SYSDBA/SYSOPER operations, setting the parameter audit_sys_operations=TRUE may be interesting:
    http://download.oracle.com/docs/cd/E11882_01/network.112/e16543/auditing.htm#DBSEG0611
    To the OP:
    Where the audit tracefile get genareted for sys user?You may execute this:
    show parameter audit_file_destThank again Sybrand for correcting me.
    Best regards,
    Jean-Valentin

  • How to create a user in oracle.

    how to create a user in oracle level.i know how to create from front end.can any body suggest.how to create oracle user from backend.
    Thanks,
    Dave

    Hi,
    We can use the 'hr_user_acct_internal.create_fnd_user' API to create the users. The sample code is as follows:
    BEGIN
    apps.hr_user_acct_internal.create_fnd_user
    (p_user_name => 'XXX',
    p_password => 'XXX',
    p_employee_id => 1234(This is the person id from per_all_people_f),
    p_user_id => x_user_id,
    p_user_start_date => SYSDATE,
    p_email_address => 'XXX',
    p_description => 'XXX',
    p_password_date => NULL
    COMMIT;
    END;
    and to add the responsibility to the user, we can use the following code.
    BEGIN
    fnd_user_pkg.addresp
    (username => 'XXX',
    resp_app => user_res_rec.application_short_name,
    resp_key => user_res_rec.responsibility_key,
    security_group => 'STANDARD',
    description => 'DESCRIPTION',
    start_date => SYSDATE,
    end_date => NULL
    END
    Best Regards
    Arun Kumar S.R
    Apps Associates

  • How to trace a user System or I.P address

    Hi Experts,
    Had to ask how to trace a User's System or I.p address whom  has performed changes over a BEX Query.
    I have a situation where a user has done some changes in report it displays in last changed by user name:-****and last change date  but i would like to trace the system from which these changes have been applied over a the bex Query.
    Thanks in advance
    Aman

    Hi Aman,
    Please have a quick look at the note 368048 which explains why the terminal ids are blank in some cases and gives the solutions where applicable.
    If you want to see the current workstation with IP Addresses you can have a look at table USR41 which contains this information but this is not contained within the security audit log.
    539404     FAQ: Answers to questions about the Security Audit
    39418      Logging user actions
    As for your query, about viewing user's IP, you might need to get user's Terminal ID from STAT/AL08 and manually use tracert in MS-DOS command to see particular user's IP. EG:tracert myl5005500.
    Tracing route to <hostname>[10.10.10.10]
    over a maximum of 30 hops:
      1    <1 ms    <1 ms    <1 ms  <FQDN> [10.10.10.10]
    Trace complete.
    Note : I personally tested from logging in via query designer but my connections were not displayed in USR41. Once I connect to backend system my terminal IP could be traced.
    Regards,
    Naveen.

  • How to trace an user access

    Even if I've got no DBA permission (for example I don't see the v$session table), have I got any way to trace the users accessing the DB? How can I do? I was told about trace but can someone tell me more? I'd like to know the user accessing the DB and the operation that he's launching. Is it possible?
    Thanks!

    Anything is possible if you have the correct privileges. But then you probably don't have those privileges, and probably for a reason, as you probably also don't have the DBA role for a reason.
    If you are to enable trace in a different session, you would need execute access on an Oracle provided package, which differs by version, and of course you assume Oracle never changes, and there is only one version out there: yours.
    For a DBA it would be the easiest to grant you the select_catalog_role and the execute_catalog_role.
    But then again one would ask why you think you should spy on him, and why you don't cooperate with him and/or try to convince him.
    Sybrand Bakker
    Senior Oracle DBA

  • How to trace other user's session?

    Dear Experts,
    I would like to trace other user's session, I am on Oracle 10g R2 (10.2.0.4) on a Windows box. I did search on google and found tons of articles explaining about tracing techniques. But unfortunately, trace file is not getting generated in my case. Below are the steps I am following:
    SQL> conn /as sysdba
    Connected.
    SQL>
    SQL> select sid, serial# from v$session where username = 'TEST';
           SID    SERIAL#
            38         17
    SQL> show parameter user_d
    NAME                                 TYPE        VALUE
    user_dump_dest                       string      C:\DB10G\UDUMP
    SQL> show parameter timed_s
    NAME                                 TYPE        VALUE
    timed_statistics                     boolean     TRUE
    SQL>Connect a new SQL*Plus session as TEST and then
    SQL> show user
    USER is "SYS"
    SQL>
    SQL> select sid, serial# from v$session where username = 'TEST';
           SID    SERIAL#
            19      24465
            38         17
    SQL> exec dbms_system.set_ev(38,17, 10046, 12, '');
    PL/SQL procedure successfully completed.
    SQL> exec dbms_system.set_ev(38,17, 10046, 0, '');
    PL/SQL procedure successfully completed.
    SQL> grant execute on dbms_system to test;
    Grant succeeded.
    SQL> exec dbms_system.set_ev(38,17, 10046, 12, '');
    PL/SQL procedure successfully completed.in the new session (TEST):
    SQL> select * from tab;
    TNAME                          TABTYPE  CLUSTERID
    T                              TABLE
    T3                             TABLE
    T1                             TABLE
    T2                             TABLE
    MYEMP                          TABLE
    SQL>Yet, no trace file is generated in "C:\db10g\udump" folder.
    C:\db10g\udump>dir
    Volume in drive C is SYSTEM
    Volume Serial Number is AC21-0462
    Directory of C:\db10g\udump
    12/15/2008  12:36 PM    <DIR>          .
    12/15/2008  12:36 PM    <DIR>          ..
                   0 File(s)              0 bytes
                   2 Dir(s)   9,891,508,224 bytes free
    C:\db10g\udump>Your help/advice in this regard will be very helpful.
    Regards

    You must be using shared server.
    You can verify this by referring to the SERVER column of v$session.
    In shared server several servers will execute your code, so that's why you don't find a trace file.
    The method described in this article should work in your case also:
    http://technology.amis.nl/blog/1794/how-to-trace-a-java-application-through-a-connection-pool-using-dbms_monitor-6
    Hth
    Sybrand Bakker
    Senior Oracle DBA

  • How to trace connect user ?

    Hi,
    How can I trace all user connection in a file ?
    I would like to know who connected (user oracle) and when.
    Thanks for your help,
    gnom92.

    You can see the figure how many connection made since the db starts up quering v$sysstat;
    select name,value from v$sysstat where name like '%logon%';
    NAME VALUE
    logons cumulative 132671
    logons current 175
    Generally, Oracle doesn't keep this information. You have to enable audit to keep this info.

  • How to trace a user session?

    Hi DBA,
    OS: Linux 5
    DB Ver: 10.2.0.1
    can any one tell me how to trace a session of user in oracle 10g?
    Regards,
    BK

    user12942781 wrote:
    Hi DBA,
    OS: Linux 5
    DB Ver: 10.2.0.1
    can any one tell me how to trace a session of user in oracle 10g?
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/sqltrace.htm#CHDDGCCB
    HTH
    Aman....

  • How to Restrict the users in oracle applications

    Hi,
    I want to Restrict the users in oracle applications without using database
    can any one please expalin me how to resttrict the users using middletier
    Thanks
    Gita

    HI srini ,
    my application version 12.0.4 and database is 10.2.0.4
    and i want to restrict the No of users
    exp i have have 500 users and i want restrict to 100 only
    how can i do that please explain
    Thanks,
    Sudheer

  • How to Import Database user in oracle which have character set AL32UTF8?

    Hello All,
    I want export one database user which have character set in WE8MSWIN1252 and I want to Import that Database user in oracle which have character set AL32UTF8 without changing character set.
    is there any argument in import command??
    thanks

    There's no problem, export and import will take care of character set conversions, the only problem is AL32UTF8 is a variable size character set, if 'ñ' uses 1 byte in WE8MSWIN1252, in AL32UTF8 it will use 2 bytes, so it's recommended to pre-create the tables with "char" instead of "byte": create table xxx ( col1 varchar2(100 char), ... )
    Enrique

  • How to trace an application in Oracle 10g

    Hi,
    I want to trace a complete application in Oracle 10g end-to-end.
    Here is the scenario,
    The are two systems:
    System A: Oracle 10g server
    System B: Windows server
    The application runs on system B.
    How do I trace the complete application in oracle 10g?
    I read about the trcsess tool but will like to know if there is a way to collate all *.trc produced by the application.
    Thanks in advance!
    -Thanks
    Karthik

    Tracing the Oracle transactions is easy, but you need to decide what level of trace you want and identify the database sessions to trace.
    Tracing can generate huge amounts of logs, so think carefully if you really need to do this.
    The tracing will only capture the database transactions. It won't track what happens in the application (e.g mouse clicks etc)
    Options to enable tracing :-
    -- ALTER SESSION
    alter session set tracefile_identifier = 'robert_trace'; # so that the trace files from this session are easily identified
    alter session set events '10046 trace name context forever, level 8';
    -- ALTER SYSTEM
    alter system set sql_trace=true;
    -- DBMS_SESSION
    exec dbms_session.set_sql_trace(sql_trace => TRUE);
    -- DBMS_SUPPORT
    exec dbms_support.start_trace(waits=>TRUE, binds=>FALSE);
    -- DBMS_SYSTEM
    exec sys.dbms_system.set_ev(72,21237,10046,12,'');
    -- ORADEBUG
    select username, spid from v$process;
    ORADEBUG SETOSPID 21237
    ORADEBUG EVENT 10046 TRACE NAME CONTEXT FOREVER, LEVEL 12
    -- DBMS_MONITOR
    exec dbms_monitor.session_trace_enable(session_id=>75, serial_num=>21237);

  • How to trace drop command in oracle database.

    Dear All,
    As a DBA how can we trace the drop cammand in database to know who droped , deleted the tables or deleted data from tables or droped directory from dba_directories.
    Thanks,

    Thanks Kamran,
    see for me audit file is not creating at OS level.
    SQL> CONN audit_test/password
    Connected.
    SQL>
    SQL> CREATE TABLE test_tab (id NUMBER 3 );
    Table created.
    SQL>
    SQL> INSERT INTO test_tab (id) VALUES (1);
    1 row created.
    SQL> UPDATE test_tab SET id = id;
    1 row updated.
    SQL> SELECT * FROM test_tab;
    ID
    1
    SQL> DELETE FROM test_tab;
    1 row deleted.
    SQL> DROP TABLE test_tab;
    Table dropped.
    SQL> conn /as sysdba
    Connected.
    SQL> show parameter audit
    NAME TYPE VALUE
    audit_file_dest string C:\ORACLE\PRODUCT\10.2.0\ADMIN
    \TEST1\ADUMP
    audit_sys_operations boolean TRUE
    audit_trail string OS
    SQL> host
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\sherkhan>cd c:\oracle\product\10.2.0\admin\test1\adump
    C:\oracle\product\10.2.0\admin\test1\adump>dir
    Volume in drive C has no label.
    Volume Serial Number is F855-F548
    Directory of C:\oracle\product\10.2.0\admin\test1\adump
    05/19/2011 09:07 AM <DIR> .
    05/19/2011 09:07 AM <DIR> ..
    0 File(s) 0 bytes
    2 Dir(s) 1,414,656,000 bytes free
    Thankss

  • How to trace a user who entered/dropped a table in a shared DataBase

    Hai, I have a doubt plz help me
    when working in a shared DataBase environment, different users will create or drop
    tables from the DataBase. Is it possible to trace who has created/altered a particular table in the DB. If yes plz tell me the procedure.
    Thanks in advance.
    SrihariKrishna

    Maybe this link provides some help?
    http://asktom.oracle.com/pls/ask/f?p=4950:8:5395923770553724381::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:6399608034075
    C.

  • How to create Database Users in Oracle enterprise?

    Help, I am new in using oracle database. All I need to do is to connect PHP to Oracle. But it keeps saying this Error
    *Warning: oci_connect() [function.oci-connect]: ORA-28000: the account is locked in*
    Really need some help.

    Welcome to the forum. Please next time remember that your friends are "search option", google, thaiti... and of course oracle documentation. All ORA-XXXX are documented so please next time, search for them.
    run:
    select account_status, username from dba_users;
    If the status is locked:
    alter user XXXXXX account unlock;
    If also is expired:
    ALTER USER xxxxx IDENTIFIED BY password;
    HTH
    Edited by: Fran on 30-may-2012 2:16

  • How to trace communication users in system & build a role

    Hi all
    I have a requirement in my compnay to create a role for communication users currently assigned to SAP_ALL
    we have 20 communication id's & turning on trace is not feasible option due to the impact on system performance.
    Plz let me know what is the approach i need to have inorder to find neccessary tcodes & objects into my role.
    thank you in advance.
    Best Regards
    NaveenMurthy_

    What I meant is that good "housekeeping" and securing of these sensitive RFC connections is hard to do properly if you are "far away" from them.
    Go figure why SAP delivers many of their connection wizards with SAP_ALL... they don't know either what the customer will be using and which data will be transfered and when you might need to temporarily debug the connection or when someone will try to use an existing connection for a new application without thinking about developing a new role to go with it, or which checks an SP might introduce which then pop up as a problem in a remote program or system, etc.
    Really, it is not an easy thing to do properly (both technically and procedurally) and the further you are away from it, the more hassle it will be.
    No inflamatory hype intended toward any specific type or location of "offshoring".
    Cheers,
    Julius

Maybe you are looking for

  • Query Builder in Oracle Application Express

    I am unable to get columns to show after I submitt an object and click "columns" to add for a query. I also cannot get any query at all. Any help out there? Feel free to direct me to correct forum if necessary.

  • Converting iPhone Movies to a Windows Viewable Format?

    I have a couple of videos that I recorded on my iPhone 4S (iOS 6.0.1) that I would like to share with family members who are Windows users (7 or XP).  The iPhone created them in ".mov" format.  What is the best way to convert these to a format that w

  • How to create an link to an BSP-Extension in documentation

    Hello everybody, I've got an perhaps easy question. I want to create an link in my documentation to the documentation of an BSP-Extension (for example <htmlb:inputField>) Is here someone who can tell me the best way to do this? If I use the function

  • Accordion with summary

    Hi, i would like to design an accordion component with WPF, but the problem is that the collapsed accordion state should contain a summary of data. Can any one help?

  • NFS4ERR_EXPIRED repeatedly creating performance issues

    I am running several X4500s and serve the filesystems over NFS4. I have noticed that frequently, though without any traceable reason that clients struggle to maintain the mounts Mar 12 13:32:09 rosalind nfs: [ID 581112 kern.info] NOTICE: [NFS4][Serve