SSIS Transfer data ON INSERT

  • 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!

  • 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

  • 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!

  • SSIS is not the tool for this requirement. You'd better check out mirroring or replication.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Reccount in SSIS might be one way. with a global SSIS variable.

  • 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[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply