ORA-1031 On TRUNCATE TABLE Even If Granted DELETE ANY TABLE (Doc ID 205297.1)

Last updated on NOVEMBER 03, 2015

Applies to:

Oracle Database - Enterprise Edition - Version 7.0.16.0 to 11.2.0.3 [Release 7.0 to 11.2]
Information in this document applies to any platform.
Checked for relevance on 15-MAR-2013


Symptoms

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);
Table created.

SQL> insert into t1 values(101);
1 row created.

SQL> commit;
Commit complete.

SQL> grant connect to u1 identified by u1;
Grant succeeded.

SQL> grant delete any table to u1;
Grant succeeded.

SQL> connect u1/u1
Connected.

SQL> truncate table system.t1;
truncate table system.t1
*
ERROR at line 1:
ORA-01031: insufficient privileges

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms