Oracle basic rights authorization or reclaim permissions, unlock and other permissions configuration

Source: Internet
Author: User

select * from Dba_users;--Query all users in the database
ALTER user Scott account lock;--Lock users
alter user Scott account unlock;--Unlocking the user
Create user username identified by password;
Grant connect to user name;--Authorized user permission to allow login
Grant create tablespace to username;--Authorization to create TABLE space permissions
Grant Select on the authorized table name to user name;--Authorize the user to query permissions for a table
grant update on authorized table name to user name;--Authorize the user to update permissions for a table
grant insert on authorized table name to user name;--Authorize the user to insert a table's permissions
Grant execute on stored procedure to user name;--Authorize the user to have stored procedure permissions
grant update on authorized table name to user name with GRANT option;--(continuous authorization) Authorized Update permission to transfer to the next user, allow the user to continue to authorize;
--Revoke permissions
Revoke select on the authorized table name from the user name;--Recover the permissions of the query select Table ;
revoke insert on authorized table name from user name;--Revoke permissions of xujin1 role;
revoke all on the authorized table name from the user name;--Recover all permissions of the user
Grant connect to user name;--Authorized user permission to allow login
revoke connect from user name;--Reclaim the user's logon rights
SELECT * from Dba_tab_privs where grantee= ' user name ';--Query the permissions of a user-owned object
SELECT * from Dba_sys_privs where grantee= ' username ';--query for system permissions owned by a user
select * from Session_privs;--system permissions that are valid for the current session
--Character
create role name;--Establish ' role name ' role
Grant role name to user name;--Authorizes the role's permissions to the user;
alter USER role name default user name 1, user name 2;
drop role role name;--Remove roles 1;
SELECT * from Role_sys_privs where role= role name;---See what system permissions are available under a role ;
SELECT * from Role_role_privs where role= role name;---See what role permissions are under a role
SELECT * from Role_tab_privs where role= ' role name ';---See what table permissions are available under a role
SELECT * from Dba_role_privs where grantee= ' username ';--see how many roles there are under the user;

Oracle basic rights authorization or reclaim permissions, unlock and other permissions configuration

Related Article

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.