473,387 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

User is not allowed to work in a period of time

Hi Folks,

I have a schema trigger in user A that checks if this user in the table
"FOO" is allowed to connect at a specific time. The problem is I don't want
the user to be logged on if he is not supposed to be. I tried to raise an
error, but the user is still connected !!! Any good thoughts to help me with
that ??

Thanks in advance.

Jorge
Jul 19 '05 #1
4 2136
You can kick a user off via "alter system kill session 'sid, serial'

Just use v$session to lookup the sid and serial of the user

"Jorge Pinto" <jo****@sympatico.ca> wrote in message
news:gS*******************@news20.bellglobal.com.. .
Hi Folks,

I have a schema trigger in user A that checks if this user in the table
"FOO" is allowed to connect at a specific time. The problem is I don't want the user to be logged on if he is not supposed to be. I tried to raise an
error, but the user is still connected !!! Any good thoughts to help me with that ??

Thanks in advance.

Jorge

Jul 19 '05 #2

You could have a job that 'locks/unlocks' the users at cretain
times issuing:

ALTER USER TheUser ACCOUNT LOCK;
(or UNLOCK);

:cool:

--
Posted via http://dbforums.com
Jul 19 '05 #3
"LKBrwn_DBA" <me*********@dbforums.com> wrote in message
news:32****************@dbforums.com...

You could have a job that 'locks/unlocks' the users at cretain
times issuing:

ALTER USER TheUser ACCOUNT LOCK;
(or UNLOCK);


That will prevent subsequent logins, however if the user already has a
session established then locking the account will not disable access.
Jul 19 '05 #4

Well, if user already has a session then also do the
"alter system kill session 'sid, serial';" thing!!!

--
Posted via http://dbforums.com
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: teddysnips | last post by:
In the script below is the DDL to create some tables and a UDF. What I'm interested in is the UDF at the end. Specifically, these few lines: --CLOSE OTRate --DEALLOCATE OTRate ELSE --...
5
by: Michelle Stone | last post by:
Hi everybody I am writing a simple asp.net application using form authentication. I store the list of all users and their passwords in an SQL Server database table. My client recently told me...
8
by: Alphonse Giambrone | last post by:
I have a small asp.net web app running on a shared host. It uses a Jet (Access) database. I included a routine to compact the database when the application_event fires if it has not been compacted...
1
by: Kartic | last post by:
Hi, I have created an application in vb.net using SQL Server 2000 database . What I want is to restrict users to access the application more than once, from the same computer or from any other...
5
by: Martijn Saly | last post by:
I'd like to test in my script, if it's going to be possible to enable priviliges. If I use this... netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect") ....it presents a...
14
by: S_K | last post by:
Hi, I have an .aspx website developed. Because of the nature of the web site only one user can be using this site at the same time. How do I lock out the second user? Application variable...
11
by: Lo'oris | last post by:
I'd like to have a set of "allowed characters", and strip a string from everything besides those. I've tried and tried but so far every time I enter strings containing unicode, it goes mad and...
41
by: Twayne | last post by:
Hi, How would I go about "forcing" a user from one page to another? I have a very simple random question/answer entrance requirement for an e-mail form. After 3 page views most people are...
4
by: Jorge Pinto | last post by:
Hi Folks, I have a schema trigger in user A that checks if this user in the table "FOO" is allowed to connect at a specific time. The problem is I don't want the user to be logged on if he is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.