Is There a Script to Identify the Session Identifier (SID) for an Actual Individual Apps User?
goal: Is there a script to identify the session identifier (SID) for an
actual individual user in Oracle Applications?
fact: Oracle Application Object Library
fix:
All users in Oracle Applications show up as user APPS. Oracle Applications uses
the database user APPS for every one of its users.
Use the following SQL query to identify the sid and serial# associated with the
session identified in the Monitor Users form:
SELECT SUBSTR(d.user_name,1,30) "User Name"
, a.pid
, b.sid
, b.serial#
FROM v$process a, v$session b, fnd_logins c, fnd_user d
WHERE a.pid = c.pid
AND c.pid = &PID
AND d.user_name = UPPER('&USER_NAME')
AND TO_DATE(c.start_time) = TO_DATE('&START_DATE')
AND d.user_id = c.user_id
AND a.addr = b.paddr
AND c.end_time IS NULL
/
2.When prompted for "PID" enter the value that appears under the
Oracle Process column on the form.
.
3.When prompted for "USER_NAME" enter the value that appears under
the User Name column on the form.
.
4.When prompted for "START_DATE" enter the Date that the user started
the session.
.
Note: This value has to be determined based on how long the user has been
signed on the system. For instance if the user has been signed on for 10 hours
and the current time is 12:00 noon the current date would be the value that
should be entered.
.
5.To kill the session make note of the SID and SERIAL# returned from the query
.
6.Kill the session with the following comands:
SQL] ATLER SYSTEM KILL SESSION '[SID], [SERIAL#]';
ALTER SYSTEM KILL SESSION '[SID], [SERIAL#]';
.
EXAMPLE:
For the example the following information was entered:
.
PID = 35
USER_NAME = ZZJONES
START_DATE = 28-mar-00:
.
Enter value for pid: 35
old 7: AND c.pid = &PID
new 7: AND c.pid = 35
Enter value for user_name: zzjones
old 8: AND d.user_name = UPPER('&USER_NAME')
new 8: AND d.user_name = UPPER('zzjones')
Enter value for start_date: 28-mar-00
old 9: AND TO_DATE(c.start_time) = TO_DATE('&START_DATE')
new 9: AND TO_DATE(c.start_time) = TO_DATE('28-mar-00')
.
User Name PID SID SERIAL#
------------------------------ --------- --------- ---------
ZZJONES 35 14 1764
ZZJONES 35 15 2663
.
Two rows are returned, because one database session is established for the
Navigator form and a second session is established for any form that is
launched from the Navigator form. It is possible that only one row will be
returned from
the query that corresponds to the navigator form.
.
ALTER SYSTEM KILL SESSION '14, 1764';
ALTER SYSTEM KILL SESSION '15, 2663';
No comments:
Post a Comment