Questions tagged [db2]

0

votes
1

answer
39

Views

db2RemStgManager analyse error based on error code

I am using a shell script to put a file in object storage. For this I am using; db2RemStgManager S3 put For now I am deliberately providing wrong creds. I want to log a different error message if authentication failed. Currenlty when I log what the above command returns I see: Error code: 251 Error...
aaj
1

votes
1

answer
39

Views

Zero not returning in DB2 when select query yields no result

I am running the below select query in SSIS which is using DB2 connection. SELECT (SELECT COUNT(*) FROM tbl.Test) AS NoOfDest FROM tbl.Index FETCH FIRST 1 ROW ONLY; When this query yields no result, I am getting the below error in SSIS. single row result set is specified but no rows were returned....
Shesha
1

votes
3

answer
91

Views

AS400 SQL Database Query

The time column has a string type containing a time in the format HHMMSS. Sample data is: 95030 122030 132030 As you can see, there are no leading zeros. I am trying to extract the above values and convert them to something like below 95030 -> 9:50:30 122030 -> 12:20:30 The Sql Query: select ca...
Pavan_Obj
1

votes
1

answer
46

Views

In DB2 SQL RegEx, how can a conditional replacement be done without CASE WHEN END..?

I have a DB2 v7r3 SQL SELECT statement with three instances of REGEXP_SUBSTR(), all with the same regex pattern string, each of which extract one of three groups. I'd like to change the first SUBSTR to REGEXP_REPLACE() to do a conditional replacement if there's no match, to insert a default value s...
spinjector
1

votes
1

answer
51

Views

IBM SQL Sum and Group By

I am trying to do a join and get the total (sum) of Line Items in Purchase orders. It is a grid on a web page. I am displaying all the info of the PO but I also want the Total dollar per line items per PO's. I get the following error message: SQL0122 Column or expression in SELECT list not valid. I...
Tretiak
1

votes
1

answer
25

Views

DB2 raise application trigger

I've defined this trigger CREATE TRIGGER actualizarSaldoRetirada BEFORE INSERT ON Retirada REFERENCING NEW AS N FOR EACH ROW MODE DB2SQL BEGIN IF (SELECT Saldo FROM Cuenta WHERE IBAN = N.Cuenta_IBAN) - N.Cantidad >= 0 THEN UPDATE Cuenta SET Saldo = Saldo - N.Cantidad WHERE IBAN = N.Cuenta_IBAN; ELSE...
cildoz
1

votes
3

answer
96

Views

Is there a way to interrogate the status of AS400 jobs from VBA?

I'm trying to provide a user interface in Access to display the status of scheduled AS400 jobs, to show them as either pending, running, or complete. I've inherited some code which schedules several jobs, which runs fine - but there's no way the user can see what the job status is, and they sometime...
Belladonna
1

votes
1

answer
29

Views

Connecting to DB2/400 using GCC on Linux-PowerPC

