The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [db2-luw]

DB2 for Linux, UNIX, and Windows.

Filter by
Sorted by
Tagged with
0
votes
1answer
18 views

Switching context between two instances from one account

I have a server with two instances running on it (a dev environment) where we use one login to access either instance. I wanted to be able to switch context from one instance to the other without ...
0
votes
2answers
24 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
15 views

What's a way/ways to return Identity element (that is auto-generated) in a table from a stored procedure?

I have tables in my db with auto generated primary keys that I want to get a hold of when inserting new rows from my Java calling code. I'm trying to create stored procedures that handle the insertion ...
4
votes
3answers
14k views

Split comma separated entries to rows

I have a Table like this: | ID | OtherID | Data +--------+-----------+--------------------------- | 5059 | 73831 | 5103,5107 | 5059 | 73941 | 5103,5104,5107 | 5059 | 73974 | ...
0
votes
1answer
75 views

Connection Error while connecting SQL Developer with DB2

I am trying to connect Oracle SQL Developer with DB2 Database. I have added db2jcc4.jar, db2jcc.jar and db2jcc_license_cu.jar Libraries in "Third Party JDBC Driver" DB2 tabs appears Entered Username ...
0
votes
1answer
394 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 ...
1
vote
2answers
50 views

Differences between EDU and thread

In DB2, there is this command that shows active EDUs (engine dispatchable units): db2pd -edus There are two fields in the respective output: EDU ID and TID. According to this db2pd page from the ...
1
vote
1answer
515 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
1answer
973 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
2answers
111 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 ...
2
votes
1answer
1k 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 ...
2
votes
2answers
1k 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 ...
0
votes
4answers
3k 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 ? What I mean is to export all the tables in a schema without specifying table names. Maybe ...
0
votes
1answer
34 views

adding 2nd catalog for linked server to DB2

I am unable to figure out how to add multiple catalogs for a DB2 linked server. I have an initial Linked server setup and working properly, but I am struggling to figure out how to add multiple ...
1
vote
2answers
42 views

DB2 Load Utility Primary Key vs. Unique Index

In short, does the Primary Key double as a Unique Index? Some background: I am trying to load a bunch of data into two tables using the DB2 Load utility loading in IXF file types. The data is ...
0
votes
1answer
421 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 ...
1
vote
2answers
90 views

Db2 REORGCHK returns the SQL2310N (Error “-668”) message

I have a Db2 database on my Linux laptop. The database is not heavily loaded. I access it from time to time for the development purposes. I removed a column: db2 "alter table SCHEMA.TABLE drop ...
2
votes
2answers
223 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 ...
1
vote
1answer
194 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
1answer
19 views

DB2 Audit Policy not producing EXECUTE data

I'm trying to set up an Audit facility on a DB2 AWSE V10.5 FP5 database running on Red Hat Linux Server 6.8. The definition for the policy is : ALTER AUDIT POLICY Failures CATEGORIES ...
0
votes
1answer
42 views

Insert values with leading zeros

How do I insert values with leading zeros in it? Example. db2 "insert into db2inst1.asd_currency (currency_code, currency_name, currency_decimal_count, currency_code_desc) values ('007', 'afghani'...
0
votes
1answer
48 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
581 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
152 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? (...
0
votes
2answers
76 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
37 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
49 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
42 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
2answers
3k 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 ...
0
votes
1answer
34 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 ...
2
votes
2answers
3k 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
52 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
131 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
46 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
vote
1answer
41 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
36 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
159 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
3k 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
69 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
29k 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
778 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
35 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
239 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
21k 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 ...
1
vote
0answers
130 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
73 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
244 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 ...