StackOverflow is a collaborative programming Q&A community venture
Note: The content of this blog is the opinion and thoughts of the blogger and does not necessarily represent the opinions of IDUG.
Select (show) only different columns from almost similar rows
I have a table with many columns 50+. in order to take decisions I analyze any variant data.
I want to get:
because it's difficult searching manually column by column.
Querying DB2 every 15 seconds causing memory leak in NodeJS
I have an application which checks for new entries in DB2 every 15 seconds on the iSeries using IBM's idb-connector. I have async functions which return the result of the query to socket.io which emits an event with the data included to the front end. I've narrowed down the memory leak to the async functions. I've read multiple articles on common memory leak causes and how to diagnose them.
But I'm still not seeing where the problem is. Also, I'm unable to get permission to install node-gyp on the system which means most memory management tools are off limits as memwatch, heapdump and the like need node-gyp to install. Here's an example of what the functions basic structure is.
Any ideas on where the leak is? Am i using async/await incorrectly? Or else am i creating/destroying DB connections improperly? Any help on figuring out why this code is leaky would be much appreciated!!
Edit: Forgot to mention that i have limited control on the backend processes as they are handled by another team. I'm only retrieving the data they populate the DB with and adding it to a web page.
Can you create a linked server from SQL Server to DB2 using JDBC?
I'm trying to create a linked server in Sql Server 2014 to a vendors DB2 database which is on a remote system. I have found a lot of good instructions for doing this but have been not having luck getting that to work. The vendor doesn't know how to do this and has their people use Squirrel SQL with a JDBC connection. Since we need this setup pretty quick I install Squirrel and was able to get that connected and working. I would still prefer to use SSMS on our end for many reasons.
While I'm still trying to figure out the DB2 linked server, I was wondering if I can create a linked server using a JDBC connection since we have that working?
Export data from DB2 to Prometheus using query-exporter
I am following this article to achieve my goal (to export DB2 Metrics into Prometheus with the help of query-exporter) :
I am getting following error while running query-exporter on a linux machine having DB2 as a Database.
This is what my config.yml file looks like.
Java Spring Hibernate SQL select with order by causes in DB2 big performance impact
I have table T_LOG, which has a few millions of row. Hibernate
The problem is
Takes only 0.1 second. The result set is the same. The column
In Java detached Criteria (simplified) looks like this:
How can I reduce the SQL statement in detached criteria to avoid performance impact?
Sample of good cost:
And bed cost:
Doobie streaming query causes invalid operation
Without much experience in either Scala or Doobie I am trying to select data from a DB2 database. Following query works fine and prints as expected 5 employees.
When I want to read all selected rows and remove
I am wondering what
Below, in my opinion equivalent, plain JDBC query works as expected and returns all 10 rows.
As can be seen in the error message, I am using
How to add explicit WHERE clause in Kafka Connect JDBC Source connector
I am using kafka connect to source data from DB2 to kafka topic and i am configuring sql query to read the data from DB2 , below is query
am using setting
then am getting error with substr , like below
can anyone suggest on both is this issues , am stuck at this point .
Retrieve field offset via recursive query in db2
Assume that I've got key-value table of
Then I need an offset of each field to be in third column. Like this:
However, it keeps getting into infinite loop.
Also this version gives same result:
I guess, that messed somewhere with exit condition, but can not figure exact place to fix it.
Would be great to avoid any table specific metadata like row count too.
DB2 shell run issue
When i run shell in DB2 instance.
I don't know why it's seemed to connect success .. but can't execute sql?
I try it in the db2 command.
It was working fine. But in the shell. it's failed.
Compare archive and master database content
I have a master database in DB2 9.1 and I created a database in Oracle 12g to archive it. I have done it successfully with some datatype change programmatically.
I want to compare the content of two master (in DB2) and archive (in Oracle) databases to ensure the correctness of content transfer. Because of some limitations, I can not use any tools to do this. So I must be doing it programmatically with Java, C# or...
My first solution is to read rows content from the master database in Byte and concatenate columns to gather and create hashcode for each master and archive rows in the database and compare this hash codes. This is very time-consuming in big tables (having types of CLOB and BLOB and row update).Does anyone have a good idea?