Sunday, September 15, 2024

Fetch Peoplesoft Login and Log out report

 SELECT
'OS_USERNAME',
'USERNAME',
'TERMINAL',
'USERHOST',
'LOGON_TIME',
'LOGOFF_TIME', 'DEFECT','COMMENT'
FROM DUAL;
select   
   os_username,  
   username,  
   terminal,  
   userhost,  
   to_char(timestamp,'MM-DD-YYYY HH24:MI:SS') logon_time,  
   to_char(logoff_time,'MM-DD-YYYY HH24:MI:SS') logoff_time  
from  
   dba_audit_trail  
where timestamp >= SYSDATE - 7
order by timestamp desc;


"select AXS.OPRID, PERS.OPRDEFNDESC, AXS.logipaddress, AXS.logindttm, AXS.logoutdttm, AXS.pt_signon_type  

from PSACCESSLOG AXS  

JOIN PSOPRDEFN PERS on PERS.OPRID = AXS.OPRID 

where AXS.oprid IN ('1369270A','1369281A','1369282A','1372071A','1430660A','1430969A','1433791A','425403A','446944A','457181A','236864', 

'1349946A','1357782A','1367977A','1444181A','1388192A','344090A','604778A','606310A','658961A','432616A','848700A','1417363A','1418548A', 

'389483A','177244A','689770A','648461A','1269861A','1345156A','1421703A','348930A','561762A','116567A','1412860A','1418536A','360661A','538013A','184615A', 

'852681A','316909A','316910A','002767A','1359391A','1449206A','1450668A','1459799A','HRBATCH','FSBATCH','FSNOC','HRNOC','FSMONITOR','HRMONITOR') 

and to_date(to_char(AXS.logindttm, 'DD MON YYYY'), 'DD MON YYYY') > '24-Jan-2018' and  to_date(to_char(AXS.logindttm, 'DD MON YYYY'), 'DD MON YYYY') < '29-Mar-2018' 

order by AXS.OPRID, AXS.LOGINDTTM"






No comments:

Post a Comment