[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

restricting multiple sessions in oracle 10g

Posted on 2012-08-15
5
Medium Priority
?
677 Views
Last Modified: 2012-11-12
hi

we have been migrated to 10g forms and want to know how to setup multiple sessions restrictions since the user is opening n number of sessions .


Rgds
Venu
0
Comment
Question by:venu3108
5 Comments
 
LVL 23

Expert Comment

by:OP_Zaharin
ID: 38299153
- you can set using the following command. n is number of session that you want to restrict per user:

alter profile default limit SESSIONS_PER_USER n;



- refer to the doc:
http://docs.oracle.com/cd/B13789_01/server.101/b10759/statements_2007.htm
0
 

Author Comment

by:venu3108
ID: 38299198
Hi

i am not asking at the database level since users are logging with userid separately at application level not at database .


eg: a user KKK is having access to application . he is logging with kkk once.
again he is logging in the new browser with same id.

i want to restrict application level session limit.

rgds
0
 
LVL 23

Expert Comment

by:OP_Zaharin
ID: 38299279
- i'm not a form developer, however i can think of a few ways:

1- create a session column in your user table. update session=1 when user login. always check for this column value in the login page, if 1 means user cannot login again. reset that column = 0 on exit / user logout from the form.

2- grant the oracle user to query to v$session. you can make use of OSUSER, MACHINE/TERMINAL data in v$session to restrict only 1OS user or 1terminal is allowed to login.

3- there are some suggestion that you can look into the following thread such as DBMS_APPLICATION_INFO.SET_CLIENT_INFO, set_context and etc
https://forums.oracle.com/forums/thread.jspa?threadID=1037566&start=0&tstart=0
0
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 38299295
why would the multiple sessions be a problem ?
why would you want to restrict it ?

if the database can handle it without any problems, then it shouldn't be restricted
0
 
LVL 78

Accepted Solution

by:
slightwv (䄆 Netminder) earned 300 total points
ID: 38300183
You might also be able to handle this with an 'AFTER LOGON' trigger to check v$session and take appropriate action.

Examples are out there on this.

Here is one that limits access based on program:
http://dba-oracle.com/t_trigger_restrict_end_user_access.htm

BE CAREFUL:  With this type of a trigger, you can easily keep everyone from connecting if you don't get it right.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question