Q
Manage Learn to apply best practices and optimize your operations.

How to restrict times when user account is accessed

We have a student worker that needs access to our SCt Banner application. This application is web enabled. We don't want them to have any access after hours or on weekends. How do we limit their access to follow the time schedules we want? I thought about locking their account at a certain time but if they don't log off that won't work. We also have to consider holidays. Any ideas?

You're looking at creating some custom code, I'd say. There's nothing in the base Oracle database features that can help with time of day login restrictions. If you can create an automated process that locks and unlocks the account at the appropriate times of day, just add something like the PL/SQL code below to the "lock" part of the procedure to identify and remove any sessions they currently have connected (presuming that the application uses "real" database user accounts -- I'm not familiar enough with Banner to know):

FOR i IN (SELECT username,logon_time,sid,serial#
            FROM v$session
           WHERE username IN ('STUDENTWORKER1','STUDENTWORKER2')
         ) LOOP
  DBMS_OUTPUT.PUT_LINE('killing off session '||i.sid||','||i.serial#||
                       ' for '||i.username);
  execute immediate 'alter system kill session '''||i.sid||','||i.serial#||'''';
END LOOP;

Dig Deeper on Oracle database security

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close