This is a discussion on Data update within the SQL Server forums, part of the Microsoft SQL Server category; --> Hello all, I'm new in this newsgroup and I apologise if my question has already done. Let me knwo ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello all, I'm new in this newsgroup and I apologise if my question has already done. Let me knwo if FAQ is avaible somewhere. I use msSQL server to manage data for a B2B portal. Orginal data comes from as400 db2. I need to update msSQL data from db2 source. I used MetaDataService executed by SQL server Agent, but dosn't work as excepted 'cause I need to delete all row in a table and then copy all new rows, this works fine but what happen if an user is quering data while sql agent starts? I need to make data update very often so I need other solution. The update procedure must follow these rules: 1- check diffrents between a table in DB2(source) and the same table on msSQL server 2- update my msSQL table if some diffrents was found. I'm a beginner with msSQL server, any advices are welcomed, I need a startin point. please help. thank you all kindly regards Alberto |
| ||||
| It all depends on your timing. If it's only for a few seconds, the risk may be worthwhile in comparison to the development time. If it's longer, I'd suggest adding in a 'work' table to do the import into (if this is what takes the time) and then moving the date 'en-mass' from there. This may give you the improvement you need. I have a similar situation where I have to generate a lot of data from various sources and replace it in a live system after truncating the existing data. I do the generation work in a seperate table and then move it over afterwards. The final part takes a couple of seconds to do. You could always add in something for these few seconds to introduce a deliberate delay to the user if the table isn't populated (maybe hold a flag somewhere in a 1 row table ?) and then release it when you have finished. Ryan "Alberto" <alberto@nomail.it> wrote in message news:<cof0ge$9eq$1@newsreader.mailgate.org>... > Hello all, > > I'm new in this newsgroup and I apologise if my question has already done. > Let me knwo if FAQ is avaible somewhere. > > I use msSQL server to manage data for a B2B portal. > Orginal data comes from as400 db2. > > I need to update msSQL data from db2 source. > > I used MetaDataService executed by SQL server Agent, but dosn't work as > excepted 'cause I need to delete all row in a table and then copy all new > rows, this works fine but what happen if an user is quering data while sql > agent starts? > I need to make data update very often so I need other solution. > > The update procedure must follow these rules: > 1- check diffrents between a table in DB2(source) and the same table on > msSQL server > 2- update my msSQL table if some diffrents was found. > > I'm a beginner with msSQL server, any advices are welcomed, I need a startin > point. > please help. > > thank you all > kindly regards > Alberto |