Finding the Unix PID of a sqlplus connection by the user

Hi,
I want to find at the OS level the process id when a user connects from his machine via sqlplus, is there a way I can do it? - I read that it can be got by combining v$session with v$process, but I still don't know the exact query.
Thanks
NIrav

The query is not returning any rows, because in the v$process table there is only one user named oracle (though I connected with user named NIS2)
QL> select count(*) from v$session where username='NIS2';
COUNT(*)
2
SQL> select distinct username from v$process;
USERNAME
oracle
Can u pl. suggest..
Thanks
Nirav

Similar Messages

  • How to find the User who changed the connection settings

    Hi Gurus,
    I am basically a BW guy but i am looking at your precious Guidance in this issue.
    We have a situation in our BW production system. The job loads are working fine till now but seems like someone has meddled with RFC connection with R/3 prod.
    The connection between R/3 and BW is broken. I would like to know if there is any way to find the User or some Log to find who might have medelled with the RFC's .
    Help is greatly appreciated.
    Regards
    satish M

    Hello Satish,
    Which release are you on?
    Option 1: Take a look in SM59 selecting the destination and there is a "last changed" information displayed.
    Option 2: the table for these connections are often not logged for table change logging, but if they are... then try transaction SCU3 on the backend tables (table RFCDES is a good start).
    (search for rec/client and recclient etc as search terms).
    Option 3: Why would someone change a connection? Try to analyze what happened during the time period after the change, or even immediately before the change (audit logs, system events, server statistics etc). A simple check would be via SM20 to see who started SM59 immediately prior to this. A more complex check would be analyzing the RFC profiles in ST03N.
    Option 4: On the R/3 side, you might be able to find the same auditable information as well (perhaps even the IP address of the caller?) Tip: The person might have created a dump... => transaction ST22.
    Option 5: There are some other additional logging, tracing and control possibilities at a deeper technical level, if used or active at that point in time.
    Cheers,
    Julius

  • To find the user processes that are connected to a database currently ??

    Hi,
    I wish to find the user processes that are connected to a database currently.
    How to find this ?
    any specific table/view for this ??
    Thanks.

    Hi..
    You can use
    SELECT NVL(s.username, '(oracle)') AS username,
    s.osuser,
    s.sid,
    s.serial#,
    p.spid,
    s.status,
    s.module,
    s.machine,
    s.program,
    TO_CHAR(s.logon_Time,'DD-MON-YYYY HH24:MI:SS') AS logon_time
    FROM v$session s,
    v$process p
    WHERE s.paddr = p.addr
    ORDER BY s.username, s.osuser;
    HTH
    Anand

  • How to find the users of teamviewer using oracle database?

    Friends,
    DB: 9iR2
    OS: RHEL AS 3
    Client pc: win xp
    We have 3 branches. One of our user accessed our application from the other branch using teamviewer.
    is it possible to find the user from the database side?
    i mean from the v$session or from any other table.
    thanks

    Hello,
    you can use folloiwng script to see the OS user, database user and the programme they are using to connect to database.
    SET TRIMSPOOL ON TRIMOUT ON ECHO OFF VERIFY OFF HEAD OFF FEEDBACK ON LIN 150 PAGES 10000
    set linesize 150
    CLEAR BREAKS COMPUTES
    COL type_grp NOPRINT
    COL logon_time NOPRINT
    COL logontime FOR A14
    COL osuser FOR A21
    COL username FOR A28
    COL lastcall FOR A14
    COL program FOR A50
    --COL program   FOR A&plen
    BREAK ON type_grp SKIP 1
    --PROMPT
    PROMPT **************************************************************** SESSIONS INFORMATION ****************************************************************
    PROMPT
    PROMPT |------- O/S -------|--------- ORACLE ----------| Logon | Last Call | |
    PROMPT |Username | Pid |Username | Pid | 'SID,Ser#'| DateTime | DateTime | TYPE | PROGRAM
    PROMPT |_________|_________|_________|_____|___________|______________|______________|__________|____________________________________________________________
    SELECT ' '||rpad(nvl(osuser,p.username), 9) ||lpad(nvl(s.process,p.spid), 10) osuser,
    rpad(nvl(s.username,' '),9) ||lpad(decode(s.sid,'','',p.spid), 6) ||lpad(decode(s.sid,'','',''''||s.sid||','||s.serial#||''''),12) username,
    to_char(logon_time,'mm/dd hh24:mi:ss') logontime,
    to_char(sysdate - (s.LAST_CALL_ET / 86400),'mm/dd hh24:mi:ss') lastcall,
    s.type,
    nvl(s.program, p.program) program,
    s.type type_grp,
    logon_time
    FROM v$session s, v$process p
    WHERE spid is not null
    AND s.paddr (+) = p.addr and s.username not in('SYS','SYSTEM','SYSMAN','DBSNMP')
    ORDER BY s.type, logon_time, s.sid;
    set head on;
    Regards,
    Anil Malkai

  • Find the Users who are Currently logged in

    Hi SDNers,
    I have Admin rights. Is there any way to find the Users who are Currently logged in?
    Please suggest.
    Thanks & Regards,
    Priti Rani Patnaik

    Hi Priti,
    Check the Connections table under Admin node which shows the users who are currently logged in along with the application users are accessing.
    Regards,
    Jitesh Talreja

  • How to find the user who has changed a field in a table

    Hello
        Someone has changed a field  cost center in my table so i need to find the user who hav changed it.Can anyone tel me how to find it.
    Regards

    HI ,
    Create a Z test program using the particular table and filed .
    Now goto SE38 and execute the program " RSDEPEND "
    give the ur test program and then execute . u will get the list of the last  change of ur program
    ( table and fields used inthis program)
    Another way :
    for data element :
    refer table 
      DD04L and get the user name
    for domain
    DD01L
    Edited by: shambhu sharan pandey on Nov 13, 2009 5:49 AM

  • How to find the user who approved the workitem.

    Hi experts,
    I have created a parking/posting workflow.
    When the user Approves, parked document is posted and BKPF table is updated with WF-BATCH as user name.
    Now I need to find the actual user who approved the workitem for posting.
    My plan is:
    1. Find the workitem id using the BOR, company code, document no, year, task no.
    2. Find the user who processed the above obtained worktem id.
    Please let me know the tables for the above points 1 and 2.
    Or let me know if there is any other way to find the actual user.
    Regards,
    Karthik

    Hi,
    To get the workitem ID with respect to a specific business object instance make use of the FM SAP_WAPI_WORKITEMS_TO_OBJECT
    To know who processed the determined workitem either you can make use of the FM SAP_WAPI_GET_WORKITEM_DETAIL or directly read the table SWWWIHEAD and you can find the actual agent WI_AAGENT this is the field which says who has executed the workitem.
    Regards
    Pavan

  • How to find the user-exit for transaction fpp2

    Hi experts,
    could you help me how can I find the user-exit for transaction fpp2. I tried to after the package, but I did not find it.

    Hi,
    Use the following program to find user exits of specified code.
    *& Tables
    TABLES : tstc,     "SAP® Transaction Codes
             tadir,    "Directory of Repository Objects
             modsapt,  "SAP® Enhancements - Short Texts
             modact,   "Modifications
             trdir,    "System table TRDIR
             tfdir,    "Function Module
             enlfdir,  "Additional Attributes for Function Modules
             tstct.    "Transaction Code Texts
    *& Variables
    DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
    DATA : field1(30).
    DATA : v_devclass LIKE tadir-devclass.
    *& Selection Screen Parameters
    SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
    PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK a01.
    *& Start of main program
    START-OF-SELECTION.
    Validate Transaction Code
      SELECT SINGLE * FROM tstc
        WHERE tcode EQ p_tcode.
    Find Repository Objects for transaction code
      IF sy-subrc EQ 0.
        SELECT SINGLE * FROM tadir
           WHERE pgmid    = 'R3TR'
             AND object   = 'PROG'
             AND obj_name = tstc-pgmna.
        MOVE : tadir-devclass TO v_devclass.
        IF sy-subrc NE 0.
          SELECT SINGLE * FROM trdir
             WHERE name = tstc-pgmna.
          IF trdir-subc EQ 'F'.
            SELECT SINGLE * FROM tfdir
              WHERE pname = tstc-pgmna.
            SELECT SINGLE * FROM enlfdir
              WHERE funcname = tfdir-funcname.
            SELECT SINGLE * FROM tadir
              WHERE pgmid    = 'R3TR'
                AND object   = 'FUGR'
                AND obj_name = enlfdir-area.
            MOVE : tadir-devclass TO v_devclass.
          ENDIF.
        ENDIF.
    Find SAP® Modifications
        SELECT * FROM tadir
          INTO TABLE jtab
          WHERE pgmid    = 'R3TR'
            AND object   = 'SMOD'
            AND devclass = v_devclass.
        SELECT SINGLE * FROM tstct
          WHERE sprsl EQ sy-langu
            AND tcode EQ p_tcode.
        FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
        WRITE:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        SKIP.
        IF NOT jtab[] IS INITIAL.
          WRITE:/(95) sy-uline.
          FORMAT COLOR COL_HEADING INTENSIFIED ON.
          WRITE:/1 sy-vline,
          2 'Exit Name',
          21 sy-vline ,
          22 'Description',
          95 sy-vline.
          WRITE:/(95) sy-uline.
          LOOP AT jtab.
            SELECT SINGLE * FROM modsapt
            WHERE sprsl = sy-langu AND
            name = jtab-obj_name.
            FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
            WRITE:/1 sy-vline,
            2 jtab-obj_name HOTSPOT ON,
            21 sy-vline ,
            22 modsapt-modtext,
            95 sy-vline.
          ENDLOOP.
          WRITE:/(95) sy-uline.
          DESCRIBE TABLE jtab.
          SKIP.
          FORMAT COLOR COL_TOTAL INTENSIFIED ON.
          WRITE:/ 'No of Exits:' , sy-tfill.
        ELSE.
          FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
          WRITE:/(95) 'No User Exit exists'.
        ENDIF.
      ELSE.
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        WRITE:/(95) 'Transaction Code Does Not Exist'.
      ENDIF.
    Take the user to SMOD for the Exit that was selected.
    AT LINE-SELECTION.
      GET CURSOR FIELD field1.
      CHECK field1(4) EQ 'JTAB'.
      SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
      CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    I executed the above program but there are no user exits for the specified Transaction.
    Thanks,
    Naveen Kumar.

  • How to find the user belongs to ?

    Hi all,
    i want to find the user in which role he belongs to ? in which view we can find these information?
    pls help me
    Thanks
    Regards,
    M.Murali...

    Hi,
    check user_role_privs or dba_role_privs
    - Pavan Kumar N

  • How to find the user exit for order cancellation

    I want to find the user exit for order cancellation. And also to ensure that no one amends the order once the canellation has taken place. The cancellation shall be deemed to be affected only if the vendor has confirmed the acknowledgement of the order cancellation.
    I have got a Zreport where this order should not come as open order item.
    Please tell me the method of finding the users exit for order cancellation and stop the order from getting modified. And also how to find the tables in which the data has to be updated that the order has to be cancelled.
    In the PO header i want an additional tab <cancellation> by which the user by the help of userid and password should be able to cancel the order. An order once cancelled cannot be undone. A new order has to be placed. The new order can be placed refencing the cancelled purchased order.
    My client has got a very stringent requirement. In the past cancelled order has been undone and caused lot of problems.
    Regards.

    hi
    pls tell me t.code so that i will send all user exits related to that particular t.codes
    Thanks & Regards
    phaneendra

  • How to find the user menu of a user

    Hi,
        I have a request to change the description of a custom transaction in the user menu of a user. Im not sure
    How to find the user's user menu...
    Can we add any small documentation or comments to each object in user menu...
    Thanks in advance
    search before posting , it is a warning to you
    Edited by: Vijay Babu Dudla on Dec 31, 2008 5:00 AM
    Edited by: Vijay Babu Dudla on Dec 31, 2008 5:05 AM

    Welcome to SCN.
    Just refer: [Area Menu Maintenance |http://help.sap.com/saphelp_nw2004s/helpdata/en/00/783b377bfdcf61e10000009b38f936/frameset.htm]

  • How to find the user exits and BADIS from SPRO

    Hi all,
    please let us know how to find the User exits or BADIS for an application from SPRO.
    Regards,
    Madhavi

    Hi Varisetty,
    Finding user exits and BAdis from SPRO can be cumbsersome. In most instances you know the standard SAP program and want to check (find) an exit called in the flow of the transaction. You can do this as follows:
    For User Exit:
    Put "/h" in the command box (to start debugging)
    Execute your transaction
    When you enter debugging - put a breakpoint at statement
    CALL CUSTOMER-FUNCTION
    the control will stop at all calls to User Exits
    For BAdi (it's simpler)
    Go to class CL_EXITHANDLER in SE24
    Enter method GET_INSTANCE
    Put a breakpoint in this method
    Run your standard transaction - control will stop at all BAdis called within the flow since this method is used to check BAdi implementations before invoking them
    Also, if you want to find enhancements by package - go to SE80, enter the package and check function groups starting with X - those contain function exits (conventional user exits). For BAdis in a package, there is normally a separate tree node (under the package) for Enhancements hence clearly identifiable.
    Cheers,
    Adi

  • How to  find the user exit for a screen..

    Hi,
    plz help me how to find the user exit for a screen..?
    Regards
    Anbu

    Hi,
    check this program this will give you the list of user-exit and BADI for the perticular Tcode.
    REPORT  zuserexit_badi.
    TABLES : tstc,
    tadir,
    modsapt,
    modact,
    trdir,
    tfdir,
    enlfdir,
    sxs_attrt ,
    tstct.
    DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
    DATA : field1(30).
    DATA : v_devclass LIKE tadir-devclass.
    PARAMETERS : p_tcode LIKE tstc-tcode,
    p_pgmna LIKE tstc-pgmna .
    DATA wa_tadir TYPE tadir.
    START-OF-SELECTION.
      IF NOT p_tcode IS INITIAL.
        SELECT SINGLE * FROM tstc WHERE tcode EQ p_tcode.
      ELSEIF NOT p_pgmna IS INITIAL.
        tstc-pgmna = p_pgmna.
      ENDIF.
      IF sy-subrc EQ 0.
        SELECT SINGLE * FROM tadir
        WHERE pgmid = 'R3TR'
        AND object = 'PROG'
        AND obj_name = tstc-pgmna.
        MOVE : tadir-devclass TO v_devclass.
        IF sy-subrc NE 0.
          SELECT SINGLE * FROM trdir
          WHERE name = tstc-pgmna.
          IF trdir-subc EQ 'F'.
            SELECT SINGLE * FROM tfdir
            WHERE pname = tstc-pgmna.
            SELECT SINGLE * FROM enlfdir
            WHERE funcname = tfdir-funcname.
            SELECT SINGLE * FROM tadir
            WHERE pgmid = 'R3TR'
            AND object = 'FUGR'
            AND obj_name EQ enlfdir-area.
            MOVE : tadir-devclass TO v_devclass.
          ENDIF.
        ENDIF.
        SELECT * FROM tadir INTO TABLE jtab
        WHERE pgmid = 'R3TR'
        AND object IN ('SMOD', 'SXSD')
        AND devclass = v_devclass.
        SELECT SINGLE * FROM tstct
        WHERE sprsl EQ sy-langu
        AND tcode EQ p_tcode.
        FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
        WRITE:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        SKIP.
        IF NOT jtab[] IS INITIAL.
          WRITE:/(105) sy-uline.
          FORMAT COLOR COL_HEADING INTENSIFIED ON.
    Sorting the internal Table
          SORT jtab BY object.
          DATA : wf_txt(60) TYPE c,
          wf_smod TYPE i ,
          wf_badi TYPE i ,
          wf_object2(30) TYPE c.
          CLEAR : wf_smod, wf_badi , wf_object2.
    Get the total SMOD.
          LOOP AT jtab INTO wa_tadir.
            AT FIRST.
              FORMAT COLOR COL_HEADING INTENSIFIED ON.
              WRITE:/1 sy-vline,
              2 'Enhancement/ Business Add-in',
              41 sy-vline ,
              42 'Description',
              105 sy-vline.
              WRITE:/(105) sy-uline.
            ENDAT.
            CLEAR wf_txt.
            AT NEW object.
              IF wa_tadir-object = 'SMOD'.
                wf_object2 = 'Enhancement' .
              ELSEIF wa_tadir-object = 'SXSD'.
                wf_object2 = ' Business Add-in'.
              ENDIF.
              FORMAT COLOR COL_GROUP INTENSIFIED ON.
              WRITE:/1 sy-vline,
              2 wf_object2,
              105 sy-vline.
            ENDAT.
            CASE wa_tadir-object.
              WHEN 'SMOD'.
                wf_smod = wf_smod + 1.
                SELECT SINGLE modtext INTO wf_txt
                FROM modsapt
                WHERE sprsl = sy-langu
                AND name = wa_tadir-obj_name.
                FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
              WHEN 'SXSD'.
    For BADis
                wf_badi = wf_badi + 1 .
                SELECT SINGLE text INTO wf_txt
                FROM sxs_attrt
                WHERE sprsl = sy-langu
                AND exit_name = wa_tadir-obj_name.
                FORMAT COLOR COL_NORMAL INTENSIFIED ON.
            ENDCASE.
            WRITE:/1 sy-vline,
            2 wa_tadir-obj_name HOTSPOT ON,
            41 sy-vline ,
            42 wf_txt,
            105 sy-vline.
            AT END OF object.
              WRITE : /(105) sy-uline.
            ENDAT.
          ENDLOOP.
          WRITE:/(105) sy-uline.
          SKIP.
          FORMAT COLOR COL_TOTAL INTENSIFIED ON.
          WRITE:/ 'No.of Exits:' , wf_smod.
          WRITE:/ 'No.of BADis:' , wf_badi.
        ELSE.
          FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
          WRITE:/(105) 'No userexits or BADis exist'.
        ENDIF.
      ELSE.
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        WRITE:/(105) 'Transaction does not exist'.
      ENDIF.
    AT LINE-SELECTION.
      DATA : wf_object TYPE tadir-object.
      CLEAR wf_object.
      GET CURSOR FIELD field1.
      CHECK field1(8) EQ 'WA_TADIR'.
      READ TABLE jtab WITH KEY obj_name = sy-lisel+1(20).
      MOVE jtab-object TO wf_object.
      CASE wf_object.
        WHEN 'SMOD'.
          SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
          CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
        WHEN 'SXSD'.
          SET PARAMETER ID 'EXN' FIELD sy-lisel+1(20).
          CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
      ENDCASE.
    Reagards,
    Bharat.

  • How to find the user exit for infotype 2013 ?

    Hi All,
    How to find the user exit in infotype 2013? i want to change the drop down list default value in infotype 2013.
    Thanks,
    Srikanth P

    reward points if useful
    User exit name is PBAS0001.
    code should be written in ZXPADU01 for PBO
    ZXPADU02 for PAI.

  • How to find the user who created record on PA_TRANSACTION_INTERFACE_ALL ?

    We are trying to develop a custom workflow to send Project WebADI transactions through workflow approval. My problem is, from the PA_TRANSACTION_INTERFACE_ALL table where the interface records are populated, I cant find the user responsibile. (Notification will be sent to the creator's manager)
    What we planned for the design is:
    Disable the import program being run from WebADI Screen. This ensures data stays in PA_TRANSACTION_INTERFACE_ALL  and does not go to PA_EXPENDITURES_ALL Etc.
    Looking at the data, send notifications. When the approval is given, run the import program to send the data to PA_EXPENDITURES_ALL Etc.
    We were also going to remove the import program from the custom responsibilities so that users dont run it.
    First, we had to disable the Import program being run from the WebADI screen. We did this by editing the integrator. Now when the data is imported into this table ,we can see many columns do not have data. CREATED_BY etc are populated only if the import program runs. But if it runs then already transactions have gone in and approval process is meaning less.
    Only thing that looks like it could be useful is TXN_INTERFACE_ID but I cannot find another place where it will link to. 
    Could you help us find a way to find the creator of the data in PA_TRANSACTION_INTERFACE.

    Hi
    I don't know the answer to your question, but thought of suggesting another approach.
    Leave the original import program in the integrator of the WebAdi.
    Develop a logic into Transaction Import Client Extension. There you can find the data that Oracle has already populated for the created by column, and you may trigger the notification submission for approval. Use the extension to alter the transaction status so it will not be actually interfaced, until you get the approval response.
    Dina

Maybe you are looking for

  • OES11SP1 LDAP issue on a node

    Hi, I have a 2 node cluster that we have upgraded from OES11 to OES11 sp1 at the beginning of august Last week we create a new ressource on the primary node (let's say NODE 1), but when we want to migrate this new ressource to the other node (let's s

  • System (ntoskrnl.exe) high cpu usage in Windows 8.1

    Sir/Mam, I'm having this issue since last week, when i checked it is the "system" (ntoskrnl.exe) file which is using upto 18-24% of my CPU and causing all other applications to stutter for a second (incluuding Media player, mouse pointer, everything)

  • Tape Library - Extend Expired Tapes

    Hi, I have several questions regarding the Tape Library behavior. I have DPM 2012 R2 UR3 with VTL library. I have several PG that is using Long-Term-backup to the VTL. I have several protection Groups that is having long term backup. Each PG have its

  • True circles from round-cap dash?

    In the discussion of tricuspoids Jongware stated that "circles" in Illustrator are not circles at all, but approximations "from four quadratic Bézier curves." Is the round cap for a stroke generated the same way, or would it be possible to generate a

  • DIAPI for Product Tree

    Hi all, I found out that DI API doesn't provide property 'WareHouse' for Product Tree. It always gets the default WH from item master data. Using UI API, we can change the WH, whereas we cannot do that using DI API? Does SBO know about this? Are they