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!

Help with truncating a table using plsql procedure in different schema

692904Mar 25 2009 — edited Mar 26 2009
I have a plsql procedure in schema A that truncates a table that is given in as parameter.

create or replace procedure truncate_table(schema, table_name)
EXECUTE IMMEDIATE 'TRUNCATE TABLE '||schema||'.'||table_name;
end;

The above procedure has public execute grant.

I need to truncate a table in schema B. I have a plsql procedure in schema B that calls the truncate_table procedure and passes in the schema B table name.
Since the table is in schema B, should the delete grant on the table be given to user A or user B to truncate the table in schema B?
Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 23 2009
Added on Mar 25 2009
3 comments
576 views