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

Error creating linked server

I'm having trouble creating my linked server. I get the following message:

TITLE: Microsoft SQL Server Management Studio
------------------------------

The linked server has been created but failed a connection test. Do you want to keep the linked server?

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

Cannot initialize the data source object of OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE".
OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE" returned message "Error 1 : LOGIN_MUST_USE_SECURITY_TOKEN: Invalid username, password, security token; or user locked out. Are you at a new location? When accessing Salesforce--either via a desktop client or the API--from outside of your company’s trusted networks, you must add a security token to your password to log in. To receive a new security token, log in to salesforce.com at http://login.salesforce.com and click Setup | My Personal Information | Reset Security Token.". (Microsoft SQL Server, Error: 7303)

For help, click: http://go.microsoft.com/fwlink?ProdNa...

------------------------------
BUTTONS:

&Yes
&No
------------------------------
2 people have
this problem
+1
Reply
  • Because the SQL Server IP address is not in the Security whitelist on salesforce, salesforce is requiring you to add a security token to the end of the password.

    If you do not know the security token for the sf userid you are using then you must ask salesforce for a new one using the instructions in the error message. Note that the new security token will be emailed to the address of the sf user.

    Once you get that value, append it to the end of the password when entering the credentials for the linked server.

    Alternatively, you can ask your salesforce admin to add the IP address to the whitelist on salesforce.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned

  • My cluster has several IP addresses. What one should I add to the whitelist?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned

  • If the salesforce server gets a request from an IP address that is not in the whitelist then the request is denied.

    Therefore, add all possible IP addresses that could originate a request to the salesforce api. If DBAmp is installed on multiple nodes, then the request could originate from any node. Of course, the IP address salesforce cares about is the internet facing IP address. If all the nodes are on the same subnet internally, then it might be possible that they all have the same outbound, internet facing IP address.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned