'Execute as' in trigger

  • We have table 'customers' in database 'CoreSystems'.

    There is an insert trigger on customers that inserts the data in 'clientsystems'.

    In stead of giving access to the accounts that can insert into the customers table, goal is to insert into clientsystems under a specific 'triggeruser' domain account (don't ask me why).

    Is it possible to use 'Execute as ' to run the trigger and perform specific actions?

    Thanks,

    Nikki

  • A trigger mat have an EXECUTE AS statement per books online. However have you considered using a certificate signed sproc instead.

    Check out:

    http://www.sqlservercentral.com/articles/Security/68873/

    You could also use service broker.

    CEWII

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

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