Showing posts with label db2. Show all posts
Showing posts with label db2. Show all posts

Friday, February 17, 2012

Concurrent (completely independent) Statements.

Hi!

We are migrating an DB2 database to sql server 2005. We have used the 1.2 jdbc driver. It consumes lots of memory when we have several resultssets opened on different statments. Then we tried JTDS (http://jtds.sourceforge.net/), it worked fine. It's supports concurrent staments. We would like to stick with microsofts driver. My question is: will we se this supported in microsofts driver (soon)!

Joachim

Hi,

By any chance, are you setting the "responseBuffering" property to "adaptive"?

To keep back compatibility with our v1.1 driver behavior, our default behavior is to cache the entire resultset. So, in your scenario where you have multiple resultsets open at the same time, the driver will consume a lot of memory.

With responseBuffering=adaptive enabled, the driver will only consume as much memory as needed to retrieve the immediate data from the wire. Specifically, for CLOB and BLOB are streamed unless marked by the application.

I love to hear back if responseBuffering=adaptive resolves your scenario.

Jimmy

|||Hi!

Setting the property responseBuffering=adaptive did not help. When the first statment is opened, there is no increase in memory usage. As soon as we opens the next resultset the memory usage start to increase rapidly. When we use the jdts driver this does not happend. As i wrote before, we would like to use the microsoft driver (its the corporate strategy).
But we need to see the memory handling as in jdts.

Thanks for your rapid replay.

Joachim

Concurrent (completely independent) Statements.

Hi!

We are migrating an DB2 database to sql server 2005. We have used the 1.2 jdbc driver. It consumes lots of memory when we have several resultssets opened on different statments. Then we tried JTDS (http://jtds.sourceforge.net/), it worked fine. It's supports concurrent staments. We would like to stick with microsofts driver. My question is: will we se this supported in microsofts driver (soon)!

Joachim

Hi,

By any chance, are you setting the "responseBuffering" property to "adaptive"?

To keep back compatibility with our v1.1 driver behavior, our default behavior is to cache the entire resultset. So, in your scenario where you have multiple resultsets open at the same time, the driver will consume a lot of memory.

With responseBuffering=adaptive enabled, the driver will only consume as much memory as needed to retrieve the immediate data from the wire. Specifically, for CLOB and BLOB are streamed unless marked by the application.

I love to hear back if responseBuffering=adaptive resolves your scenario.

Jimmy

|||Hi!

Setting the property responseBuffering=adaptive did not help. When the first statment is opened, there is no increase in memory usage. As soon as we opens the next resultset the memory usage start to increase rapidly. When we use the jdts driver this does not happend. As i wrote before, we would like to use the microsoft driver (its the corporate strategy).
But we need to see the memory handling as in jdts.

Thanks for your rapid replay.

Joachim

Sunday, February 12, 2012

Concatinating Select Results

Hey everyone,

I have an SSIS conversion issue. I'm pulling two tables from a DB2 database into SQL 2005. One table has a list of work orders, and the other has a list of work order comments. There is a unique identifier between the two tables so that a join can be used, however, due to size limitations, I need to be able to combine both tables.

The end result will be replicated out for SQL Mobile Edition and the file is too large when both tables exist so I am wanting to concatinate all the comments for each work order into a single text field in the work orders table.

Here is what I am wanting to accomplish:

UPDATE tblWorkOrders
SET Comments = (SELECT Comments
FROM tblComments
WHERE tblWorkOrders.ReqNum =
tblComments.ReqNum)

I know that this statement will not work because there is a one-to-many relationship between the tables so each work order could get multiple results.

I would appreciate any suggestions.

Thanks,

Lee.

There are probably a number of ways of doing this. The first thing that occurs to me is to use an asynchronous script component that takes a set of data (ordered by ReqNum). Inside the script component loop over the set of data, concatenating comments for each ReqNum.

-Jamie

|||Hey Jamie,

Thanks for the response. I'm very new to SSIS so that's a little over my head. Could you elaborate a little more on all that? Or can you think of an easier way of accomplishing this?

Thanks

Lee.