Data migration from Access to SQL Server using SSIS Upsert Destination

Introduction

Access to SQL ServerIn our previous blog, we saw how to export a REST API to MS Access using a VBA Command Button. In this post, we will look at a specific example of data migration from Access to SQL Server using the SSIS Upsert Destination (Insert, Update, Delete), along with a few other topics, such as how to create a table using the Upsert Destination. How to read all the customer data from the MS Access Table and merge it into the SQL Server.

We will go through the steps to read data from Access and load it into SQL Server.

In a nutshell, this post explains how to read data from an Access table in SSIS.

So let’s get started.

Requirements

  1. First, you will need to have SSIS installed
  2. Secondly, make sure to have SSDT
  3. Thirdly, do not forget to install ZappySys SSIS PowerPack
  4. Finally, make sure that Microsoft Access is installed.

How to read MS Access table data and migrate that data to a SQL Server table.

Let´s start with an example. In this article, we will see Data migration from Access to SQL Server.

  1. First of all, drag and drop the Data Flow Task from the SSIS Toolbox and double-click it to edit.

    Drag and Drop SSIS Data Flow Task from SSIS Toolbox

  2. Furthermore, drag and drop the OLE DB Source.

    OLE DB Source – Drag and Drop

  3. Double-click the OLE DB Source to configure it. Click New Connection, configure the connection as shown below to connect to the Access database, and click OK.

    OLE DB Access Connection

  4. Now, in the OLE DB Source, set the mode to Table or View, and select Preview to view the table data.

    OLE DB Source Preview

  5. Now drag and drop Upsert Destination (Insert, Update, Delete), and create a connection to a SQL Server Database.

    Upsert Destination SQL Server Connection

  6. Click the New Table button in the Target Table, change the table name, and click OK to create the table in SQL Server.

    Upsert Destination Create Table

  7. Now select Action as Sync and check all the checkboxes: Insert, Update, and Delete from the target if not found in the source. Map all the columns and select the Key field(s) and click on OK.

    Upsert Destination Configuration

  8. That’s it, we are ready to migrate the MS Access table data into the SQL Server Table. Execute the package, and it will migrate the data.

    Upsert Destination (Insert, Update, Delete)

Conclusion

In this article, we show how to read data from an MS Access table and migrate it to a SQL Server table using SSIS. We show how to connect to MS Access using an OLE DB Source. Also, we show how to write Sync Insert, Update, and Delete in the target if not found in the Source Using ZS Upsert Destination. If you liked this article and want to try it, you can download the SSIS PowerPack here (includes 70+ Components).

References

Posted in SSIS Upsert Destination and tagged , , , .