Questions tagged [db2-luw]

DB2 for Linux, UNIX and Windows

DB2 for LUW is part of the DB2 family, that runs in these operative system.

Many parts of the internal structure are the same in all members of the DB2 family, but there are also things specific for each architecture.

This tag is for question related specifically to this member of the family.

913 questions
4
votes
10 answers

SQL1159 Initialization error with DB2 .NET Data Provider, reason code 7, tokens 9.5.0.DEF.2, SOFTWARE\IBM\DB2\InstalledCopies

I am trying to get the DB2 data provider from a 32-bit .Net application to connect to DB2 running as a 32-bit application on Vista 64 (is that confusing enough yet)? Unfortunately, I am getting the following error: SQL1159 Initialization error…
jsight
  • 27,819
  • 25
  • 107
  • 140
4
votes
4 answers

How do I find the size of a DB2 (luw) database?

I know you can look at the size of an uncompressed backup, but that's not practical. Is there a command to find the size of the database while it is online? (In Linux/Unix/windows)
ESP
  • 979
  • 2
  • 9
  • 21
4
votes
1 answer

Listagg alternative in db2

My customer is using db2 database without listagg function, but I need to somehow aggregate the primary key information within one field. Right now (for Oracle) I am using this as a part of bigger query: SELECT LISTAGG(COLUMN_NAME || ':' || CONTENT,…
Ondřej Vykouk
  • 273
  • 1
  • 4
  • 9
4
votes
1 answer

db2 not listening for TCPIP connection on localhost

I am not able to connect my db2 application to my localhost database. The db2 API used by the application need TCPIP and try to connect to host "localhost" and port "50001". The error I have is . SQL30081N A communication error has been detected.…
Abruzzo Forte e Gentile
  • 14,423
  • 28
  • 99
  • 173
4
votes
1 answer

Bundling Java libraries with a DB2 Java stored procedure

Creating a DB2 Java stored procedure using IBM Data Studio, I have some libraries that are required in the classpath. I'm running Data Studio in a VM, and deploying remotely to my DB2 server in a Cloud instance. How do I bundle up the jars with my…
3
votes
1 answer

Read timeout connecting to server on Docker container

I'm trying to connect to a DB/2 container (image: ibmcom/db2) but it gives me a read timeout error. The host OS is Windows 10. I can see the port (50000) in the Windows PowerShell prompt, but it gives me a read timeout. I've added an inbound Windows…
Woodsman
  • 901
  • 21
  • 61
3
votes
2 answers

DB2oC (DB2 on Cloud) : Facing "attempted to modify data but was not defined as MODIFIES SQL DATA" error

I have created very simple function in DB2oC as below, which has one UPDATE sql statement and one SELECT sql statement along with MODIFIES SQL DATA. But still I get the below error, though I have specified MODIFIES SQL DATA. I did GRANT ALL on that…
Krishna
  • 29
  • 2
3
votes
1 answer

Dockerized IBM DB2: No start database manager command was issued. SQLSTATE=57019

I'm trying to run an instance of IBM DB2 in a Docker container but for some reason It doesn't start properly. This is the error code I can see in the Terminal running on Mac OS Mojave. 12/09/2019 09:13:40 0 0 SQL1032N No start database…
HK15
  • 737
  • 1
  • 14
  • 32
3
votes
3 answers

How to reference an implicitly named column in DB2

In DB2 LuW, I'm running the following query db2 => select 'a', 'b' from sysibm.dual 1 2 - - a b 1 record(s) selected. Notice that the generated "column names" are the column indexes starting with 1. Now, if I have such a query as a derived…
Lukas Eder
  • 211,314
  • 129
  • 689
  • 1,509
3
votes
2 answers

DB2 connect to remote DB without catalog?

I am trying to connect to DB2 LUW. I am aware that if I catalog tcpip node and the database, I will be able to connect to the DB. Example: db2 catalog tcpip node mynode remote 20.40.20.40 server 5555 db2 catalog database mydb as mydb at node…
IDDQD
  • 3,543
  • 8
  • 29
  • 40
3
votes
0 answers

Why is JPA throwing SQLCODE=-302, SQLSTATE=22001 for select query

I'm trying to frame a select query using JPA repository. select * from Foo where name = 'testapp'. The "NAME" column is defined as varchar(4). My program throws SQLCODE=-302, SQLSTATE=22001 for the select operation whereas I get the same query…
DarkCrow
  • 785
  • 2
  • 8
  • 29
3
votes
1 answer

How can I get a list of all functions stored in the database for all the schemas in db2uw?

I want to know the sql query to find all the functions stored in a db2luw database for all the existing schemas and particularly how can I display the functions of a specific owner.
malmo
  • 484
  • 9
  • 20
3
votes
1 answer

Error in loading data using DB2 load command in DB2 10.5

I have a IBM DB2 database in our application. We have a monthly Java batch process which loads data in the tables using "load Replace" sql command. Around millions of record will be updated every month in this batch process. The batch was running…
Nagesh
  • 434
  • 1
  • 8
  • 26
3
votes
1 answer

Is `when not matched by source` exists in DB2?

In MERGE statement in SQL Server 2008 exists WHEN NOT MATCHED BY SOURCE and WHEN NOT MATCHED BY TARGET, example taken from Inserting, Updating, and Deleting Data by Using MERGE -- MERGE statement with join conditions that produce unexpected…
Anatoly
  • 5,056
  • 9
  • 62
  • 136
3
votes
6 answers

SQL update from one Table to another based on a ID match IN db2

The Query below is suited in SQL sErver. But in DB2 it does not give results: Error is SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD FROM. Query: UPDATE Sales_Import SET Sales_Import.AccountNumber = RAN.AccountNumber FROM Sales_Import…
Agent Mahone
  • 307
  • 3
  • 15
  • 26
1
2
3
60 61