Connect Salesforce to SQL Server: 2 Easy Methods

on Data Integration, ETL, Tutorials • August 2nd, 2021 • Write for Hevo

The added complexity involved in orchestrating an ETL pipeline is one of the most challenging aspects of Salesforce to SQL Server Integration. We come across this particular issue with a lot of clients who would like to integrate their SQL Server with Salesforce so that they can access and manipulate their Salesforce data in SQL Server for more advanced reporting.

Currently, both Salesforce and SQL Server do not provide a direct way of exporting objects from into SQL Server. This is why we decided to create this post and offer our solution so that we can help you to deal with this problem when you face it.

In this post, you will learn how to export data from Salesforce to SQL Server database table. 

Table of Contents

Introduction to Salesforce

Salesforce to SQL Server - Salesforce logo
Image Source

Salesforce is a hugely successful American cloud-based computing company. Since its inception in 1999, Salesforce has been a pioneer in cloud-based CRM services. Their platform eliminates the need for businesses to use software to manage their customer relationships. has a plethora of cloud-based applications developed to assist with Customer Relationship Management (CRM) for Sales, Contacts, Leads, Products, and other useful things. It is practically a mandatory tool for every company out there.

For further information on Salesforce, visit the official website here.

Introduction to SQL Server

Salesforce to SQL Server -  MS SQL server
Image Source

SQL Server, on the other hand, is a relational database management system developed for archiving and retrieving transactional data as requested by other applications. With the help of SQL Server, you can use create, retrieve, and update features to manage how information is organized and optimized. It supports the structured query language and comes with its own implementation of the SQL language which is known as the transact-sql (t-sql).

Moving Data from Salesforce to SQL Server

Method 1: Export Data from Salesforce to SQL Server using Export and Import Wizards

In this method, the ETL process is carried out. Data is transferred from Salesforce to SQL Server using the Salesforce Data Loader export wizard and the SQL Server import wizard. This method of connecting Salesforce to SQL Server has a few advantages and a few challenges as well.

Method 2: Using No-code Data Pipeline like Hevo

A fully managed, No-code Data Pipeline platform like Hevo Data, helps you load data from Salesforce (among 100+ Sources) to SQL Server in real-time, in an effortless manner for free. Hevo with its minimal learning curve can be set up in a matter of minutes making the users ready to load data without compromising performance.

Get Started with Hevo for Free

Its strong integration with various sources such as databases, files, analytics engines, etc gives users the flexibility to bring in data of all different kinds in a way that’s as smooth as possible, without having to write a single line of code.

In this post, you will learn how to move data from Salesforce to SQL Server using the Export and Import Wizards technique.


You would need the following:

  • Access to
  • A Salesforce account.
  • Have permission to write to the Salesforce output.
  • SQL Server running on your computer or in a cloud data warehouse account. Find the SQL server installation guide here.

Exporting Data from Salesforce to SQL Server

Below are the two possible methods to export data from Salesforce to SQL Server:

Method 1: Export Data from Salesforce to SQL Server using Export and Import Wizards

In this section of the blog post, you will learn how to ETL data from Salesforce to SQL Server using the Salesforce Data Loader export wizard and the SQL Server import wizard. This method consists of the following:

Step 1: Export object records into CSV files using the Data Loader export wizard

  1. Log in to your salesforce application.
  2. Go to setup.
  3. Under Administer select Data Management > Data loader.
  4. Choose the appropriate version for your computer and download the file.
    • Download Data Loader for Windows.
    • Download Data Loader for Mac.
  5. Double click the saved file to install it on your PC.
  6. Go through the installation prompts until the installation is complete.
  7. Launch the Salesforce Data Loader export wizard by double-clicking on the desktop icon.
  8. Click Export.
  9. Enter your Salesforce username and password, and click Log in.
  10. Once you’re logged in, click Next.
  11. Select the object you wish to export. For example, you can select the Leads object. To view an expanded view of all the objects available for export, select Show all objects
  12. Create the CSV file to export the data to and click Next.
  13. Create a SOQL (Salesforce Object Query Language) query for the data export. For example, for Lead data, you can select First Name, Last Name, Address, Email, Mobile, City, Lead Source, Lead Status, Campaign, Company, and Title in the query fields, and click Finish. As you follow the next steps, the CSV viewer displays all the lead names and the corresponding fields. 

