Home > Database > Oracle > body text

How to cancel dba permissions in oracle

WBOY
Release: 2022-05-25 17:05:34
Original
7311 people have browsed it

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;".

How to cancel dba permissions in oracle

The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.

How to cancel DBA permissions in oracle

To cancel the DBA permissions of a user, execute:

revoke dba from user_Name
Copy after login

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'
Copy after login

--Add the DBA permissions of the user_Name role

grant dba to user_Name
Copy after login

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.)

How to cancel dba permissions in oracle

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;
Copy after login

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;
Copy after login

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.

How to cancel dba permissions in oracle

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template