How to grant select on v$session to a common user see all session of all pdbs?



  • I've done it':

    grant select on sys.gv_$session to c##dba_foo container = all;
    

    But I can't see sessions from pdbs.

    Also, the c##dba_foo need permission to kill others session of all pdbs. Do I need something else? I only grant alter system.

    GRANT ALTER SYSTEM TO c##dba_sonda container = all;
    

    Note: This user cannot connect to pdb to kill the sessions. Need be from cdb root.



  • I've found the solution:

    alter user c##dba_foo set container_data=all for sys.v_$pdbs container = current;
    alter user c##dba_foo set container_data=all for sys.gv_$session container = current;
    alter user c##dba_foo set container_data=all for sys.V_$SESSION container = current;
    

    and

    GRANT ALTER SYSTEM TO c##dba_foo container=all;
    

Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2