Step 2: Import the CSV files in your SQL environment using the SQL Server import wizard.

  1. Log into your SQL database using the SQL Server Management Studio.
  2. Create a table in your database where you will be importing the CSV file containing all your data.
  3. Right-click on your database and select Tasks > Import Data.
  4. Click the Next > button.
  5. For the Data Source, select Flat File Source.
  6. Use the Browse button to select the CSV file. Here you can configure how you want the data to be imported. Once you’re done, click on the Next > button.
  7. For the Destination, select the correct database provider. For example, for SQL Server 2016, you can use SQL Server Native Client 11.0. Enter the Server name. Check the Use SQL Server Authentication radio button. Enter the User name, Password, and Database before clicking on the Next > button.
  8. On the Select Source Tables and Views window, you can Edit Mappings before clicking on the Next > button.
  9. Check the Run immediately checkbox and click the Next > button.
  10. Click on the Finish button to run the package.

There you have it. You now have a solid foundation on how to export data from Salesforce to SQL Server.

Limitations of Manually Exporting Data from Salesforce to SQL Server

There is one caveat to this method and that is that this method does not support bulk import and therefore if you have multiple CSV files you will have to load them one at a time. It also does not support automatic incremental updates since it’s a manual process.

Method 2: Using No-code Data Pipeline like Hevo

Hevo Logo.
Image Source: Self

Using Hevo Data would be a much superior alternative to this method since it’s able to automate this ETL process allowing your developers to focus on BI and not coding complex ETL pipelines.

Hevo Data’s Salesforce connector enables you to bring data into SQL Server from your account in real-time. Our modern cloud and big data integration platform are designed to deliver trusted data throughout your company. You can use it to map your Salesforce source to your SQL Server target and export data automatically.

Sign up here for a 14-Day Free Trial!

You can move data effortlessly with Hevo from Salesforce to SQL Server using the following steps:

Step 1: Authenticate and connect to your Salesforce account on the Hevo platform.

Salesforce to SQL Server - Hevo S1
Image Source

Step 2: Connect your SQL Server to Hevo and transfer data instantly and set up Salesforce to SQL Server Integration.

Salesforce to SQL Server - Hevo S2
Image Source

Other Highlights of Hevo:

  • Minimal Setup: Setting up Hevo does not require a lot of effort on your end as it is a fully managed and automated tool.
  • Simplicity: Hev is a very intuitive and easy-to-use tool. Using it for your data transfers ensures that it is done in just a few clicks.
  • Transformations: Hevo provides preload transformations through Python code. It also allows you to run transformation code for each event in the pipelines you set up. You need to edit the event object’s properties received in the transform method as a parameter to carry out the transformation. Hevo also offers drag and drop transformations like Date and Control Functions, JSON, and Event Manipulation to name a few. These can be configured and tested before putting them to use.
  • Connectors: Hevo supports 100+ integrations to SaaS platforms, files, databases, analytics, and BI tools. It supports various destinations including Google BigQuery, Amazon Redshift, Snowflake Data Warehouses; Amazon S3 Data Lakes; and MySQL, MongoDB, TokuDB, DynamoDB, PostgreSQL databases to name a few.  
  • Real-Time: Hevo has a real-time architecture that helps you move your data instantly and without delays. Thus, giving you the ability to gain real-time insights from your data
  • Reliable Data Load: Hevo’s fault-tolerant architecture ensures reliable and consistent data loads with minimal data loss.
  • Scalability: Hevo enables you to scale your data infrastructure as your needs grow because it is able to handle data from a wide variety of sources like analytics applications, databases, sales and marketing applications, etc. at any scale.

Do you want a hassle-free method of transferring your data without the drawbacks of manually writing code? Enter Hevo data. Sign up for a free trial today to simplify your data transfer process.


This article talks about the 2 simple methods you can use to transfer data from Salesforce to SQL Server. You can either connect them manually or a third-party tool like Hevo.

Hevo Data, a No-code Data Pipeline, helps you transfer data from 100+ data sources (Including 30+ Free Sources like Salesforce) in a fully automated and secure manner without having to write the code repeatedly.

Visit our Website to Explore Hevo

Hevo, with its strong integration with 100+ sources & BI tools, allows you to not only export & load data but also transform & enrich your data & make it analysis-ready in a jiff.

Want to take Hevo for a spin? Sign up here for the 14-day free trial and experience the feature-rich Hevo suite first hand. You can also have a look at our unbeatable pricing that will help you choose the right plan for your business needs!

How do you move your data from Salesforce to SQL Server? Let us know in the comments below.

No-code Data Pipeline for SQL Server