Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Changing all DBAmp Stored Procs with Execute as Owner


Our DBAs have setup a new SQL server environment that is connecting to a new Salesforce sandbox. All the local tables are under the dbo schema.

However, when I run the command "EXEC SF_Replicate 'SALESFORCE','Account_Plan__c' I get the below error message.

--- Starting SF_Replicate for Account_Plan__c V3.3.5
16:20:45: Parameters: SALESFORCE Account_Plan__c Version: V3.3.5
16:20:45: Drop Account_Plan__c_Previous if it exists.
16:20:45: Create Account_Plan__c_Previous with new structure.
16:20:45: Error: Salesforce table does not exist: Account_Plan__c
16:20:45: Error: CREATE TABLE permission denied in database 'SAMDB_FullLight_Demo'.
--- Ending SF_Replicate. Operation FAILED.
Msg 50000, Level 16, State 1, Procedure SF_Replicate, Line 340
--- Ending SF_Replicate. Operation FAILED.

One of our IT team member mentioned that all the DBAmp owned stored procedures that are starting with SF_ needs to be modified by including the 'Execute as Owner'. I checked one of the working DB and I could see that 'Execute as Owner' is included in the stored procs. Is there a way to include the 'Execute as Owner' on all DBAmp owned stored procedures in one shot? We don't want to change one by one.

1 person has
this question