[ORACLE] Insufficient permission to delete other user's partition table partition

I recently encountered this problem at work:

I have two oracle users in the official environment, one user is data, which is used for storing partition table data, and the other user is cde, which is used for writing stored procedures. Both users are using the same project.

In the development environment, the cde user has sysdba permissions, so the debugging has always been successful in the development environment.

But in a formal environment, there are cups.

The project is like this. The partition table is created on the data user, the stored procedure is written on the cde user, and then the cde stored procedure deletes the partition of the data partition table. At this time, an error of insufficient permissions will be reported.

I have tried giving the cde user dba permission in the official environment, but the statement to delete the partition table partition is separate.

alter table  'tablename' drop partition 'partitionname';

It can be executed, but it still reports an error in the stored procedure.

The reason is because in addition to the dba permission, there is still one less drop any table permission

grant drop any table to 'user_name';

In this way, the partition can be deleted, but this permission must be used with caution

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325767009&siteId=291194637
Recommended