Priviledges to TRUNCATE a table
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Priviledges to TRUNCATE a table

  1. #1
    Join Date
    Feb 2000
    Location
    Alexandria, VA, 22314
    Posts
    41
    Hi,

    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?

    keith

  2. #2
    Join Date
    Feb 2001
    Posts
    83

    Cool privilege to truncate


    U can use

    Grant drop any table to username;

    So that , the user can truncate other schema tables

    with regards
    prasy
    with regards
    Prasanna S

  3. #3
    Join Date
    Feb 2000
    Location
    New York,U.S.A.
    Posts
    245
    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.

  4. #4
    Join Date
    Jun 2000
    Posts
    295
    grant delete, I am sure, will not work since
    truncate is ddl instead of dml.

  5. #5
    Join Date
    Jul 2000
    Posts
    296
    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.

    [Edited by akkerend on 02-07-2001 at 05:27 PM]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width