September 8, 2008 at 12:18 pm
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
September 8, 2008 at 12:23 pm
TRUNCATE TABLE defaulted to a table owner.
You can use EXECUTE AS in SPROC.
September 8, 2008 at 2:10 pm
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