Oracle User Rights related

Source: Internet
Author: User

--View all users under the database:

Select  from Dba_users;

--View the user roles for the current connected database

SELECT *  from User_role_privs;

--Create User

CREATE User  by test;

--Assigning authorization

Grant  to -- assign permissions to allow only connections to view Grant  to -- assign to normal permissions  development operations basically has met Grantto-- assigning administrator Permissions

--Query What system permissions are in a role:

SelectPrivilege fromRole_sys_privswhereRole='RESOURCE'; PRIVILEGE----------------------------------------CREATESEQUENCECREATE TRIGGERCREATECLUSTERCREATE PROCEDURECREATETYPECREATEOPERATORCREATE TABLECREATEIndextype8Rows selected.

--Query What role is included in a role--if no other roles are included, the query result is empty.

Select  from where role='dba';

--If the user locks the user to unlock

Alter user test account unlock;

--View the permissions of a user--note: 11g user names are case-sensitive by default

Select  from where grantee='test'; GRANTEE granted_role------------------------------------------------------------  Test    imp_full_databasetest exp_full_databasetest connecttest    RESOURCE

--View system permissions for a specified user

SELECT * fromDba_sys_privsWHEREGRANTEE= 'Test'UNION  AllSELECT * fromDba_sys_privsWHEREGRANTEEinch(SELECTGranted_role fromDba_role_privsWHEREGRANTEE= 'Test');

--View object permissions for the currently connected database user

SELECT * fromDba_tab_privsWHEREGRANTEE= 'Test'UNION  AllSELECT * fromDba_tab_privsWHEREGRANTEEinch(SELECTGranted_role fromDba_role_privsWHEREGRANTEE= 'Test');


Oracle User Rights related

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.