Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

implementation of login tracking 2

Status
Not open for further replies.

wekoweko

Programmer
Feb 1, 2004
18
0
0
PH
hi there, am using oracle 9i and would like to ask this question, am planning to implement the prevention of multiple and simultaneous logins to a site using a single account via different computers, am planning to use a back-end table that has a members unique id and a status of 1 if he is logged in and 0 if he is not, my problem is if he doesnt log out or if he gets disconnected w/out logging off. The field will then be left 1, when it should be 0. Is there a way in oracle to have a column that will automatically update itself if it is inactive for a certain amount of time? thanks
 
Why don't you use profile?

CREATE PROFILE SINGLE_SESSION LIMIT SESSIONS_PER_USER 1;

ALTER USER <USER> PROFILE SINGLE_SESSION

Regards, Dima
 
You could create a profile with SESSIONS_PER_USER set to 1 and assign it to that user - no tracking needed:

CREATE PROFILE one_conc_connect LIMIT SESSIONS_PER_USER 1;
ALTER USER yourUser PROFILE one_conc_connect;

Stefan
 
hey thanks dima and stefan for the suggestion, am a newbie with oracle, am still studying for the ocp certification, and am not very familiar with profiles so will have to review a bit, but do have a follow-up question though, this is an http session am talking about not an oracle session, am creating a website that has a login area you see and would like to prevent a registered user to have more than 1 login to the site simultaneously, once again thanks guys
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top