SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to Insert the new rows from SourceTable to DestinationTable table Using SSIS from two different...


How to Insert the new rows from SourceTable to DestinationTable table Using SSIS from two different servers

Author
Message
santoooo
santoooo
SSC-Enthusiastic
SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)

Group: General Forum Members
Points: 171 Visits: 253
Dear Gurus,

My requirement in to import the new rows from source database to destination database which are in two different servers.

Can anyone please help me in this. how to import.

For example
--------------
Source.
--------------
Select * from Server1.db1.dbo.table1

Pk_Column Column1 Column2
----------- ---------- -----------
1 Value1 Value2
2 Value3 Value4
3 Value4 Value5


Destination
-------------
Select * from Server2.db1.dbo.table1

Pk_Column Column1 Column2
----------- ---------- -----------
1 Value1 Value2


Now i want to insert the two new rows(pk_Column: 2,3) from Source to destination. using SSIS package.

I have to schedule the SSIS package.. for every day end..

please help me in this.

Thank you.
Jack Corbett
  Jack Corbett
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18414 Visits: 14894
You have a couple of options.

One is to use a Lookup transform where you send the "error rows" (rows where a match is not found) on to the Destination Component. You would need to Configure the error mode to redirect row.

The other, which will usually perform better is to insert all the rows into a staging table in the same database and then do a Left Outer Join on the destination.



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
santoooo
santoooo
SSC-Enthusiastic
SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)

Group: General Forum Members
Points: 171 Visits: 253
HI Jack Corbett,

Thank you for ur reply,

ok I will try with the loopup transform.

Could you please send me the test package using Lookup transform.

thank you.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search