• SQL_Surfer (3/8/2013)


    I have a stored proc that gets executed by SQL login which has execute access to the schema owned by stored proc.

    Inside the stored proc, it has insert statement to another DB which this sql login doesn't have access to. How do I get around it?

    Third party app calls the stored proc.

    Thanks for your help.

    This constitutes a broken ownership chain. You can look into cross-database ownership chaining and the use of EXECUTE AS. You can also explore signing the procedure with a certificate that has access to all underlying resources.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato