Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create a SSIS Package - To Copy data from Oracle to SQL Server

I want to write a SSIS Package for copying data from oracle to MS Sql server. and also the condition is, What are the data has to be moved from oracle to SQL will be known by selecting a table in SQL. Basically Table1.Column1 in SQL server has to be filled from oracle if the value is not there in that table in SQL Server. we have also have common column value in that table to map the record with sql server and oracle. so to do this i have planned to do it in SSIS Package.

Can any one explan me in detail how to create a SSIS Package for the above said scenario.

Thank you in advance for your help.

like image 744
Badri Prasad Avatar asked Jun 08 '12 07:06

Badri Prasad


People also ask

How do I copy a SSIs package to another project?

In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package that you want to copy. In Solution Explorer, double-click the package. Verify either the package to copy is selected in Solution Explorer or the tab in SSIS Designer that contains the package is the active tab

How do I create a SSIs package in SQL Server?

Launch BIDS from the SQL Server program group; select File, Open, File from the menu and navigate to the folder where you saved the SSIS package and open it. The following is an example of the SSIS package that is generated: The Preparation tasks each create a group of tables in the Oracle database.

How to transfer data from SQL Server to oracle using SSIs?

The Data Flow tasks copy the data from a group of SQL Server tables to the Oracle tables. You can add whatever kind on logic you need to the SSIS package that gets generated. Back on the Column Mappings dialog I clicked Drop and re-create destination table for the Album table.

How to copy data from one table to another in Oracle?

On successful connection with the oracle server, it will proceed to the next screen Select Destination as SQL Server Native Client, Server Name, SQL Server Credential and Database. Click Next. From the next screen select “Copy data from one or more tables or views” and click on Next.


2 Answers

You should use Lookup to join the common column( same data type) of SQL server and Oracle and retrieve the values from Oracle which does not have a matching record in SQL server.

Design Design

1.Using SSIS 2005

  1. Drag a OleDB Source and point to your Oracle Database and select the table .
  2. Drag a lookup and select the SQL Server connection and point to its table .
  3. In columns tab join the common column and select the columns in the right hand side which you need to retrieve . Lookup
  4. Click on Configure Error output and select redirect row for the join column . Lookup
  5. Drag a Oledb Command and connect it to the error output from the lookup. 6.Write an insert statement in Oledb Command OledbOledb

2.If you are using SSIS 2008 then no need to configure the Error Output in lookup .Just drag the no match output from Lookup to SQL Server destination.

like image 174
praveen Avatar answered Sep 29 '22 09:09

praveen


I suggest this implementation.

I have used praveen's solution, but sometimes it may not be the best. Specially as the number if records on the destination grows. Also, it doesn't deal with "updates"

like image 38
Diego Avatar answered Sep 29 '22 08:09

Diego