Questions tagged [db2-10.5]
DB2 is a database management system from IBM. This tag should be used for questions about the 10.5 version of DB2. Please additionally tag your question with the generic "db2" tag.
37
questions
1
vote
3answers
767 views
Using db2look to mimic a database?
I'm in the process of migrating some databases from iso8859-1 to utf-8. One of the databases contain 1000+ tables, loads of procedures, functions, triggers, constraints etc. I would like to automate ...
0
votes
1answer
214 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 ...
0
votes
2answers
34 views
How to change default db2 database admin username to something else in Linux?
I have a DB2 database version 11.1 on Linux - rhel 7.7 in my test environment. I need help on how to change the default db2 admin username to something else, ie. db2inst1 to dbroot. And the new db2 ...
0
votes
1answer
418 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
1k 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
701 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,
...
0
votes
2answers
122 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
0answers
43 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
44 views
Are iSeries AS/400 (DB2?), Lotus 1-2-3, and Excel date/time formats the same? [closed]
Are the formats for dates/times from AS/400, to Lotus 1-2-3 that carried over into excel...with the date being the number of days since 1900-1-1 when mistaking 1900 for a leap year as an integer, and ...
2
votes
1answer
4k 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
35 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
72 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.
...
0
votes
1answer
570 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/...
1
vote
1answer
251 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
485 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 ...
-1
votes
1answer
41 views
Can scripting be done on DB2 Connect instance?
I need to get the number of connections passing through connect server for 1 week.
Can we write a script to get the details?
Can we only pull the data manually?
Is there any way to script it?
I am ...
0
votes
1answer
406 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
#!/...
1
vote
1answer
265 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
312 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
941 views
Why DB2 cannot allow creation of database with keyword “BACKUP” in its name?
I'm using DB2 Express C v 10.5
I'm trying to create databases with names "BACKUP", "BACKUPTEST", "BACKUP_TEST" and even "TEST_BACKUP".
In all above cases DB2 throws error as below:
SQL1001N "...
0
votes
3answers
2k views
Fast way to drop schema with large amount of objects
for the purpose of testing I have to drop a schema with a large amount of objects often. It consists of > 2000 tables, a large amount of foreign key and check constraints, triggers views and so on. ...
0
votes
1answer
858 views
db2 reorgchk shows reorg needed immediately after reorg/runstats
I did a reorgchk and it showed a few indexes needed reorg. So i ran this script:
FORCE APPLICATIONS ALL;
CONNECT TO DOMINOS;
-- [SYSIBM].[SYSTABLES].[INDTABLES01]: [*----];
REORG INDEXES ALL FOR ...
3
votes
1answer
178 views
What might be the reason for licence compliance violation?
Much to my surprise we got a licence compliance violation for our DB2 Workgroup Server Edition installation regarding:
~]$ db2licm -g tmp.txt
~]$ cat tmp.txt
License Compliance Report
DB2 ...
1
vote
1answer
743 views
db2 convert regular table to partitioned using online table move
I am converting my regular table to partitioned table using timestamp column. However, the below code fails with sql error 2103 reason code 6.
Please note that there are no referential(or foreign key ...
2
votes
1answer
63 views
“symlink” data to new database
I am just trying to figure some ways to do manage archiving of some/most of our Application data within the database and wondering if something like this would be possible:
Archive anything with a ...
1
vote
1answer
803 views
Error in loading data using DB2 load command in DB2 10.5 [closed]
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 ...
6
votes
1answer
496 views
What is the meaning of `(ORDER BY x RANGE BETWEEN n PRECEDING…)` if x is a date?
In another thread:
https://stackoverflow.com/questions/37759659/db2-query-to-find-average-sale-for-each-item-1-year-previous
the OP wanted a sliding average for the last 365 days. Using ROWS ...
1
vote
1answer
174 views
db2: configurations covered by “create db autoconfigure”
I am new to configuring memory in db2. I want to create a database using this command:
db2 CREATE DB TEST USING CODESET UTF-8 TERRITORY US AUTOCONFIGURE USING mem_percent 80 APPLY DB ONLY
According ...
0
votes
1answer
184 views
Forcing uncommitted read access via view?
I have an application (which I'm only the user of, i.e. I cannot change it, but I do have control over the database) that performs relatively simple, but potentially very frequent concurrent look-ups ...
1
vote
1answer
824 views
Change column from NOT LOGGED to LOGGED
I have a database DAT1 running on DB2 version 10.5.
I want to enable logging for all CLOB and BLOB columns of my table TAB1.
The table was initially created with those columns as NOT LOGGED but now I ...
3
votes
1answer
153 views
non-optimal use of index
I'm somewhat puzzled by the scenario below. The table involved (relevant parts) is defined as:
CREATE TABLE Nya. UPSEC_COURSE (
UPSEC_COURSE_ID CHAR(11) NOT NULL,
...
1
vote
1answer
235 views
Why this statement invalid: `VALUES ( CURRENT PACKAGESET )`?
I'm on db2 luw 10.5.
db2 special registers can be set with:
SET CURRENT ...
and retrieved with:
VALUES CURRENT ...
with the exception of CURRENT PACKAGESET. For some reason the following ...
2
votes
1answer
2k views
Update the value when the row already exists
I have table 'A' in schema 'USER'. There are three columns in this table.
below are the names of the columns:
id (primary key)
name
age
I want to insert a row in this table, but if the row is ...
4
votes
0answers
3k views
Windows to DB2 Connection: Connection authorization failure occurred. Reason: Local security service non-retryable error
Error creating SQL Model Connection connection to TSMDB1. (Error: [jcc][t4][2010][11246][3.68.61] Connection authorization failure occurred. Reason: Local security service non-retryable error. ...
1
vote
1answer
77 views
db2rspgn generates TYPE = ese for workgroup server edition, is that normal?
I tried to run db2rspgn on a workgroup server instance and to my surprise <instance>.TYPE = ese in the generated response file
]$ db2licm -l
Product name: "DB2 Workgroup ...
0
votes
2answers
2k views
SQL2043N Unable to start a child process or thread
I've seen the message SQL2043N Unable to start a child process or thread occur every once in a while since upgrading to rhel7 and db2 10.5. db2diag.log does not reveal much out of interest, beside:
...
1
vote
0answers
771 views
DB2 : Dynamic Result Sets, Duplication in Sending output to File
What I am trying to do here is to Generate insert scripts for selected tables in my database in DB2 10.5 LUW.
I have modified a procedure available here as below.
CREATE PROCEDURE Create_Inserts (
...