Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [db2-luw]

DB2 for Linux, UNIX, and Windows.

0
votes
1answer
25 views

db2 cross platform function/variable?

Is there a db2 function/procedure/variable that can be used to determine what platform a data source origins from? sysibm.sysdummy1 exists, so I assume that this is Db2, but some of the SQL does not ...
0
votes
1answer
15 views

How to stop a db2 instance properly?

I have a db2 instance, and I need to stop it properly, clean, without any db2stop force. I need this in order to restart it fast in a batch process. I am completly sure there are not connections or ...
0
votes
0answers
31 views

drop_cache effects on database

I have several machines with: databse: db2 10.5 OS: CentOS 6.9 on some of machines cached memory is high and i need to run this command to free some memory: echo 3 > /proc/sys/vm/drop_caches ...
0
votes
1answer
21 views

DB2 LUW V10.5 on Windows. How to Manually rotate the Diaglog using scripts

In DB2 LUW V10.5 on Windows, is there a way to manually rotate the diaglog log file? Currently, it is almost 1GB and it is difficult to open it to find info.The diagsize is set to 0 and I cannot ...
0
votes
1answer
166 views

DB2 - how to call a stored procedure that returns a result set in another user defined table function

I have a db2 stored procedure that takes in some parameters, gets some data from somewhere and then returns a result set through a cursor. Now I want to write a table function in db2, that will call ...
0
votes
1answer
44 views

Migrated data with Special Characters Counted as 2 Characters in DB2 Linux

We are currently migrating data from DB2 10.1 AIX to DB2 11.1 Linux. Since we are using some features like versioning/history tables and rowchangetimestamps, db2move is not an option for some tables. ...
1
vote
1answer
35 views

determine page size for index

I'm in the process of migrating a set of databases from code set ISO8859-1 to UTF-8, STRING_UNITS=CODEUNITS32. I suspect that quite a few indexes will no longer fit in there current tablespace page ...
-1
votes
1answer
36 views

DB2 reporting incorrect filesystem full error? [closed]

DB2 V10.5, RHEL 7.5 We had an issue when DB2 was stuck not being able to write log files to disk because of disk full error just that there was more than enough free disk space on the filesystem ...
0
votes
2answers
54 views

Monitor delete statements on a specific table on DB2 LUW

Background User is claiming that records are deleted from a specific table, but nobody knows why. They are not sure if it's an application error or done by a user. Question Is it possible to ...
1
vote
2answers
33 views

My application uses set schema and unqualified tables and I get confusing numbers from snapdyn_sql

More of a finding, than a question, I'll add an answer in a minute. The other day I stumbled upon an application that used several tables with the same name, but in different schemas. Example: ...
0
votes
1answer
92 views

How to Restrict INSERT operations on table for DB2?

I have a table OAUTH20_TOKEN_CACHE for which I have restricted INSERT operations by running below command. db2 REVOKE INSERT ON HVD121.OAUTH20_TOKEN_CACHE FROM USER HVD121 This could be seen ...
0
votes
1answer
33 views

OS killed some of databse demons

I have 2 HP servers with CntOS 6 as OS and DB2 10.5 as Database. there 2 servers are HADR. standby server suddenly rebooted and when i checked log it said that OS had killed 4 db2 demons. IBM....
2
votes
0answers
54 views

Can we prevent creation of directory NODE0000 during db2 rollforward db <db_name> end of logs with overflow log path option?

I am using command rollforward db ABCD to end of logs overflow log path ('/db2backup/logs') to apply DB2 archived logs to my staging database. My staging database is in rollforward pending state. ...
1
vote
1answer
33 views

History Question: DB2 Nomenclature

I realize this is a little random, but DB2 (circa V8) had a feature to define tables from the CREATE VIEW syntax. Basically, the view was saved to disk to save the cost of recreating the dataset each ...
0
votes
1answer
126 views

Data Migration: Unload/load of GENERATED ALWAYS TIMESTAMP

While migrating data from one Db2 database to another we need to retain the ROW CHANGE TIMESTAMP of the migrating data in the target table CFFOLIO.FOLIO We have a ROW CHANGE TIMESTAMP attribute in ...
0
votes
0answers
48 views

Db2 and java11?

Any rumors on when Db2 (LUW) will officially support Java 11? As of now, the officially supported version is 8: https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.1.0/com.ibm.db2.luw.qb.server....
0
votes
2answers
59 views

DB2 huge IREF and lots of scans

