Wednesday, April 5, 2017

Creating an administrative user group



Procedure

  1. Connect to the System database as the admin user. For example:
  2. [nz@nzhost ~]$ nzsql -d system -u admin -pw password 


  3. Create a group for your administrative users. For example:
  4. SYSTEM.ADMIN(ADMIN)=> CREATE GROUP administrators;


  5. Grant the group all administrative permissions. For example:
  6. SYSTEM.ADMIN(ADMIN)=> GRANT ALL ADMIN TO administrators WITH GRANT  OPTION;


  7. Grant the group all object permissions. For example:
  8. SYSTEM.ADMIN(ADMIN)=> GRANT ALL ON DATABASE, GROUP, SCHEMA, SEQUENCE,SYNONYM, TABLE, EXTERNAL TABLE, FUNCTION, AGGREGATE, USER, VIEW, PROCEDURE, LIBRARY TO administrators WITH GRANT OPTION;


  9. Grant the group select permissions on all system and management objects. For example:
  10. SYSTEM.ADMIN(ADMIN)=> GRANT LIST, SELECT ON SYSTEM TABLE, SYSTEM VIEW, MANAGEMENT TABLE, MANAGEMENT VIEW TO administrators WITH GRANT OPTION;


  11. Add users to the group to grant them the permissions of the group. For example:
  12. SYSTEM.ADMIN(ADMIN)=> ALTER USER nzuser WITH IN GROUP administrators;


GRANT LIST,SELECT,DELETE,UPDATE,INSERT,TRUNCATE,GROOM,ALTER,ABORT ON SANDBOX..TABLE TO  SANDBOX_ADMIN; 

No comments:

Post a Comment