SPROC with Truncate TABLEfailing on Authority

  • I have a SPROC that determines if a delete (with criteria) or a Truncate table should be used on an import table. I would prefer to use truncate because of quickness of command and not impacting the transaction log.

    When I execute the sproc from my external application I receive an Authority exception when the logic directs to the Truncate Table statement.

    Note: The authority issue does not occur for a delete without criteria.

    The user has been given explicit execute permission for the SPROC.

    Normally a user can execute a SPROC that performs actions that the userID can not perform independently.

    For a DDL type of command (TRUNCATE TABLE) does the user require specific permission?

    thanks

    Daryl

  • TRUNCATE TABLE defaulted to a table owner.

    You can use EXECUTE AS in SPROC.

  • That worked to a 'T'.

    thanks!

    Daryl

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply