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.
stream.on do not get called when we pass update query in queryStream in ibm_db npm
This is my code :
Trying to return 200 when update is completed which is return in the first if statement when queryType === "update", but once var stream = conn.queryStream(query); is executed, i don't get any id for which the update happened so i can pass it to the calling api.
how to get first and last day of each month for past 4 years from current date in IBM DB2?
I have written the following code to get past 4 years every first and end of month dates from current date in db2.
How to esablish a Database SSL connection via .ODC file
I have been using .ODC files to get data directly and quickly from a database for years but we have been using a NON-SSL connection : Port number: 50000. We are now forced to use an SSL connection only: Port number: 50001. When I change the port number in the .ODC file I get the error message below.... not mention that I have no idea how to link it to a SLL certificate. Sorry if I mistag this question. I am not sure how to tag it properlly. Also, I an using .ODC files with DB2.
Is SYSDATE officially supported on db2?
It appears that SYSDATE (as in Oracle) works on Db2 even with non-Oracle compliant setting - default, DB2_COMPATIBILITY_VECTOR is not set to ORA.
Only kind of official info I could find is on:https://www.ibm.com/support/pages/node/236545
Background of the question: need my scripts to work both on Oracle and Db2.
Do I need Db2 flavored scripts or can just use SYSDATE for both?
Is there a link to official documentation of the fact?
EDIT:As per comment from @data_henrik
I agree that documentation states
But this is just CAN. It does not state it IS.
It seems I was reading documentation wrong. Thanks @data_henrik.
Spring Boot, Flyway, DB2 - Cannot overwrite Properties
I tried to Update an application to a newer version of Spring Boot 2 and have now a problem during startup that I cannot explain myself.
Here the Log:
Here my pom.xml:
And here my application.properties:
@DB_URL@ = @FLYWAY_DB_URL@@DB_USERNAME@ != @FLYWAY_DB_USERNAME@
It seems that the connection cannot been updated for the flyway initializer with the credencials from the application.properties.
I have no clue why. I cannot find the abbreviation from the spring / flyway manual I ran into.
I am getting error while writing query in db2 sql. I need to have a CASE with 3 conditions
Here is my query :
My error is :
SQL how to find a multi column maximum in a group?
How can I write an SQL query (DB2) that will run on this table:
and produce this result
that is it will select rows based on a max of a "tuple" (A,B,C) in a group:
or for two rows R1, R2 :
DB2 insert performance
I am trying to do a bulk insert into DB/2 from an Excel file.I am running WildFly 12 on my Windows 10 PC. DB/2 is running on a VM under CentOS 7.
Using POI SAX methods, reading the complete XLSX file with 2.5M records takes 80 seconds.
I started off using simple inserts in my EJB program with literals to insert into the table. This took about 1.5 hours.
After reading https://www.idug.org/p/bl/et/blogid=2&blogaid=602 I changed to prepared statements using batches. I also first write to a Global Temporary Table and at the end use "INSERT INTO SELECT ... FROM ".
Turned off auto commit.
The end result is still taking up an hour, or 750 inserts / second.
Prepare the items:
Then, in the loop, I read the XLSX file and
At the end:
Yes, DB/2 is running in a VM so write speeds are effected by lots of factors. Still, 750 records / second is extremely slow. The author of the article says his worst speed was 3000/s and best was 140k/s. Would be nice to get close.
What else should I be looking at?
Getting logs from IBM Z/OS
I am new to Mainframe concepts and haven't used any IBM Z-series machines before. But now I need to get db2 logs from the Z/OS platform.
I previously collected logs from IBM AS400 using JT400.jar.(will execute remote command and read the output using java). But for Z/OS, I could not find such things from documentations.
So I need to know the possibilities for the following cases.
Even if there are any other possibilities, please mention below. It would be really helpful. Based on the possibilities only I could consider buying a Z/OS mainframe.
Thanks in advance.
How to connect AS400 with Laravel
For a little while now, I've been looking how to try a connection to AS400 with Laravel 7.
I use this package : https://github.com/cooperl22/laravel-ibmi
I add laravel-ibmi to your composer.json file:
Use composer to install this package.
Run on the command line from the root of my project:
And set credentials in .env
I try a connection with tinket but i have this message :
I should set my credentials in app/config/db2.php, not in .env ?