Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Truncate another users table
(Cleaning up.....got bounced for over quoting)
In my last post, I said:
Oh, I absolutely agree it's a bad idea, no doubt about that.
=20
I don't see any good solution outside of the PL/SQL wrapper
and execute immediate, which the original poster already=20
pointed out won't work for him.
Ok, I just thought of this....
You'll have to tolerate the user having the DROP ANY TABLE privilege. I don't see any way around that. =20
What you're trying to do will work if you do this as user_a: alter session set current_schema=3Duser_b; truncate table truncate_me;
The preceding will truncate a table called truncate_me owned by user_b, if user_a has DROP ANY TABLE priv.
Hope that helps,
-Mark
Dick Goulet said:
> > OK, I stand corrected. But this is even more scary having=20
> a user with
> > the DROP ANY TABLE privilege. The best option them would=20
> be to build
> > the table in the users schema & forget the synonym all together.=20
Mark Bobak said:
> > Not true. Truncate on a table not owned by you requires DROP=20
> > ANY TABLE.
> >=20
Dick Goulet said:
> > > Well you could grant the user delete priviledges on the=20
> > table. If you
> > > can delete from it you can truncate it.=20
-- http://www.freelists.org/webpage/oracle-lReceived on Fri Dec 03 2004 - 14:37:03 CST
![]() |
![]() |