SQL Server Linked Server ODBC connection to Salesforce from Management Studio

SQL Server Linked Server ODBC connection to Salesforce from Management Studio

Posted on April 24, 2013 0 Comments

SQL Server shops run their businesses on DataDirect Connect64 for ODBC drivers using Linked Server to federate data against sources such as DB2, Oracle, Sybase, Postgres, Informix and Progress OpenEdge.  With new applications running in the cloud such as Salesforce.com and force.com; shops are now looking to make that real-time connection using the trusted DataDirect Connect XE for ODBC Salesforce drivers.

What else does Salesforce ODBC bring to SQL Server shops ?

The DataDirect Connect XE for ODBC Salesforce driver makes Salesforce.com look and feel like another SQL Server instance.  But what does it mean to you?

  • Direct SQL-92 connections to Salesforce.com enables operational and self service intelligence without physically moving the data for one version of the truth.
  • Applications built on MSSQL can read/write Salesforce data in real time including support for insert, update, and delete.
  • From the Microsoft BI stack, you can leverage SQL Server Reporting Services (SSRS) for real-time direct connectivity without landing data in SQL Server first; and leverage the capabilities of SQL Server Integration Services (SSIS) including bulk load into Salesforce.com using DataDirect's codeless bulk load.
  • Connect Microsoft Access and Microsoft Excel users direct to Salesforce while preserving the Salesforce.com user security roles.
  • Direct access will simplify your organization's compliance and data governance strategies.

Everything you need to know about SQL Server linked server to Salesforce.com

1. Download and install the 15 day trial of the latest 32-bit or 64-bit DataDirect Connect XE for ODBC Salesforce driver for Microsoft Windows which supports the latest Salesforce.com API versions across the sales cloud, service cloud, database.com and force.com.  If the SQL Server database is 32-bit, install the 32-bit ODBC drivers; and if the SQL Server database is 64-bit, install 64-bit ODBC drivers.

2. Create a system ODBC data source to Salesforce.com named "Salesforce" (for purpose of tutorial).

3. [Optional] In the advanced tab, expose audit columns by setting "Config Options" with the following values, "AuditColumns=All;MapSystemColumnNames=0"

4. [Optional] In the general tab, set database property to a directory where local schema files can be written.  For example: C:\temp\sumit.sandbox2 where "C:\temp" is the directory and "sumit.sandbox2" is the user name without domain.

5. [Optional] On workstations, it is recommended to run in SQL Engine Mode of "1-Server".

  • Configure Salesforce ODBC data source and click configure and go to the “SQL Engine” tab and change SQL Engine Mode to “1- Server”.

Configure Salesforce ODBC

  • Click Edit Server Settings and click “Start” button to launch the Salesforce Service.  The button label will change to "Stop" meaning the service has started.

Configure Salesforce ODBC

6. Launch SQL Server Management Studio 2012 (tutorial also applies to 2005, 2008, and 2008 R2).  If using the SQL Server Remote Client, make sure to install the drivers on the database server.

7. Navigate to Instance > Server Objects > Linked Servers

8. Right Click and Select "New Linked Server"

  • Select provider as "Microsoft OLE DB Provider for ODBC Drivers"
  • Select Product name as "DataDirect"
  • Enter Data Source name created in step #2 above as "Salesforce"

SQL Server Linked Server to Salesforce

9. Click on the "Security" page and select "Be made using this security context" and enter the Salesforce username and password.  Remember to append security token to password if not already configured in data source.

SQL Server Linked Server to Salesforce


10. Navigate to linked server named "Salesforce" and expand objects to see  a list of tables.  You can create new query and execute using openquery syntax or 4 part naming.  I recommend openquery for faster performance, "select * from openquery(SALESFORCE,'SELECT ID,NAME FROM ACCOUNT')

Real-time Salesfoce query from SQL Server


  • For reference, here is: Server Objects > Linked Servers > Providers > MSDASQL > Properties

Salesforce ODBC Linked Server Configuration

  • For reference, here is: Server Objects > Linked Servers > Salesforce > Properties

Salesforce ODBC Linked Server Configuration

Have questions?

Post a blog comment or call 1-800-876-3101 to speak with a Systems Engineer to learn how other organizations are connecting Microsoft technologies with Salesforce.

Want to give our driver a try? Try it for free for 15 days and get the most out of Salesforce.com.

Try Now

Sumit Sakar

Sumit Sarkar

Technology researcher, thought leader and speaker working to enable enterprises to rapidly adopt new technologies that are adaptive, connected and cognitive. Sumit has been working in the data access infrastructure field for over 10 years servicing web/mobile developers, data engineers and data scientists. His primary areas of focus include cross platform app development, serverless architectures, and hybrid enterprise data management that supports open standards such as ODBC, JDBC, ADO.NET, GraphQL, OData/REST. He has presented dozens of technology sessions at conferences such as Dreamforce, Oracle OpenWorld, Strata Hadoop World, API World, Microstrategy World, MongoDB World, etc.


Comments are disabled in preview mode.

Sitefinity Training and Certification Now Available.

Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.

Learn More
Latest Stories
in Your Inbox

Subscribe to get all the news, info and tutorials you need to build better business apps and sites

Loading animation