ORA-01031:Oracle中的权限不足



我在Windows服务器中使用Oracle,我已被授予DBA角色,现在我正尝试使用解锁用户帐户

ALTER USER user_account ACCOUNT UNLOCK;

我得到这个错误:

SQL Error: ORA-01031: insufficient privileges
01031. 00000 -  "insufficient privileges"
*Cause:    An attempt was made to change the current username or password
without the appropriate privilege. This error also occurs if
attempting to install a database without the necessary operating
system privileges.
When Trusted Oracle is configure in DBMS MAC, this error may occur
if the user was granted the necessary privilege at a higher label
than the current login.

我不知道为什么!知道DBA角色可以改变用户!

那么,是什么导致了这个错误呢?

默认情况下,DBA具有更改其他用户的权限。我怎么知道?
SQL> select * from dba_sys_privs where grantee = 'DBA' order by privilege;
GRANTEE                        PRIVILEGE                                ADM
------------------------------ ---------------------------------------- ---
DBA                            ADMINISTER ANY SQL TUNING SET            YES
DBA                            ADMINISTER DATABASE TRIGGER              YES
DBA                            ADMINISTER RESOURCE MANAGER              YES
<snip>
DBA                            ALTER USER                               YES    --> this
DBA                            ANALYZE ANY                              YES
DBA                            ANALYZE ANY DICTIONARY                   YES
<snip>

因此,要么您的用户没有被授予DBA角色,要么有人从中删除了ALTER USER

最新更新