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

Trend Rolling Table Expand / Collapse
Author
Message
Posted Thursday, December 6, 2012 9:52 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, August 25, 2014 12:38 PM
Points: 1,155, Visits: 548
Development has created 7 day rolling tables on multiple servers. I want to pull this data over to another table so I can trend daily averages over a few months. The rolling table is populated throughout the day meaning data is added/removed every few minutes. What would be the best method to copy this data to my table without missing or creating duplicate rows?
Post #1393624
Posted Friday, December 7, 2012 6:50 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, August 25, 2014 12:38 PM
Points: 1,155, Visits: 548
Debating on using replication or SSIS Lookup.
Post #1394292
Posted Friday, December 7, 2012 7:37 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 9:58 AM
Points: 36,995, Visits: 31,517
Erin-489205 (12/6/2012)
Development has created 7 day rolling tables on multiple servers. I want to pull this data over to another table so I can trend daily averages over a few months. The rolling table is populated throughout the day meaning data is added/removed every few minutes. What would be the best method to copy this data to my table without missing or creating duplicate rows?


Step 1 would be to find out how they are deleting the data so you can intercept it.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1394298
Posted Monday, December 10, 2012 4:17 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, August 29, 2014 2:25 PM
Points: 2,044, Visits: 3,059
Replication could be problematic as SQL will replicate the DELETEs as well as the INSERTs.

Also, do you need to capture UPDATE activity or just INSERTs?

Finally, are you on Enterprise or Standard Edition?

CDC could work well for this if you are on Ent Ed (unfortunately, CDC is not available on Std Ed).


SQL DBA,SQL Server MVP('07, '08, '09)
"In America, every man is innocent until proven broke!" Brant Parker
Post #1394811
Posted Tuesday, December 11, 2012 11:02 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, August 25, 2014 12:38 PM
Points: 1,155, Visits: 548
SSIS lookup is working well.
Post #1395248
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse