The IBM DB2 Enterprise Server Edition is a relational model database server developed by IBM. It primarily runs on Unix (namely AIX), Linux, IBM i (formerly OS/400), z/OS and Windows servers.

learn more… | top users | synonyms

1
vote
2answers
113 views

Reasons for db2 foreign key error (-667) despite all rows appearing sane?

I have some csv formatted table dumps and loaded those into a new database with the tables defined by a DDL script from the source database (both acquired by somebody else so I cannot have a look at ...
1
vote
1answer
202 views

Remove single quotes from db2 column name

I have following query which i am trying to execute against db2 database server SELECT REPLACE('\'abc\'','\'','') FROM TN_DAY_PROCESS I am expecting the output like abc without single quotes from ...
1
vote
1answer
805 views

How do I compare two tables with the same column definitions in different schemas?

Any advice would be appreciated. I'm leading my projects initiative to upgrading our ETL software. This can result in data integrity differences. My testing plan is as follows: create an identical ...
2
votes
1answer
66 views

DB2 9.7, create or replace tablespace possible?

I am creating my tablespaces in the sql scripts that create the database schema. This causes a problem in continuous integration processes, where consecutive execution of the script is not possible ...
1
vote
1answer
119 views

Can we change DB config after db creation in DB2

Can we change below configuration of DB2 Database after DB is created. Database territory = US Database code page = 1208 ...
0
votes
1answer
38 views

SORT_SEQUENCE is wrong in as400 library indexes. Can this cause performance issues?

I have 4 AS400s running JDEdwards. Lately a performance issue occured as described here: AS400 Performace issue Although i am not an expert in AS400 , i tried to find out the cause. I think it came ...
1
vote
1answer
1k views

Run a Stored Procedure in DB2 (which has dynamic DDL) under the Definer rights

For our Datawarehouse applications, we want to perform ALTER TABLE ALTER CONSTRAINT <constname> NOT ENFORCED, before the load. Perform the load and then ALTER TABLE ALTER CONSTRAINT ...
0
votes
0answers
18 views

DB2 bidirectional replication of federated object?

Bidirectional replication of a federated object - is this possible on DB2? Example: replication of a table on the DB2 and another table on MySQL as federated object inside of DB2. Anyone ...
0
votes
0answers
57 views

DB2 manual asynchrounous real-time replication to NON-DB2 database

I have been given a Proof-of-Concept task to find out whether it is possible to set up manual (=no 3rd party tools allowed) asynchrounous real-time replication in DB2 that replicates all data changes ...
0
votes
0answers
37 views

MySQL manual asynchrounous real-time replication to NON-MySQL database

I have been given a Proof-of-Concept task to find out whether it is possible to set up manual (No 3rd party tools allowed) asynchronous real-time replication in MySQL that replicates all data changes ...
0
votes
0answers
406 views

Export to csv using db2 v10 for z/os

in db2-luw, I can create a csv using the export command. However, running the same command in z/os results in: SQL1325N The remote database environment does not support the command or one of ...
2
votes
1answer
114 views

DB2 SUM / INNER JOIN question

I have a query that is the following: SELECT CMSTKY AS Customer, CMNAME AS BusinessName, WKMDL# As Model WKSLD# AS Sales FROM GPCMP INNER JOIN GPCM1P ON GPCMP.CMSTKY = ...
0
votes
1answer
322 views

DB2 selects break after migrating from RHEL5, V9.7 to RHEL6, V10.5

I'm migrating a bunch of perl CGI scripts from an older RHEL5 installation to a RHEL6 server. On the old server, DB2 V9.7 was installed, the new server has V10.5. No databases on the servers ...
1
vote
1answer
25 views

How can I create DB2 objects with Linux SUDOer authority?

All, I am relatively new to Red hat linux and I have SUDOer authority but unable to create DB2 database or other objects. How can I accomplish this task? Please give examples. Also, is there any ...
1
vote
1answer
957 views

How to grant rights for a user in DB2 Express?

I have installed DB2 Express on a PC. My user is not an administrator user, however as far as i know, it is possible to grant a user rights, so he can create/delete/modify a database. I have ...
0
votes
0answers
329 views

db2 - after the reboot - database is restarting itself after some time (urgent help needed)

we had to reboot server because storage administrators had to extend storage for db2data. We have 9.7 FP 0 on Linux. After that when we started the DB database is restarting itself after some time. It ...
0
votes
1answer
91 views

How to track IOPS statistics?

Is there a way to access statistics about IO operations per second in DB2 9.7? I am not interested in the buffer pool hit ratio, just IOPS.
0
votes
1answer
177 views

DB2 - How to estimate proper BUFFERPOOL size?

DB2 9.7. 8GB RAM on server. Currently BP has 500 MB (number of pages*pagesize) Database has issue with increased IOPS. So we think maybe BP should be increased. How to estimate needed size for BP? Is ...
0
votes
2answers
173 views

DBI1011I Error when using db2iupdt to enable Text Search

I'm trying to enable Text Search in my DB2 instance. I'm running this command: # /opt/ibm/db2/V10.5/instance/db2iupdt db2inst1 -j "TEXT_SEARCH,db2j_db2inst1,55000" I get this error: DBI1011I An ...
2
votes
1answer
180 views

db2 performance issue - large number of IOPS how to determine problem?

DB2 database is on storage. We are using 9.7 Storage administrators reported that today database was doing 5000 IOPS (during past days average number was 300 IOPS). Those are disk operations from ...
0
votes
1answer
35 views

Why db2data folder changes its size (increasing and decreasing )?

we have DB2 9.7. It has almost 30 GB. Data are on this /opt/IBM/db2data/ctginst1/NODE0000/DB_NAME/Txxxxxx I noticed that every day during the day (suppose because of the workload) DB change its size ...
0
votes
0answers
35 views

What is the “Other” Memory Pool in DB2 LUW?

I have a Memory Pool consuming the better part of my server's memory, but I can't seem to find any proper documentation on what this Memory Pool actually is for. What is the "Other" Memory Pool in ...
0
votes
0answers
41 views

Issue with refactoring columns and how ODBC query receives data

We just installed iSeries 7 box and migrated a database from i5. The migration was to accommodate a new version of vendor's application. They made some changes to the columns by increasing them from ...
0
votes
2answers
185 views

DB2 - How to get value for: Transation Per Minute parameter for DB?

Hi is there some easy way to find out what is transaction per minute value for the database? Should I use db2 get snapshot? We are using DB2 9.7 ESE on Linux Thank you in advance
0
votes
1answer
22 views

db2 import and user access

When I import data from DB2 using db2move, the dump file comes with the data exported as "USERX.MYTABLE". The import process seems to be fine, I see lots of: USERX.MYTABLE n rows imported ... But ...
2
votes
1answer
575 views

creating PKs for existing tables - altering column constraints

I am quite new to DB2, so I googled around how to ask questions correctly and so I hope I can provide all necessary information. I have an existing table A1230922.CALSONW with several (195) columns ...
0
votes
1answer
201 views

DB2 - Archive mode - large number of logs in logarchmeth1 folder

maybe for someone this is begginner's questions. I read lot of documentation and set: `LOGPRIMARY 6 LOGSECOND 4 LOGFILSIZ 4096 logarchmeth1 Disk - C:\archive logpath C:\active` Number of logs ...
1
vote
0answers
205 views

error during db2 installation and uninstallation process

I had installed DB2 9.7 Express C at first. I tried to uninstall that version using the control panel and the add/remove programs option because I got the SQL500C error all the time upon system login ...
1
vote
1answer
370 views

DB2 - Archive Mode - on what values to set LOGPRIMARY,LOGSECOND,LOGFILSIZ?

we must set our database from CIRCULAR to ARCHIVE mode in order to enable ONLINE backups. Backups will be done every 1 day. Database is now almost 30GB. Database grows approximately 1GB per month. ...
1
vote
1answer
84 views

DB2 users/ beginer questions

New to this. Looking at db2 schemas, which should be equal to OS system users, right ? Doh apparently not. Except for PC,DB2ADMIN beeing on my OS system How is it, that this select * from ...
0
votes
1answer
455 views

DB2 - Not enough storage in the database heap error when trying to create database

So like the title says I'm trying to create a database using this script db2 -v -t "CREATE DATABASE %DBNAME% ON '%DBDRIVE%' USING CODESET UTF-8 TERRITORY US COLLATE USING SYSTEM CATALOG TABLESPACE ...
1
vote
1answer
79 views

DB2 LUW Query Optimization - IXSCAN timerons greater than total timerons

Sorry - I feel like this is a newb question, but I can't find anything on it. In optimizing a query, I was able to apparently reduce the total timerons from 3,700 to 38. However, on closer examination ...
0
votes
1answer
51 views

What does this TRIGGER do? [closed]

I have this trigger in DB2 that I need to convert to ORACLE, but I don't know how it works in DB2 so i can translate it to a ORACLE one, I think it doesn't do anything. CREATE TRIGGER ERRLOG_TRIGGER ...
1
vote
1answer
332 views

Testing if temp table exists in iSeries SQL stored procedure

What would be the syntax for testing if there is already a global temporary table in DB2 for IBM i 7.1? I tried this after DECLARE GLOBAL TEMPORARY TABLE: SELECT * FROM QSYS2.SYSTABLES WHERE ...
0
votes
1answer
48 views

Database Configuration In DB2 and Oracle

what is the equivalent in Oracle for these field (taken from DB2)? Interval for checking deadlock (ms) (DLCHKTIME) Lock timeout (sec) (LOCKTIMEOUT) Thanks,
2
votes
3answers
1k views

UPDATE … FROM … syntax for iSeries for a MS SQL Server developer

When I wanted to update a table to the values from another table in SQL Server I would use following syntax: UPDATE t1 SET t1.a = t2.a FROM t1 INNER JOIN t2 ON t2.b = t1.b What would be iSeries 7 ...
3
votes
2answers
207 views

cross database way to force join strategies

[how to enforce the query to use certain join algorithm] Knowing that there are several joining algorithms [Nested Loop; Sort Merge; Hash Join], when implementing a query , is there any technique to ...
1
vote
1answer
295 views

“Scan interface error” when connecting to a DB2 database restored on a different server

I restored a database backup taken on a different server using this script: FORCE APPLICATIONS ALL; RESTORE DATABASE MY_DATABASE_NAME FROM /backup/db2inst1 TAKEN AT 20140104051657 ON ...
0
votes
1answer
235 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 ...
1
vote
2answers
216 views

Tablespace utilization in db2 (percentage of tablespaces)

how much free space is there…in each tablespace, How to calculate… i need tablespace utilization in MB's and...how can i get tablespace percentage also...used and usable
0
votes
1answer
152 views

I am not able to create this DB2 SP. What is the issue with it? Not getting it [closed]

I am not able to create this DB2 SP. What is the issue with it? I get the following error: Category Timestamp Duration Message Line Position Error 18/12/2013 09:43:46 ...
2
votes
0answers
238 views

IBM DB2 Command line Window - Administrator disappears on windows server 2008 r2?

I have installed IBM DB2 version 10 on windows server 2008 r2 machine. However i am unable to open it's command line window. For example: Whenever i try to open Command Windows - Administrator it ...
2
votes
1answer
41 views

DB2 MQT not rewriting role playing columns

If in a MQT, if I have 2 referential constraints to the same table (role playing) , usage of one of the constraints doesnt allow the query to be optimized Example FACT_SALES DIM_BILL_TO_ID --> ...
1
vote
1answer
139 views

DB2 Materialised Query Table performance problems

I'm comparing performance on a series of tables involved in insert/updates/deletes. These tables are about to become the source tables for a Materialised Query Table so I thought getting some ...
1
vote
1answer
89 views

db2 connecting to a db via alias and storing user name and password

I created a TCP node and I catalogued a db into it. The catalogued db needs user name and password to be accessed. Is there anyway I can store username and password in the cataologue (or other way)? I ...
1
vote
2answers
296 views

DB2: Cannot use RUNSTATS/REORG in trigger definitions?

CREATE TRIGGER MY_TRIG AFTER INSERT ON MY_TBL FOR EACH ROW BEGIN IF SOMECONDITION THEN DELETE FROM MY_TBL WHERE PK IN (SELECT PK FROM MY_TBL WHERE SOMEOTHERCONDITION FETCH ...
0
votes
0answers
153 views

db2 cannot execute C-function for Reason code 4

I've implemented a function as C code for db2. The library name is called libmyfoo.so and is stored id /usr/local/lib as declared in the External declaration. When I try to execute this function I get ...
1
vote
2answers
93 views

db2 executing command crash shell

I have a simple ksh script that executes db2 queries, such as #!/bin/ksh #some initialization #step1,2,3 set -e db2 -x "select * from table a " #step4 The main issue seems to be caused by the db2 ...
1
vote
2answers
129 views

query to check all SCD tables that have data for specific date

It's easy to find all SCD tables through select * from syscat.TABLES t join syscat.COLUMNS s on t.tabname = s.tabname where s.COLNAME = 'EFFECTIVE_DTE' and t.type='T' ...
1
vote
0answers
67 views

DB2 crashes when XML columns used in Cursors inside a SP

This is the Stored Procedure code written in DB2 V9.7 LUW FP5 **CREATE OR REPLACE PROCEDURE USP_TEST ( IN LOC_LIST XML) P1: BEGIN ATOMIC DECLARE IV_SOV_LOC_ID BIGINT; DECLARE ...