Showing posts with label newsgroup. Show all posts
Showing posts with label newsgroup. Show all posts

Friday, February 24, 2012

Data update

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
AlbertoIt 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

Friday, February 17, 2012

Data type conversions

I am just starting to lean and use SSIS to get data from an AS400 DB2 database. (I also posted this question to the SSIS newsgroup).

It all works for columns that are just a data type of Character, however I am having a problem with the Numeric data type. I keep getting an error "column cannot be inserted because the conversion between types DT_NUMERIC and DT_R8 is not supported."

In SQL, what do I need to declare the column datatype as? I have tried several.

Thanks for the information.

try DT_NUMERIC - decimal, R8 -float

Thanks.