How to Retrieve Information on Users Currently Logged on?

For PeopleTools 8.4x:

We could see this information from the navigation:
PeopleTools -> Security -> Review Security Information -> Access Log Queries

It uses the information from the LASTSIGNONDTTM field on the PSOPRDEFN table and populates the PSACCESSLOG table with this information.

For PeopleTools 8.44x, the information can be accessed from Performance Monitor.
PeopleTools > Security  Common Queries > PeopleTools Performance Monitor > System Monitor > Current User Sessions

However the challenge is – that since PeopleSoft uses WebServer technology - if a user has closed a session without properly logging out, until the session expires based on time out, such users sessions will show as "active" users.

Alternatively, the following queries and methods can be used to find out the current logged in users:

  1. The following query will list all the users in the current database(not just those logged in from PIA): SELECT sid, 
           serial#, 
           username, 
           terminal, 
           program 
    FROM   v$session 
    WHERE  username IS NOT NULL;
     
  2. From the Tuxedo command line on the application server, enter 'pclt'. It will return the users that are currently on the system.
  3. The following query will list all the PIA users through PSACCESSLOG record: SELECT DISTINCT oprid, 
                    logipaddress, 
                    To_char(logindttm, 'YYYY-MM-DD:hh:mi:ss')   logintime, 
                    To_char(logoutdttm, 'YYYY-MM-DD:hh:mi:ss')  logoutime, 
                    To_char(( SYSDATE ), 'YYYY-MM-DD:hh:mi:ss') currtime 
    FROM   psaccesslog 
    WHERE  To_date(SYSDATE) - To_date(logindttm) >= 0 
           AND To_date(logoutdttm) - To_date(SYSDATE) >= 0;
     

To find out the total number of List of Users Currently Logged into PIA at the moment run the below SQL Query:
SELECT COUNT(nr) users_number 
FROM   (SELECT COUNT(oprid) AS nr 
        FROM   psaccesslog 
        WHERE  To_date(SYSDATE) - To_date(logindttm) >= 0 
               AND To_date(logoutdttm) - To_date(SYSDATE) >= 0 
        GROUP  BY oprid);

Deleting the PSACCESSLOG table does not result in any harm. However, once the PSACCESSLOG table is deleted and to track Users' login and logout activity again, the table must be recreated using the same exact column names and order as were in the previous PSACCESSLOG table: OPRID, LOGIPADDRESS, LOGINDTTM, LOGOUTDTTM.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值