In Oracle, you can use revoke to cancel dba permissions. Revoke can revoke permissions, and executing this statement requires the executor to have dba permissions. The syntax is "revoke dba from user_Name;".
The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.
To cancel the DBA permissions of a user, execute:
revoke dba from user_Name
To execute this statement, the executor must have DBA permissions
Extension:
--Query the roles with DBA permissions in the database
select * from dba_role_privs where granted_role='DBA'
--Add the DBA permissions of the user_Name role
grant dba to user_Name
But it has been If you know that the logged-in user does not have DBA authority, you need to log in to the sys account to authorize.
Open cmd,
Connect to sqlplus,
Connect to sys/orcl as sysdba,
Use the command grant dba to user_Name; (Remember to add points to this sentence No.)
Revocation permission extension:
The concept of Oracle revoking permissions is to recycle the permissions of users or roles, that is Delete a certain system permission for the user or delete the operation permission of an object.
Oracle revokes system permissions
Oracle revokes system permissions. Only users with DBA permissions can revoke (revoke) operations. The syntax for revoking system permissions is as follows:
revoke system_privilege from user|role;
Syntax analysis:
1. system_privilege: refers to the name of the revoked system permissions. When revoking system permissions, the user must have the system Permissions cannot be revoked if system permissions do not exist.
2. user|role: refers to whether the object of revoking permission is a user or a role.
Example 1. Use the revoke command to revoke the create session permission of the user teacher. The code is as follows:
revoke create session from teacher;
Then you can query the system permissions of TEACHER through the data dictionary dba_sys_privs and find that create session has been No longer exists.
Recommended tutorial: "Oracle Video Tutorial"
The above is the detailed content of How to cancel dba permissions in oracle. For more information, please follow other related articles on the PHP Chinese website!