I received a task from one of my colleagues to check why he always receives high CPU load alerts. I don't have too much experience with databases and I need some clarifications. I created a script to ...
-1
votes
1answer
156 views

DB2 rollforward fails

I get the following error when I try to do a point in time recovery [inst20@localhost ~]$ db2 rollforward database sample2 to 2018-09-01-15.16.00 and stop SQL4970N Rollforward recovery stopped ...
0
votes
1answer
346 views

WCS8 Solr Preprocess failed : Error SQLCODE=-601, SQLSTATE=42710, SQLERRMC=WCSSTGAP.XI_CATENTRY_PRICE_0

Our Solr Pro-process is failing with below error: [2018/08/28 14:31:36:104 CDT] 00000001 W com.ibm.commerce.foundation.dataimport.preprocess.AbstractDataPreProcessor:createDBTable(Connection, ...
1
vote
1answer
68 views

DB2 10.5 stored Procedure question

I'm having an issue with a stored procedure in DB2 LUW 10.5 using Data Studio 4.1.3 when trying to call more then one statement at a time. I've narrowed the problem down to the way semi-colon's (;) ...
0
votes
1answer
180 views

Db2 LDAP security plugin error

I'm playing around with the LDAP security plugin. I noticed that after a certain amount of grants I get an error that the ldap server can't be reached: SQL30082N Security processing failed with ...
0
votes
3answers
511 views

Cloning a Db2 database within a single instance

I need to create an exact copy of a Db2 database (V11.1+) on the same server within the same instance. (This is a development server that does not run production databases.) This is how I do it now. ...
0
votes
1answer
44 views

DB2 GLOBAL VARIABLES Refresh for datapool managed sessionis

I've recently discovered the feature of defining global variables for DB2. I wanted to utilize it. My use case is to create a variable containing the value for Previous Banking day. CREATE VARIABLE ...
2
votes
1answer
691 views

DB2 Tablespace in state Restore pending

I have the problem that in my DB2 database (SLES, Db2 v10.5) my User Temp Tablespaces are all in state Restore pending, Storage must be defined, Storage may be defined. When I set off the following ...
0
votes
1answer
93 views

What is the purpose of the “territory” configuration parameter?

This is the command that I use to create a new Db2 database in my project: db2 create db <DATABASE_NAME> using codeset 1251 territory ru Unfortunately, there is no documentation left and I ...
0
votes
0answers
81 views

external authentication of database users in Db2

For a future project, I am looking into authenticating Db2 database users via LDAP and PAM. However, it seems that LDAP server is deprecated in RedHat: https://access.redhat.com/documentation/en-us/...
0
votes
1answer
144 views

ibm_db on HADR primary database?

Yesterday I discovered a peculiar thing, it looks like a bug but I'll post it here in case someone seen it before. Testscript: #!/usr/bin/python import sys import getopt import re import os import ...
2
votes
1answer
2k views

How to avoid SQLCODE=-968, SQLSTATE=57011 “The file system is full” error with merge statement [closed]

When doing the following merge (tempchoices is a temporary table created with DECLARE GLOBAL TEMPORARY TABLE tempchoices LIKE CHOICES NOT LOGGED IN importtemp ON COMMIT PRESERVE ROWS) all my diskspace ...
2
votes
2answers
292 views

DB2 on Windows: Fix encoding in db2cmd and for JDBC

I'm running a DB2 v10.5 FP 7 on a Windows Server 2013 and there is a problem with the encoding setup: The windows is set to use German(Switzerland) as region setting and input language. chcp: Active ...
0
votes
1answer
285 views

python ibm_db driver and decimal values?

It appears as if decimal values are treated as strings by ibm_db. Small example: Python 2.7.14 (default, Mar 14 2018, 13:36:31) [GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux2 ]$ cat aa.py #!/...
0
votes
3answers
2k views

How to systematically export all tables from a DB2 database schema to csv

Is there a way using a DB2 database to systematically export all tables from a schema to separate csv files ?
1
vote
1answer
36 views

Definition of ROWS_READ?

This may seems like a stupid question, but I cant seem to find a good answer for it. I have a pretty good intuitive understanding of what ROWS_READ in for example sysibmadm.snapdyn_sql means, and ...
1
vote
2answers
113 views

Retrieving auto-generated keys for an INSERT statement

What is the best way to retrieve an auto-generated keys after an INSERT statement ? After searching online for DB2 I found this https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.1.0/com.ibm....
0
votes
1answer
48 views

Long delay before redirected restore “starts”

On several occasions, I noticed that it takes a long time before anything "happens" during a redirected restore. There are no entries in db2diag.log and list utilities show detailshows: Completed ...
1
vote
0answers
231 views

UOW Waiting IBM DB2 memory usage

We have been encountering lately frequent hanging of our database server. Initial thoughts is its running out of memory. Based on logs, just before this happens, the stmm would reallocate memory. ...
0
votes
0answers
186 views

How to activate REST services on Db2 Developer Edition

I am trying to activate the Db2 REST services on my local IBM DB2 Developer-C Edition (Community). Using the Data Server Manager, I wasn't able to figure out how to configure and run sample job ...
0
votes
1answer
172 views

DB2 Alter column type and index state RBDP vs. “needs a rebuild”

I'm new to DB2 and databases overall. I'm building a script to alter several column data types in several tables of which some are part of indexes and some not. So after ALTER-statements I assumed I ...
0
votes
1answer
125 views

In stored procedure %Rowtype is not working while deploying

CREATE OR REPLACE PROCEDURE CAS.ROWTYPECHECK ( P_APPLICATION_REC TAPPLICATION%ROWTYPE ) IS BEGIN INSERT INTO "CAS"."VAPPLICATION" VALUES P_APPLICATION_REC; END; But I'm getting one error while ...
1
vote
1answer
181 views

Optimization profile and explain mode?

The other day I noticed something strange that perhaps someone have an explanation for. The problem I was facing was a query that due to a skewed distribution of data generated a poor plan when a ...
1
vote
1answer
647 views

How to add multiple rows to a table that contains only a generated always identity column?

This more of a Q/A question, perhaps someone is facing the same problem, so I'll ask a question and then answer it. Say that we have a table defined as: CREATE TABLE T (x BIGINT NOT NULL GENERATED ...
1
vote
1answer
89 views

How to identify the origin of a invalid connection with sql1060

I am getting a message similar to the next one: 2007-08-08-09.28.41.745208-240 I10292373A694 LEVEL: Error PID : 1720384 TID : 1 PROC : db2agent (DPADB) 0 INSTANCE: XXXXX NODE : 000 DB : DPADB ...
0
votes
2answers
840 views

DB2 drop trigger if exists?

In MySQL, if I have schema myschema and a trigger named mytriggername I can drop a trigger like follows DROP TRIGGER IF EXISTS myschema.mytriggername Anyway, I can't find on DB2 docs for the DROP ...
1
vote
1answer
229 views

how much free space do I need for db2 backup file?

I have a db2 database on Linux (DB2 10.5 fp08). Now I would like to backup it, before backup I can get the database size with db2 "call GET_DBSIZE_INFO (?,?,?,0)" For example it is 6 GB. I know if ...
0
votes
1answer
15 views

Why does “DB2 Recovery Expert” web console doesn't enable the Run and Next button?

Sometimes, when performing the Log Analysis and Recovery options in the Recovery Expert web console, the buttons "Next" and/or "Run" aren't enabled. This is strange because we do provide all the ...
1
vote
0answers
84 views

I am using Db2 Recovery Expert and having error with adding Managed Databases

I have Db2 11.1 installed in my windows machine and created a Linux 32 bit in my virtualbox (unfortunately my intel doesn't allow me to change the virtualization method..anyway). I installed ...
1
vote
0answers
81 views

delayed locks after commit?

This is a simplified scenario, but it illustrates a real world problem. The original problem resides in a Java EE application, but I have mimicked it in 3 small python scripts. There are two tables ...
1
vote
1answer
152 views

1 out of 3 Transactions in DB2 fail with SQL 998, State 58005, error code 8, sub code 2

We have a few back-end applications using an XA switch module connected to a DB2 (10.5). 2 or 3 transactions will pass until this shows up: I’ve found this document that talks about “Code 998, state ...
1
vote
1answer
1k views

VARGRAPHIC vs VARCHAR CODEUNITS32

I'm in the process of migrating a number of databases from ISO8859-1 to UTF-8. To fit the old string in new tables I figured there are 3 options: Multiply the number of bytes with a number the ...
1
vote
1answer
1k views

Select Statement with RegEx Replace - DB2 9.7

In a db2 9.7 select statement's field, I need to perform a global regular expression that replaces multiple white spaces (between words) with exactly one space. The regular expression would be base on ...
1
vote
1answer
161 views

How to set a filesystem size limit for DB2 database? Is it possible?

I'm looking for a way to limit a DB2 database size (in disk) at creation time. But I couldn't find it. At SQL server we can do by this way: Create Database MyDatabase on (Name='MyDatabase_Data', ...