After a lot research, I decided to ask the question here, therefore, I have not found the answer of how I can do this. I have a system written in C/C ++ which was designed for Linux PowerPC64 BE ( at now, I'm using Debian ) servers, and I need to connect this system to an IBM DB2/400 database, my fi...
Roger
1

votes
1

answer
845

Views

How to resolve PROG753 error in CICS?

enter image description hereI executed nmy application in CICS region. After few maps, it throws PROG753 error and only few part of map is displayed. Can anyone help me with how to resolve this error? I think in this image , 'ITEMERR' is causing PROG753 error. Please check and give answer
JOHN
1

votes
1

answer
43

Views

Accessing external (DSPF) fields using arrays in RPGLE free

In the old RPG III and the non-free RPGLE/RPG IV you could 'rename' fields you get from either a record of a PF/LF or a record from a DSPF. This lead to possibilities like grouping several lines of input (additional order text) into a array. So I didn't have to MOVEL or EVAL ottxt1 to the external...
Radinator
1

votes
2

answer
93

Views

Groupwise sorting with SQL

I need to sort data groupwise. For my knowledge this can not be achieved with sort by multiple conditions and also a group does not what I need, as I don't want to reduce the records but sort them while keeping groups together. Look at the following data: Group Data1 Data2 a 1 5 a...
inetphantom
0

votes
0

answer
3

Views

How to execute DB2 sql functions in SPARKSQL

We are aware that MYSQL and DB2 are relational databases. SQL used in MYSQL differs from SQL in DB2( by some additional functions). When running spark-sql job using DB2 sql I am facing a issue that function not found. But actually that function is available in DB2 but not in MYSQL. multiply_alt is t...
Goutham ssc
1

votes
0

answer
242

Views

Unable to recover data from DB2 Backup files

I have couple of DB2 Backup files as shared with us. I am unable to recover the data using the DB2 recover command which I used as - db2 restore db from . taken at 20151229234633 Got the following error for the above command. SQL2071N An error occurred while accessing the shared library '/resgrp46...
Yuvraj Gupta
1

votes
0

answer
1.3k

Views

2 Hikari CPs with different datasource configurations?

Has anyone successfully configured two hikari connection pools with different datasources in a spring boot application? How do I do it using application.properties?
ramkris
1

votes
0

answer
71

Views

Golang db2cli running select query gets cgo error

I'm trying to use db2cli library (https://bitbucket.org/phiggins/db2cli/) to implement DB2 queries (select, insert, delete). But get CGO error when trying to run select queries. Here is my code: db, err := sql.Open('db2-cli', *connStr) if err != nil { return err } defer db.Close() rows, err := db.Qu...
Xiuwen Sun
1

votes
2

answer
381

Views

Distinct count on a rolling time window

I want to count the number of distinct catalog numbers that have appeared within the last X minutes. This is usually called a rolling time window. For instance, if I have: row startime orderNumber catalogNumb 1 2007-09-24-15.50 o1 21 2 2007-0...
alejo
1

votes
0

answer
83

Views

ASP.NET Core issues with DB2 queries in IIS

I'm working on a web app in ASP.Net Core v1.0 in VS2015. The premise of this application is simply to retrieve information from our DB2 database and display it for our dispatchers to use. The issue I'm running into is while on my development PC the application runs fine in IIS Express but once deplo...
Mason H.
1

votes
0

answer
209

Views

SSIS package connection is not working in sql server agent

I'm trying to connect to a AS/400 system with a IBM DB2 for i5/OS IBMDA400 OLE DB Provider as a connector. I want to write data to a table in the AS/400 system and read data from the same location. So I build a package that writes data from a sql server db on a SQL Server 2008r2 to the AS/400 syste...
chr1s84
1

votes
0

answer
184

Views

DB2 Conection (Linux) CLI 10.5 - Hangs

We are having an issue with the DB2 connection is successful yet hangs -- no errors nor does code continue to the next line of execution.....broke this down to just running the CLI to perform a basic validate and it shows the same symptom. [email protected]:/opt/ibm/clidriver/bin$ db2cli writecfg add -da...
C Carpenter
1

votes
0

answer
992

Views

How to call stored procedure with out parameters in Intellij Idea?

Basically what I want to do is call a stored procedure with out parameters (DB2), unfortunately intellij interprets the question marks as user parameters. I tried adding an exception for ? in Settings->Database->User parameters, but this didn't work. Any suggestions?
Barni Bittner
1

votes
0

answer
203

Views

Get “Job Wave Number” in DataStage Using “XMETA”

Is there a way to get the Job Wave Number of a job in DataStage - using an SQL statement on the DataStage Repo DB 'XMETA'? I was able to get some details of a job using the below statement but I couldn't find a way to get the Job Wave Number. SELECT (TIMESTAMP('01/01/1970', '00:00:00') + (XMETA_CREA...
Xtigyro
1

votes
2

answer
567

Views

DB2 table change tracking

I would like to track IBM DB2 table data changes (Inserts, updates, deletes), and insert changes into an other table. What would be the easiest solution ? It is a IBM DB2 for iSeries on AS400. For example, could it be possible to add triggers to track these changes in a specific table I will poll ?...
Dede
1

votes
0

answer
294

Views

Insert pandas df to IBM db2

I have a Pandas df with 80 columns and 45000 rows, i am using below connection to connect to DB2: from sqlalchemy import types, select, create_engine eng = create_engine('ibm_db_sa://user1:[email protected]:50000/my_DB') below is the code used to insert into my database, i am enforcing the datatype as...
toofrellik
1

votes
1

answer
170

Views

pyodbc python linux iSeriesAccess driver - stored procedure - capture output parameters?

I've read thru several threads discussing this -- however - not finding an option which appears to be the right first for my use case. Linux (RHEL 7.x) - IBM iSeriesAccess driver - Connecting to AS/400 - Python/pyodbc (ibm_db does not seem to support the iSeriesAccess driver) Call to stored procedur...
C Carpenter
1

votes
2

answer
787

Views

IBM i DB2 JDBC Encryption using SSL

Remote server is an IBM i (7.1) with DB2 installed on it. I am trying to connect to this remote db2 database on IBM i machine via JDBC encrypted link using SSL from my windows machine, I am using jt400-6.7.jar. I can see that SSL is correctly configured on IBM i machine as I see the following in Dig...
yin yang
1

votes
1

answer
52

Views

Agreggate rows from SQL combining values and removing NULLs into a single row

I have the following query in DB2 for which I need to combine the rows with values with the ones with nulls into a single line, eventually removing the nulls when there is valid data for that column. The SQL is select z.po_id, scdc.ship_id, dcdc.ship_id, scus.ship_id, dcus.ship_id from covinfos.ibm...
1

votes
1

answer
71

Views

JayDeBe: Store a date into an AS400/DB2 (jt400 driver)

I'm trying to enter a date value into a date field of our AS400/DB2 via JayDeBe. When I try with a literal SQL value everything works fine curs.execute(''' UPDATE mytable SET city = ?, mydate = date(to_date('1999-05-03', 'YYYY-MM-DD')) WHERE id = ?''', ('Somewhere', 5)) When I put the date value int...
Volker Böhm
1

votes
0

answer
210

Views

Uncaught Error: Call to undefined function odbc_connect() How to resolve?

I am running MAMP and attempting to connect to ibm db2, however running into issues. It seems db_connect and odbc_connect are unavailable. How do I resolve? PHP version 7.2.1. Uncaught Error: Call to undefined function odbc_connect() I appreciate any guidance. thanks in advance for your help.
mcroteau
1

votes
1

answer
332

Views

pySpark jdbc write error: An error occurred while calling o43.jdbc. : scala.MatchError: null

I am trying to write simple spark dataframe to db2 database using pySpark. Dataframe has only one column with double as a data type. This is the dataframe with only one row and one column: This is the dataframe schema: When I try to write this dataframe to db2 table with this syntax: dataframe.writ...
vaibhav sapkal
1

votes
1

answer
1.4k

Views

How can I find user and password of db2 database?

I forgotten user and password of db2 database version 11.1.2.2. How can I find user and password?
Priyanka Patel
1

votes
0

answer
56

Views

How do I count total distinct items in a one-to-many join query in Hibernate JPQL?

I'm having trouble getting the total count of the 'one' side of a one-to-many join query in hibernate HQL / JPQL. The two tables I'm attempting to join (which I don't control and cannot change) look something like this: House: PK FK: owner_id PK: town PK: state PK FK: inspection_id Car: PK FK: owner...
SnoopDougg
1

votes
1

answer
296

Views

DB2 : Restoring Database Warning Message SQL2563W

While restoring one of the CLM application data's from Database, I got this warning message, 'SQL2563W The Restore process has completed successfully. However one or more table spaces from the backup were not restored.' Any Solution... Thanks Kiran
kiran ananth
1

votes
3

answer
242

Views

IBM DB2 and IBM IMS Change Data Capture Capabilities

I'd like to understand if the CDC enabled IBM IMS segments and IBM DB2 table sources would be able to provide both the before and after snapshot change values (like the Oracle .OLD and .NEW values in trigger) so that both could be used for further processing. Note: We are supposed to retrieve these...
Lakshman
1

votes
0

answer
224

Views

Error when connecting to DB2 database from .Net web application via SSL Certificate

In my .Net web application when connecting to DB2 database via SSL Certificate(ODBC connection). I got following error: Error:ERROR [08001] [IBM][CLI Driver] SQL30081N A communication error has been detected. Communication protocol being used: 'SSL'. Communication API being used: 'SOCKETS'. Locat...
1

votes
1

answer
95

Views

PHP ODBC to Db2 field name with ñ

I'm on a Windows 2008 enviroment with Ibm ODBC driver installed and configured, PHP version 7.2.3. I can do querys without problems until now that I have a field name with Ñ character. Working with Codeigniter framework. SELECT ISTYLÑ FROM tablename I'm getting this error on Select execution: Sím...
user2765243
1

votes
1

answer
298

Views

Unable to Install Db2 Developer Community Edition - Windows 7 Pro - got stuck at 88%

I also would like to install IBM Db2 Developer Community Edition on Windows 7, but got stuck at 88% showing 'Starting services ...' I attached the log - bottom lines. Could you take a look and advice me? .... [2018-04-12 18:48:38:0627] [info] PULL_STATUS = 3876.3856801986694 totalPullStatus = 3876...
mayumihi
1

votes
2

answer
13

Views

DB2 SQL reading 2 tables using group by

I need to read 2 tables selecting unique dates and count the number of entries from both tables by date. Example: table 1 table 2 date date ---------- -------- 2018-03-20 2018-03-15 2018-03-20 2018-03-20 2018-03-25 Th...
Leila
1

votes
1

answer
126

Views

DB2 Warehouse on Cloud Load_jobs filename or path is not valid failure

I have to try to load data to DB2 WoC (formerly dashDB) from IBM Cloud Object Storage (Softlayer) by using /load_jobs API call. Always getting error response: SQL3025N,A parameter specifying a filename or path is not valid.,0,n/a Trying different formatting for path key, like following: us-south/wo...
CTiPKA
1

votes
1

answer
233

Views

Setting Up Flask DB2 connection

I am trying to connect my flask application to a DB2 database,but somehow I am unable to do. here is what I am trying to do, I am using flask extension flask_db2 for this purpose and below is how I am trying to connect from flask import Flask from flask_db2 import DB2 app = Flask(__name__) @app.rout...
Vikram
1

votes
0

answer
51

Views

How to drop db2 source connection and reopen it after the lookup is done in SSIS

I am getting a connection timeout error on one of the package that I am running into. Error: ' SQL1224N The database manager is not able to accept new requests, has terminated all requests in progress, or has terminated the specified request because of an error or a forced interrupt' I have talke...
Seshu

View additional questions