Authorization principle: Principle of least privilege
Empower users with roles to simplify administrator administrative privileges
Business account creation:
To create a specific table space:
CREATE tablespace TBS1 datafile '/U01/APP/ORACLE/ORADATA/PROD4/PROD4/TBS1. DBF ' SIZE 100M;
To create a feature temp table space:
Create temporary tablespace temp2 tempfile '/u01/app/oracle/oradata/prod4/prod4/temp2.dbf ' size 50m;
To create a business user:
Create user ' mytest ' profile ' default ' identified by 123456 default tablespace ' TBS1 ' temporary tablespace ' temp2 ' account Unlock
To authorize the user:
Grant RESOURCE to MyTest;
To create an Oracle account for an employee:
Sql> create user Fxh identified by "123456";
Sql> Grant connect to FXH;
Sql> Grant Select on Hr.employees to Fxh;
Account Unlocked
sql> alter user HR identified by 123456 account unlock;
Permission query:
1. Query the permissions that a user has:
To query the roles that a user has:
Select Grantee,granted_role from Dba_role_privs where grantee= ' HR ';
To query the system permissions that a user has:
Select Grantee,privilege from Dba_sys_privs where grantee= ' HR ';
To query the object permissions that a user has:
Select Grantee,owner,table_name,privilege from Dba_tab_privs WHERE grantee= ' HR ';
2. Query permissions for a role:
To query the rights that a role has for a pair of images:
Sql> SELECT * from Role_tab_privs where role= ' AA ';
To query what system permissions are in a role:
Select privilege from Role_sys_privs where role= ' RESOURCE ';
Query what roles are included in a role
Select Granted_role from Role_role_privs where role= ' SYSDBA ';
Oracle Rights Management