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

Issue with SF_REPLICATE - The remote server returned an error: (400) Bad Request.

I am having an unusual issue with SF_REPLICATE...

Executing this command:

EXEC SF_Replicate 'SALESFORCE', 'Campaign'

Generates this error:

--- Starting SF_Replicate for Campaign V3.7.3
14:08:16: Parameters: SALESFORCE Campaign Version: V3.7.3
14:08:16: Drop Campaign_Previous20190222T140816820 if it exists.
14:08:16: Create Campaign_Previous20190222T140816820 with new structure.
14:08:17: DBAmpNet2 (c) Copyright 2015-2017 LLC
14:08:17: Parameters: replicate Campaign_Previous20190222T140816820 WRTL1ABD SSE_Backup SALESFORCE
14:08:18: Error: System.Net.WebException: The remote server returned an error: (400) Bad Request.
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at DBAmpNet2.sforce.SforceService.describeSObject(String sObjectType)
at DBAmpNet2.SFDataLayer3.GetSchema(String objName)
at DBAmpNet2.SFDataLayer3.GetColumnNamesAndRunQuery(String[]& theColNames, Boolean& bNoRowsInQuery)
at DBAmpNet2.ReplicateSOAP.Run()
at DBAmpNet2.Program.Main(String[] args)
14:08:18: DBAmpNet2 Operation FAILED.
14:08:20: Error: Replicate program was unsuccessful.
14:08:20: Error: Command string is C:\"Program Files"\DBAmp\DBAmpNet2.exe Exportsoap "Replicate" "Campaign_Previous20190222T140816820" "WRTL1ABD" "SSE_Backup" "SALESFORCE"
--- Ending SF_Replicate. Operation FAILED.
Msg 50000, Level 16, State 1, Procedure SF_Replicate, Line 383
--- Ending SF_Replicate. Operation FAILED.

I have confirmed the linked server SALESFORCE is working properly... For example, “select * from SALESFORCE...Organization” does return the appropriate data. I can do this with most any object.

However... In the past, I have used “select * from SALESFORCE..sys_sfobjects” to retrieve a list of salesforce objects. If I run that, I get an error:

Msg 208, Level 16, State 1, Line 1
Invalid object name 'SALESFORCE..sys_sfobjects'.

I am suspecting these might be related issues?

Robert Vivrette
Senior Data Migration Consultant
1 person has
this question