标签归档:update user$ ORA-01031

update user$报ORA-01031错误

在oracle的有些版本中,为了安全不允许用户直接update USER$表

[oracle@dbserver1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Apr 11 12:51:55 2023
Version 19.16.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.16.0.0.0

SQL> UPDATE USER$ SET NAME='XFF' WHERE NAME='XIFENFEI';
UPDATE USER$ SET NAME='XFF' WHERE NAME='XIFENFEI'
       *
ERROR at line 1:
ORA-01031: insufficient privileges


SQL> show user; 
USER is "SYS"
SQL> create table t_user$ as select * from user$;

Table created.

SQL> UPDATE USER$ SET NAME='XFF' WHERE NAME='XIFENFEI';
UPDATE USER$ SET NAME='XFF' WHERE NAME='XIFENFEI'
       *
ERROR at line 1:
ORA-01031: insufficient privileges


SQL> create user test identified by oracle;

User created.

SQL> grant dba to test;

Grant succeeded.

SQL> conn test/oracle
Connected.

SQL> update sys.user$ SET NAME='XFF' WHERE NAME='XIFENFEI';
update sys.user$ SET NAME='XFF' WHERE NAME='XIFENFEI'
           *
ERROR at line 1:
ORA-01031: insufficient privileges

官方说明:CANNOT UPDATE SYS.USER$ AS SYS AFTER APPLYING OCTOBER 2020 PSU/RU, ORA-01031 IS OBTAINED (Doc ID 2746319.1)

发表在 Oracle | 标签为 | 评论关闭