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.
46
questions
0
votes
0
answers
20
views
DB2 backup from Data Studio throws sqlcode=-22212
When I try to back up a database, the process fails with the error:
Attempt to connect to DAS failed with the following error: sqlcode=SQL22212N
db2dasrrm.exe runs under the PID from the netstat ...
-1
votes
1
answer
39
views
Row Level Permission on multiple tables in Db2
If there are 3 tables that have foreign key relationship and I am giving row level permission on 1 table does that permission also apply to the other 2 tables automatically? Or do I need to give row ...
0
votes
1
answer
424
views
DB2 on Docker :: IBM Data Studio prompts error when creating new database
I've followed this simple guide and I was able to install DB2 on Docker.
I now would like to import a sample database to play with.
So I open IBM Data Studio, I right click on the instance > New ...
0
votes
0
answers
594
views
Copying a single database from DB2 10.5 to DB2 11.5
What is the easiest way to copy a single database (has no large objects) from DB2 10.5 Express-C instance to DB2 11.5 Community Edition instance?
I tried this method but obviously db2 restore database ...
1
vote
2
answers
604
views
DB2 Linux authentication fails
I have DB2 Express-C v10.5 instance configured to authenticate against LDAP. The LDAP sever is going to be shutdown and I should configure the same DB2 instance to use Linux authentication.
I copied ...
1
vote
1
answer
4k
views
Using same table in a UNION multiple times
I am given a query that is using the same table with same columns and filters multiple times and the only thing is changing is the Type which is given manually. I am thinking there must be a better ...
1
vote
3
answers
121
views
Not able to install any DB2 LUW 10.5 fixpacks
I am currently on Fixpack 1 and am trying to install ANY more recent fixpack. All of them refuse to apply themselves with similar errors. The one below is from Fixpack 2 file v10.5fp2_ntx64_server. ...
0
votes
1
answer
232
views
What is the format of EXTERNAL NAME argument?
When a Java class cl with a method mth resides in a package pck, what should I put into the EXTERNAL NAME clause of CREATE PROCEDURE?
I tried
CREATE PROCEDURE mth (arg1 INTEGER) LANGUAGE JAVA EXTERNAL ...
1
vote
1
answer
312
views
DB2 equivalent of Oracle DBMS_LOB.SUBSTR etc
I have to migrate an Oracle stored procedure to DB2 LUW 10.5. It uses DBMS_LOB.SUBSTR() function on a BLOB parameter that receives an array of bytes from the client code.
What is its equivalent in DB2?...
0
votes
1
answer
1k
views
How can I add a user and specify a password for a in IBM Data Studio? [duplicate]
In Data Studio I can connect to a sever/database, go down to Users And Groups, right-click on Users and add a new one. But the program never asks me for a password. How can I specify it?
Also, no ...
1
vote
2
answers
1k
views
How to change default db2 database admin username to something else in Linux? [closed]
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
2
answers
1k
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
1
answer
97
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
1
answer
8k
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
1
answer
61
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
0
answers
240
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
1
answer
2k
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
1
answer
688
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
1
answer
11k
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
2
answers
2k
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
1
answer
103
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
1
answer
769
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
1
answer
621
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
1
answer
915
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
1
answer
758
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
3
answers
1k
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 ...
1
vote
1
answer
3k
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 "...
1
vote
1
answer
1k
views
Character Strings related : string_units db cfg changed from SYSTEM to CODEUNITS32
To handle few special characters, we changed string_units database configuration parameter from default SYSTEM to CODEUNITS32.
Based on IBM DB2 Knowledge Center, there are three methods to achieve ...
0
votes
3
answers
3k
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
1
answer
1k
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
1
answer
227
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
1
answer
2k
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 ...
0
votes
1
answer
1k
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/...
2
votes
1
answer
94
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 ...
5
votes
1
answer
2k
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 ...
0
votes
1
answer
284
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
1
answer
2k
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 ...
1
vote
1
answer
563
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 to ...
3
votes
1
answer
195
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,
...
5
votes
1
answer
8k
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. ...
2
votes
1
answer
3k
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 ...
1
vote
1
answer
100
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 ...
1
vote
0
answers
964
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 (
...
0
votes
2
answers
3k
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
1
answer
1k
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 ...
1
vote
1
answer
360
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 ...