Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSIS Transfer data ON INSERT Expand / Collapse
Author
Message
Posted Thursday, December 27, 2012 12:35 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, December 31, 2012 2:37 PM
Points: 33, Visits: 68
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!
Post #1400726
Posted Thursday, December 27, 2012 1:29 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 7:50 AM
Points: 1,234, Visits: 1,273
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
Post #1400736
Posted Thursday, December 27, 2012 1:41 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, December 31, 2012 2:37 PM
Points: 33, Visits: 68
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!
Post #1400740
Posted Thursday, December 27, 2012 11:30 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: 2 days ago @ 12:52 PM
Points: 13,636, Visits: 11,509
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 LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1400801
Posted Monday, December 31, 2012 5:12 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, October 28, 2014 8:21 AM
Points: 2, Visits: 31
Reccount in SSIS might be one way. with a global SSIS variable.
Post #1401359
Posted Monday, December 31, 2012 12:54 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Monday, December 15, 2014 2:26 PM
Points: 5,466, Visits: 7,647
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
Post #1401485
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse