User is not allowed to work in a period of time

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jorge Pinto

    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


  • Maximus

    #2
    Re: User is not allowed to work in a period of time

    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" <jorgep@sympati co.cawrote in message
    news:gSaZa.5856 $ox5.649336@new s20.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
    >
    >

    Comment

    • LKBrwn_DBA

      #3
      Re: User is not allowed to work in a period of time


      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

      Comment

      • Maximus

        #4
        Re: User is not allowed to work in a period of time

        "LKBrwn_DBA " <member30625@db forums.comwrote in message
        news:3225650.10 60623547@dbforu ms.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.


        Comment

        • LKBrwn_DBA

          #5
          Re: User is not allowed to work in a period of time


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

          --
          Posted via http://dbforums.com

          Comment

          Working...