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 |
|
Moyk
Starting Member
2 Posts |
Posted - 2008-01-31 : 07:32:46
|
| Hi AllAs a noob please forgive me if I'm posting this in the wrong place.I have two SQL2000 servers. There is a table on server A that gets updated with new rows automatically by an overnight DTS job.A little later, a job runs on server B to pull the updated copy across to be used by another application. If the table on server A gets emptied for some reason, I'd like to not copy it across so there is some data on Server B, albeit one day out.What I'd like is some form of checkpoint that says:If the table on Server A is empty, don't copy the contents to Server B (as this will result in an empty table on Server B thus killing two apps.)I've thought of doing a count of Server A.table and if it is zero then halt. Am I in tree/barking/wrong territory? |
|
|
pravin14u
Posting Yak Master
246 Posts |
Posted - 2008-01-31 : 08:27:35
|
| In the DTS package, add a new ActiveX script task before the transformation task(which takes data from A to B) which has a ON SUCCESS to the tranformation task1. The ActiveX task should FAIl and end the package if the rows count of ServerA.table is 0 ELSE it should return SUCESSS(and hence loading the data).Is this what you need? |
 |
|
|
Moyk
Starting Member
2 Posts |
Posted - 2008-01-31 : 09:06:39
|
| I'll give it a try - thanks for the suggestion! |
 |
|
|
|
|
|