Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS Transfer data ON INSERT


SSIS Transfer data ON INSERT

Author
Message
shank-130731
shank-130731
SSC Rookie
SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)

Group: General Forum Members
Points: 35 Visits: 74
I have 2 SQL servers: SQL_Local and SQL_Remote. I have SSIS on SQL_Local. I want to transfer records from SQL_Remote.Customers into SQL_Local.UPS only when a record is inserted into SQL_Remote.Customers.

In SSIS, the only DataSource options I see are a table or a view. I created a view on SQL_Remote and mapped to SQL_Local.UPS - no problem.

My problem is how do I trigger the local SSIS package to transfer the most recent record inserted into SQL_Remote.Customers?

In my mind, the most practical way is to create a data source created on a trigger for table SQL_Remote.Customers, but I don't see how to create that datasource in SSIS either.

Am I approaching this all wrong?

Thanks!
robert.gerald.taylor
robert.gerald.taylor
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1319 Visits: 1398
shank-130731 (12/27/2012)
I have 2 SQL servers: SQL_Local and SQL_Remote. I have SSIS on SQL_Local. I want to transfer records from SQL_Remote.Customers into SQL_Local.UPS only when a record is inserted into SQL_Remote.Customers.

In SSIS, the only DataSource options I see are a table or a view. I created a view on SQL_Remote and mapped to SQL_Local.UPS - no problem.

My problem is how do I trigger the local SSIS package to transfer the most recent record inserted into SQL_Remote.Customers?

In my mind, the most practical way is to create a data source created on a trigger for table SQL_Remote.Customers, but I don't see how to create that datasource in SSIS either.

Your datasource can also be a SELECT statement -- this is probably how I bring 95% of my data from the source (as opposed to a view or table).

It depends upon how fresh you need the copy of the data on the SQL local server to be. If updating once a day is okay, I'd just schedule a SQL Agent job each night to run the SSIS package to bring over the new records. If you need it hourly have it run hourly -- of course this also depends upon how long it takes to bring over those new records. (If it takes two hours to bring over the new records, then an hourly update probably wouldn't be the way to go)

I hope that helps a little,
Rob
shank-130731
shank-130731
SSC Rookie
SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)

Group: General Forum Members
Points: 35 Visits: 74
Transferring on time would not be a good solution. I thought of that one. Problem is when a record is inserted I may need it in the local table within 1 minute. On the flip side, there may not be any records for a period of hours.

My datasource is a SELECT on the table of thousands of records. However, I only need the record from INSERTED when a record is inserted into SQL_Remote.Customers. I'm just not seeing how to get that record.

Is there a way in SSIS, on the local server, to detect when a record is inserted in the remote server table SQL_Remote.Customers?

thanks!
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16356 Visits: 13199
SSIS is not the tool for this requirement. You'd better check out mirroring or replication.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
curtisc5105
curtisc5105
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 50
Reccount in SSIS might be one way. with a global SSIS variable.
Evil Kraig F
Evil Kraig F
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5681 Visits: 7660
I have to agree with Koen here. The correct answer here is not SSIS, it's replication, log shipping, or mirroring. SSIS is point in time upkeep on large data sets for transformations. It's not meant for continuous data transfer.


- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
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