ORA-1031 On TRUNCATE TABLE Even If Granted DELETE ANY TABLE
(Doc ID 205297.1)
Last updated on FEBRUARY 01, 2022
Applies to:Oracle Database - Enterprise Edition - Version 220.127.116.11 to 18.104.22.168 [Release 7.0 to 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.
You are a user (say SYSTEM) which has been granted the DBA role.
You create a table and would like userA (say U1) to be able to truncate that table.
You grant 'delete any table' to the user as stated in the documentation.
However userA still cannot truncate the table and receives ORA-01031 error:
SQL> create table t1(n number);
SQL> insert into t1 values(101);
1 row created.
SQL> grant connect to <username> identified by <password>;
SQL> grant delete any table to <username>;
SQL> connect <username>/<password>
SQL> truncate table system.t1;
truncate table system.t1
ERROR at line 1:
ORA-01031: insufficient privileges
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!