Solved

Logging users out of IFS after 12 hours of inactivity

  • 3 September 2021
  • 4 replies
  • 670 views

Userlevel 7
Badge +18

Is anyone aware of a routine that will log users out of IFS after a period of inactivity i.e. 12 hours?

 

I have found something like:

BEGIN
FOR R IN 
(
    SELECT SID,SERIAL#,INST_ID FROM GV$SESSION 
    WHERE STATUS='INACTIVE' AND last_call_et > (60*60*12)
) LOOP
EXECUTE IMMEDIATE 'alter system kill session ''' ||R.SID|| ',' ||R.SERIAL#|| ',@' ||R.INST_ID|| '''';
END LOOP;
END;

/

 

But would need to test this and also check actual feasibility and pitfalls..

All advice would be much appreciated.

icon

Best answer by Charith Epitawatta 3 September 2021, 12:48

View original

This topic has been closed for comments

4 replies

Userlevel 7
Badge +31

Hi @johnw66,

Following system parameter is available in IFSAPP10 for this. If this parameter is defined, the user will be forced to log back in if the timeout has elapsed. 

Since there are no dedicated sessions in IFSAPP10, I don’t think killing database sessions will make the user log back in anyway. 

Hope this helps!

Userlevel 7
Badge +18

I thought I had seen it but couldn’t see the wood for the trees.

 

Thank you so much.

 

Userlevel 7
Badge +18

@Charith Epitawatta  We have TIMECLOCK Users that would need to be excluded from the idle time routine.

How would we exclude certain users from this feature?

 

Thank you.

Userlevel 7
Badge +31

Hi @johnw66,

@Charith Epitawatta  We have TIMECLOCK Users that would need to be excluded from the idle time routine.

How would we exclude certain users from this feature?

 

Thank you.

 

I was able to find following information in the change log of the patch that introduced this functionality.

This ability to expire idle user session would be client focus meaning that it would be on the IFS EE level (not Access Provider level), if other clients need the same behavior it should be implemented in those clients.

 

Therefore I don’t think this parameter should affect Time Clock. However, it might be a good idea to run a test. :)

Hope this helps!