1 Reply Latest reply: Jul 14, 2013 9:38 AM by DK2010 RSS

    Proxy user creation doubt

    922989

      Hello  all

       

      I have executed  the script

       

      drop user actual_user cascade;

      drop user proxy_user cascade;

      drop role role1;

      create user actual_user identified by actual_user;

      grant connect,resource to actual_user;

      create role role1;

      grant connect,resource,create session  to role1;

      create user proxy_user identified by proxy_user;

      alter user actual_user grant connect through proxy_user with role role1;

      conn actual_user/actual_user@dev03;

      create table a(id number, name varchar2(10));

      insert into a values (1, 'Dennis');

      insert into a values (2, 'Shilpa');

      commit;

      select * from a;

      grant select on a to role1;

      conn proxy_user[actual_user]/proxy_user@dev03;

       

      But  for the last statement I got the error as

       

      ERROR:

      ORA-01045: user ACTUAL_USER lacks CREATE SESSION privilege; logon denied

       

      Please help if any one can

        • 1. Re: Proxy user creation doubt
          DK2010

          Hi,

           

          What is the DB version you are useing in 11g its working like

           

          SQL> create user actual_user identified by actual_user;
          grant connect,resource to actual_user;
          create role role1;
          grant connect,resource,create session  to role1;
          create user proxy_user identified by proxy_user;
          grant role1 to proxy_user;
          alter user actual_user grant connect through proxy_user ;
          
          
          
          
          conn actual_user/actual_user
          create table a(id number, name varchar2(10));
          insert into a values (1, 'Dennis');
          insert into a values (2, 'Shilpa');
          commit;
          select * from a;
          grant select on a to role1;
          conn proxy_user[actual_user]/proxy_user
          User created.
          
          
          SQL> 
          Grant succeeded.
          
          
          SQL> 
          Role created.
          
          
          SQL> 
          Grant succeeded.
          
          
          SQL> 
          User created.
          
          
          SQL> 
          Grant succeeded.
          
          
          SQL> 
          User altered.
          
          
          SQL> SQL> SQL> Connected.
          SQL> 
          Table created.
          
          
          SQL> 
          1 row created.
          
          
          SQL> 
          1 row created.
          
          
          SQL> 
          Commit complete.
          
          
          SQL> 
                  ID NAME
          ---------- ----------
                   1 Dennis
                   2 Shilpa
          
          
          SQL> 
          Grant succeeded.
          
          
          SQL> 
          Connected.
          SQL> show user
          USER is "ACTUAL_USER"
          SQL> 
          

          can also check the Doc:Proxy Authentication

           

          HTH