Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

truncate table in a different schema

sgonos-OracleJul 23 2010 — edited Jul 25 2010
I've read that you need to grant DROP ANY TABLE priv to the user. I do this, and still can not
truncate the table UNLESS... I qualify it with the SCHEMA name .

I am running Oracle 11 Rel 1 Linux.

create user MAINT .....

grant DROP ANY TABLE TO MAINT ...
gran succeeded.

The table is in MATT schema

I create a synonym on the table
create public synonym TABLE_ONE for MATT.table1;
synonym created.

back to MAINT account --
truncate table TABLE_ONE ... ORA-00942 table or view does not exist.

BUT truncate table MATT.TABLE_ONE will truncate.

I really don't want to have to specify the schema name which is what
I thought the synonym would give me.

What else am I missing here on the privs and the truncate command?

Yes, it's dangerous, so I don't want to give MAINT dba privs, cause that will work.
but the Grant doesn't seem to be doing it either.

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 22 2010
Added on Jul 23 2010
4 comments
7,260 views