Changing a Users Role
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Changing a Users Role

  1. #1
    Join Date
    Oct 2000
    Location
    Halifax, Nova Scotia
    Posts
    197

    Question

    Hello

    Here is my situation, I was wondering if any of you have had a similar situation.

    I have a user that needs a different role and profile depending on what time of the day it is. If it is regular working hours he should only be able to do regular DML through the application. But for after hours he is the on call person for the application so he must be able to do anything (i.e alter tables and procedures).

    We don't want him to have this access during the day though. Is there anyway to set it up a trigger that checks the login timestamp to determine the time of day which will determine the role and profile he need's

    I have looked into LOGON trigger's but they can not be used to change ROLE'S or PROFILES.

    The version is Oracle 8.1.6 running on Sun Solaris 8
    Don't be afraid to try something new. Amateurs built the Ark, professionals built the Titanic

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    create or replace trigger log_on
    after logon on database
    begin
    execute immediate 'set role lscx';
    end;
    /


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width