I want a user to be able to truncate a table in another users schema. I have given this user ALTER priviledges on the table, but he still cannot TRUNCATE.
Is there any way I can give a user priviledges to TRUNCATE a table in another users schema?
can you try with
grant delete on schemaname.tablename to username? if you grant drop any table to the user, he will be able to drop all tables in any schema, which is not what you want, I guess.
I don't think you want to grant the user DROP ANY TABLE.
You can create a procedure (as table owner) that truncates the table, and grant execute on the procedure to the other user. The table owner needs CREATE TABLE privilege to execute this procedure, granted directly and not through a role. You can use dynamic SQL to truncate the table.
Bookmarks