471,092 Members | 1,550 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,092 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 2071
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Michelle Stone | last post: by
8 posts views Thread by Alphonse Giambrone | last post: by
1 post views Thread by Kartic | last post: by
11 posts views Thread by Lo'oris | last post: by
41 posts views Thread by Twayne | last post: by

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.