Oracle Rights Management

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.