Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-07-30 : 08:00:38
|
| Rajeev writes "We have 3 servers production/reports and BackupThe production and reports are sybase server. Backup is a sql server. The reports contains a replica copy of the production. There sql jobs which run on backup Sql server thru ODBC connection which extract data from sybase reports to SQL. The problem what we face is if the data is not replicated on reports we get duplicate data on the backup. Is there a way in which we can control the job based on date. if there is no change in the date the date job is not run.we can use if clause and branch out as if(select abc.date as new from abc whereabc.xyz=1 and abc.qwe=20)<>(select abc1.date as old from abc1 whereabc1.xyz1=1 and abc1.qwe1=20)USE msdbEXEC sp_start_job @job_name = 'updt' @step_name ='step3'elseUSE msdbEXEC sp_stop_job @job_name = 'updt' regardsrajeev" |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-07-30 : 10:49:21
|
| Personally?I'd have a batchWindow table.Then I'd have a date added and a date updated column on every data row.I'd close the batch window with the datetime of the synch processGet all the rows between the previous window close and this window closeInsert them in the sql server tableand do the same for the updates (just update rather than insert)Either check history tables or have a logical delete date to perfomr deletes in the same manner..Brett8-) |
 |
|
|
|
|
|