Questions tagged [db2-luw]

DB2 for Linux, UNIX, and Windows.

0
votes
1answer
37 views

Error trying a manual's example in DB2 11.1.4.4

When trying this example from the DB2 11.1 manual: VALUES (JSON_VALUE('{"id":"987"}', 'strict $.id' RETURNING INTEGER)); I get this error: SQL0171N The statement was not processed because the ...
0
votes
1answer
404 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, ...
2
votes
3answers
49 views

In DB2 LUW, When should I use a 4K, 8K, or 16K tablespace rather than just creating a 32K tablespace and being done with it?

We're using DB2 LUW 10.5 & 11.1 on Windows & Linux systems, in case it's relevant to he answers. Question: Is there a time where it would be correct to use 4K rather than 32K? If so, why? (...
1
vote
1answer
194 views

Why do SQL Server uniqueidentifier values look different when converted to Db2?

I am currently trying to convert a SQL Server database to DB2. I am using the Data Conversion Workbench (DCW) for IBM Data Studio. The issue I have is that DCW can not seem to correctly extract data ...
0
votes
2answers
22 views

Is it possible to compress CLOB columns in DB2 10.5

I have a table with a CLOB(1M). If I enable compression (compression yes adaptive) on the the table the CLOB is not compressed. Is there a way to make this work in DB2 10.5?
0
votes
1answer
326 views

Character Strings related : string_units db cfg changed from SYSTEM to CODEUNITS32

To handle few special characters, we changed string_units db cfg parameter from default SYSTEM to CODEUNITS32. Based on IBM KC documentation, there are three methods to achieve this. 1.Set ...
0
votes
1answer
31 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
23 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
33 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
290 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 ...
1
vote
1answer
419 views

How to retain backups if automatic backup is enabled

Is there a way to retain the backups or configure the interval when they are deleted? According the manuals it's not possible: "If backup to disk is selected, the automatic backup feature will ...
0
votes
2answers
2k views

REORG command does not work in IBM Data studio but same works in Command Line Processor

I'm using the latest version of IBM Data Studio 4.1.2.0 I tried to reorg a table using IBM Data Studio after some alterations on the table with this command. reorg table MYTABLE; This command shows ...
2
votes
2answers
947 views

DB2: Database alias already exists when cataloging

SQL1005N The database alias "XYZ" already exists in either the local database directory or system database directory I am an accidental DB2 LUW on linux administrator; primary background in MSSQL ...
2
votes
1answer
771 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
22 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
401 views

DB2 big strange problem - database is returned to CIRCULAR mode but archive logs keep coming to old archive location

my DB2 database (v 9.7) is in Circular mode. Current Logging Type:Circular (USEREXIT) = OFF (LOGRETAIN) = OFF (LOGARCHMETH1) = OFF (LOGARCHMETH2) = OFF (LOGPRIMARY) = 10 (LOGSECOND) = 10 Path to log ...
2
votes
2answers
2k views

DB2 Reorg-recommended commands

Is there some full list of commands that can cause table to become reorg-pending? I tried google it for a while, but can't find full list. My exact problem for now - can ADD FOREIGN KEY statement ...
-1
votes
1answer
38 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
1answer
53 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
37 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 ...
0
votes
2answers
61 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
1answer
155 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
29 views

Shared logarch across multipe db2 HADR instances

Background We are looking into building a multiple standby hadr cluster. The Auxiliary standby is in a geographically separate location. from Developer works In a multiple standby system, the ...
1
vote
2answers
34 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: ...
1
vote
2answers
1k views

How to determine when REORG with LONGLOBDATA is required (DB2)

REORGCHK only identifies when a reorg is required for space reclamation on normal (non-LOB) data. Is there a way of determining how many pages are wasted due to LONG and LOB data that has been ...
0
votes
1answer
105 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 ...
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 ...
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
58 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. ...
6
votes
2answers
28k views

Cannot connect to DB2 database after restoring an offline backup

This is for DB2 9.7 Enterprise Server Edition on AIX. I had a full, offline backup taken of several databases within our instance in a performance environment. I wanted to restore these databases to ...
2
votes
1answer
761 views

db2ckbkp - How to determine what tablespaces are temp-tablespace

I am writing a script to restore databases from backup. The script should need as little input as possible to fulfill this task (in an efficient way). The restore command takes the parallelism ...
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
146 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 ...
1
vote
1answer
3k views

IBM DB2 - store large files

I want to store large files in a DB2 database and I need more information about which is the best technique to use as I am new in this IBM product (previous experience with T-SQL only). The situation:...
3
votes
2answers
20k views

Do I need to RUNSTATS after a REORG in DB2?

The REORG documentation says: BUILD Builds indexes. Updates index statistics. But I have always heard REORG/RUNSTATS as if they should be paired. Can anyone verify that "Updates index ...
0
votes
0answers
53 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 ...
0
votes
1answer
194 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 ...
-1
votes
1answer
186 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 ...
1
vote
1answer
76 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
3answers
580 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
2answers
290 views

Check if DB2 backup image contains any tablespace not using automatic storage?

I want to check a backup DB2 image if it contain any tablespace using non-automatic storage. I had tried to use db2ckbkp commands. But it seems it cannot tell me if any tablespace using non-automatic ...
1
vote
2answers
1k views

Problem deleting detached partition in DB2 LUW V9.7

Recently in prod environment we are having problems while dropping the detached partitions its giving this error """ DB21034E The command was processed as an SQL statement because it was not a ...
0
votes
1answer
47 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 ...
0
votes
1answer
105 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
84 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
477 views

How to create a Windows user suitable for installing db2 server with extended security?

I'm trying to install db2 10.5 on Windows Server 2008 not as built-in "Administrator", but as another local user, but it fails to create instance with the symptoms similar to http://www-01.ibm.com/...
0
votes
1answer
151 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
2answers
320 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
310 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 #!/...