How to find session of process executed

Hello
I want to find out particular session from where process is running. My procedure is running from java application. I want to find out which session has generated/called process. i.e If user U1 and U2 has running process from screen, then in process logs i m not able to idenitfy which session has geneated what logs.
My requirement is i want to find out logs with user or session information. This is required to find out concurrency issues of process.
I have tried with v$session, however from that table i m not able to find out particular session. Please help.
Thanks in advance

In a 3 tier architecture the database tier sees the application tier as the client - not the presentation layer user. The data tier has no idea what is beyond the application tier.
If you want the data tier to know who/what the presentation tier client is, the application tier has to pass that data to the data tier.
One method in Oracle is for the application tier to use the [SET_CLIENT_INFO|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_appinf.htm#CHEJCFGG] call of the DBMS_APPLICATION_INFO PL/SQL package.
Another method is to use a CONTEXT to set name-space variables in that Oracle session equal to end-user details.

Similar Messages

  • How to find session information in sql plus

    Can someone please tell me how to find session information in sql plus? I specifically want to know my privileges for the current session. Thanks in advance.

    SELECT * FROM session_privs;
    SELECT * FROM session_roles;

  • How to find out all SQLs executed by a procedure

    I need to find out all SQLs executed by a procedure. I can trace and check but in my case the issue happened 4 hours back and i know what procedure was causing it. There are multiple dynamic queries fired from this procedure. I need to track down all SQLs fired by this procedure constructed dynamically during the time issue was happening.
    I have the sql_id of the statement which was executing the procedure. How do I track down all "child" SQLs using this sql_id?
    Will appreciate any pointers.
    -ravi

    Thanks for your suggestion and looking into this.
    We already have that functionality built in. Version is 10.2.0.3...But the issue is the proc is called thousands of time in a day and we can not keep the tracking of sqls and parameters passed on all the time. When the issue happened we were not tracking. The bind variables are not captured as the SQL is constructed within the proc by looking up the values dynamically from secondary tables dynamically based on the parameters passed to the procedure. Now the SQLs which are generated from the proc will have the bind variables captured as they will come as predicates and will have no clob types (condition for the binds to be captured).
    I need a query to track down all "child" SQLs by using the sql_id of the parent process which is the procedure's sql_id.

  • How to find out the process chain

    Hi folks
    Hope every one is doing good..!
    in sm37 my job is running (ABAP program) which is in process chain, but i have to find out the process chain name..!
    Could any one help me on this..!

    hi,
      in SM37 select the job status as active and execute it, in the next screen you  will find only active jobs select your job (ABAP Program) click on step - > in th next screen put the cursor on the job -> select Goto option in menu bar click on variant it gives you the field names and desc like chain name, variant etc information.
    Regards
    Sankar

  • How to find smartform for process order

    Hi Experts,
    I have a scenario where in i have to find the name of the smartform which is being used for the T'code COR2 (process order),
    there is no output type assigned for it.
    thanks,
    venki...

    hi Venki.
    the method of finding Manual/Standard smartform against transaction.
    If ABAPER created the smartform then you simple find relevant smartform via
    Execute Tcode --> System --> Status --> Double click on Program
    you can search with "formname " from this program.
    If you want to search smartform against standard tcode then you have to follow above method but you will check the smartform one-by-one and find required smartform.
    or
    you just copy the program and put into SE80 and there  you can also find with the word of "smartform"
    while you said about the smartform against COR2. this tx has not smartform while you can call smartform via SAP BADI.
    Regards,

  • WebADI: How to find out which integrator executed the upload PL/SQL program

    Hi,
    I understand that we can create a integrator to upload data to EBS and execute a PL/SQL program.
    Is there any way to find out which INTEGRATOR executed this PL/SQL program?
    Thanks.
    Regards

    Alternatively:
    select name, plsql_debug from sys.all_plsql_object_settings

  • How to find out what process touched a file

    I am currently running Leopard 10.5.7 on a MacBook. Some of my system files' permissions keep getting screwed up. It happens randomly, and when it does I have to repair permission and reboot the computer to fix it. I am trying to isolate the problem. Is there a way to find out what processes or applications touched a certain file? thanks.

    Tony:
    Did you try repairing your keychain?
    Look in your 'Utilities' folder for the 'Keychain Access' application.
    Run it and use the 'Keychain Access/Keychain First Aid' menu...follow the prompts. After repairs, restart and see if the situation improves.
    If you are determining permission repair status on a repeated basis by simply doing a repair and reacting to the immediate report there, you may be chasing ghosts.
    If you are encountering legitimate issues when running various apps, you may need to check the basics. If there are other users on the machine or you have moved standard applications to custom locations you may have to simplify your overall machine's configuration and go from there.
    Good luck in any case.

  • How to find session

    Hi;
    I have 10.2.0.1 on sun. I am using toad. while i try to check session(Database>>Monitor>> Session Browswer) i see only my session is active, i even cant see in locks tab any session.
    While i am using prstat comman i see one oracle user (X) running and its using cpu. I use this sql to find who and what happening
    select s.sid,s.serial#,s.username,s.osuser,p.spid,p.terminal,s.program from v$session s ,v$process p where paddr=addr and spid="UNIX_PID_NO"
    it returns nothing to me
    How i can find this oracle user doing what?and why i cant see his session in toad?
    Any idea
    Thanks alot

    Hi;
    Sorry for lately response,
    Sirini;
    I follow this and create user for toad and connect toad wiht this user and used toad for monitor session,so i guess i have all privilages for see session
    sqlplus "/as sysdba"
    create role xxx_role_dba ;
    grant dba to xxx_role_dba ;
    grant xxx_role_dba to user1 identified by user1;
    Should i need any other grant for user1?
    Sb;
    My top command return me (oracle is Oracle_home owner,zzzz is database user)
    PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
    550 oracle 9688K 5400K sleep 1 0 0:00:00 0.0% sshd/1
    22929 zzzz 91M 88M sleep 56 0 0:00:22 0.0% ZZZ/collector/29
    ps -ef| grep zzzz returns me
    oracle 12892 1 0 Oct 12 ? 0:12 ora_qmnc_zzzz
    oracle 14316 1 0 Oct 12 ? 0:07 ora_q001_zzzz
    oracle 12856 1 0 Oct 12 ? 3:12 ora_mmon_zzzz
    oracle 12850 1 0 Oct 12 ? 1:13 ora_smon_zzzz
    oracle 12842 1 0 Oct 12 ? 2:31 ora_dbw0_zzzz
    oracle 12846 1 0 Oct 12 ? 3:01 ora_lgwr_zzzz
    oracle 12852 1 0 Oct 12 ? 0:01 ora_reco_zzzz
    oracle 12838 1 0 Oct 12 ? 1:15 ora_psp0_zzzz
    oracle 12840 1 0 Oct 12 ? 0:42 ora_mman_zzzz
    oracle 12836 1 0 Oct 12 ? 9:02 ora_pmon_zzzz
    oracle 12848 1 0 Oct 12 ? 8:30 ora_ckpt_zzzz
    oracle 13772 1 0 Oct 12 ? 0:01 ora_q000_zzzz
    oracle 22935 1 0 07:23:23 ? 0:00 oraclezzzz (LOCAL=NO)
    if i use yoru query its gives me result(SID etc..) but if i use in toad .. From menu >> Database >>monitor>> session browser this SID which return me by your query seems INACTIVE but it still there in top commend if i retype TOP
    Any idea?

  • How to find all the sql executed in the database

    Hi
    We want to be able to collect all the sql statements executed in the database and be able to dump them in a file or a table. Can anyone tell me how we can get that done?
    Regards,

    if you are using oracle 10g, you can use one of the
    option of datapump tool to do thisthat's new to me, can you show us how ?
    For OP, you can check v$sqlarea view to find out all the sql statement still in shared_pool, however, there's no guarantee you will have all sql executed since database started.
    Like other poster mentioned, enable auditing if you want to collect that information.

  • How to find a javaw process started by JWS?

    I am executing a JWS process from my java application (parent application) using Runtime.getRuntime().exec() . JWS downloads a java application (child application) from Tomcat and runs the application on local machine. I need to find the process object of the child application in my parent application. The reason for observing the child application is to show status of all the java applications started by parent app in a frame. Parent application can start various java applications via JWS. The code looks below
    Process proc = null;
    proc = Runtime.getRuntime().exec("javaws http://myMachine:7003/apps/test.jnlp");
    The Process object in above snippet is of javaws process not of the child application started via JWS.
    Is there a mechanism by which I can get handle to the childs process?

    We tried using jps on windows to get the process id using flag passed as argument. However, this also doesnot helps because javaws and javaw both have the same flag displayed, which means we cannot distinguish between both the processes. To explain more
    The code snippet looked like as:
    proc = Runtime.getRuntime().exec("javaws http://localhost:7003/apps/test.jnlp?Dpidflag=someValue");
    On running jps as soon as above line executed gave the result
    1420 com.sun.javaws.Main http://localhost:7003/apps/test.jnlp?Dpidflag=someValue
    The same result kept on popping for sometime, but after that it gave the result
    2448 com.sun.javaws.Main http://localhost:7003/apps/test.jnlp?Dpidflag=someValue
    Uhhh..A new process id.
    Some investigation revealed that the first process id is of javaws process which gets killed in a few seconds. The second process id is of javaw process. Now we can guess that waiting for 10-20 seconds might give us correct process id but not for sure.

  • How to find out Orphan Process

    Hi
    We are using Windows clients and connect to Oracle Database Server. For some reason if the Client machine is rebooted when an application is running, The Process still shown in the V$Session and it take hours to get released from the V$Session.
    Is there any sql to find out such Orphan Process?
    Thanks in advance
    S Muralidharan
    Procon Systems Pvt. Ltd.

    http://download-west.oracle.com/docs/cd/B10501_01/network.920/a96581/sqlnet.htm#437587
    Read the limitations and side effects before implementing.

  • How to find session is timed out?

    Hi All,
    How can i find that session is timed out? I want to farword the request to error page if session is timed out. Is there any way other than listener concept and putting some var in session & if i get null while retrieving then session is not valid.
    BTW, can i use request.isRequestedSessionIdValid() method?
    Thanks in advannce.
    Prashant

    if(session.getAttribute("someSessionAttribute") != null)
    //Session still there;
    else
    //Session timed out!
    Regards,
    tuniki
    [email protected]

  • How are VISA sessions managed by executables?

    I have noticed that VISA sessions opened in the development environment (Labview version 6.0.2) do not show up in the VISA I/O reference control of compiled executables and visa versa. I assume that each EXE has its own memory space for open VISA sessions. Is it possible to get separate EXE's and the development environment to use the same VISA memory space so that all applications and uncompiled VI's show the same open VISA sessions?

    This answer, while correct, doesn't address the issue of some VISA classes and how Labview addresses open VISA sessions. It is quite correct concerning the listing of available resources, that is not the nature of my problem. The heart of the matter is the Open VISA sessions and how they are returned by the "Open VISA sessions.vi" vi in the vi.lib utilities. Also, the VISA reference control does, as you say, display currently available resources (for some classes), but it also displays currently open sessions below a dividing line for those resources not usually displayed.
    The best example of this is for the TCP/IP class. Resources of this class are not displayed unless a session for them has been opened.
    I have written and compiled an executable tha
    t opens a VISA session for a TCP/IP resource. After opening it, the session is displayed in the executable's VISA resource control below a dividing line that separates it from the available serial and GPIB resources. If, however, I have an uncompiled VI with a VISA control open in the development environment at the same time, the open session is not displayed in that VI's resource control. If I run the compiled executable as an uncompiled VI in the development environment along with other VI's containing VISA resource controls, the open TCP/IP session is displayed in all VI's. The same holds true for the "Open VI sessions.vi". Sessions opened by compiled VI's are not returned by this subVI when it is run from outside the executable.
    As I stated before, it appears the executable creates its own separate memory space for listing open VISA sessions.
    I would like to create a small executable that logs in to TCP/IP resources and makes those sessions available to other VI's that ar
    e either uncompiled and running in the devel environment, or are running as separate executables.
    Thanks for your comments
    Steve

  • How to find out the process count for a database during a particular window

    Hi Team,
    I want to find out the maximum process count reached for a database for an interval. Say between 1:00 to 2:00 AM IST. Please help
    Database version:11.2.0.2
    OS:AIX 6.1

    Check DBA_HIST_RESOURCE_LIMIT. Your information will be there.
    Simialr information is available in DBA_HIST_SYSSTAT.
    Look for stat name logons cumulative/logons current - Total number of logons since the instance started/Total number of current logons
    You can joing dba_hist_snapshot with snap_id and give begin_interval_time and end_interval_time to know historic process utilization.
    Regards,
    Sreejith

  • How to find the Parent process in workflow

    Hi all,
    I have a .wft file with me.
    It contains atleast 8 processess.
    I need to understand the flow of this workflow.
    How do i getto know the flow?
    How do I getto know the parent process?
    I am sure if i know the parent process then i can figure out the flow as well.
    Hope someone can help me in thisproblem.
    Thanks in anticipation.
    regards.

    Hello,
    You can open the .wft file using the Workflow builder and see visually how the processes are designed. You can also see which processes are used as sub processes. These will be your children flows.
    Cheers,
    Raja

Maybe you are looking for