Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: truncate table priviledge
"Clarence" <ccheng4_at_csc.com> wrote in message
news:3BBC9AE4.EF4B4685_at_csc.com...
> Does anyone know if it's possible to grant another DB user the
> priviledge to truncate a table owned by my userID.
>
> I have granted SELECT, DELETE and UPDATE, but the other user cannot
> truncate the table.
>
> Clarence
>
>
Regrettably your user will need to have the delete any table privilege.
You may not want that.
You can resolve this by wrapping the truncate command in a stored procedure
owned by yourself and grant the other user execute privilege to that
procedure.
If you need to have details on writing the stored procedure (sp's don't
support DDL directly) you would need to post the version you are using.
In 8i and higher the only command you need in your sp is
execute immediate 'truncate table ... ';
Hth,
Sybrand Bakker, Senior Oracle DBA Received on Thu Oct 04 2001 - 13:08:52 CDT
![]() |
![]() |