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

2
votes
2answers
686 views

Syntax changes between DB2 for i (DB2/400) v5r4 and v6r1

Does anyone know where can I find list of syntax changes between DB2 for i v5r4 and v6r1? We are currently migrating a backing database for an application from DB2 for i v5r4 to v6r1 and found out ...
2
votes
1answer
544 views

Does DB2 have equivalents for Oracle's UTL_ENCODE and UTL_RAW modules?

I'm looking for something similar to: utl_smtp.command(conn, utl_encode.base64_encode(utl_raw.cast_to_raw(<username>))); I couldn't find any reference among the DB2's system-defined modules ...
2
votes
2answers
602 views

What is the recommended Buffer Pool size on a 2GB RAM PC?

I installed DB2 Express-C on a PC with 2 GB RAM and running Windows Server 2008 R2 OS. While creating a new database, there is an option to set Buffer Pool size with default set to 4K. How much is ...
2
votes
1answer
562 views

copy schema across different physical databases in db2

Is there any way to programatically copy across schema (i.e. tables,functions,views) etc from one database over to another one. Assuming both are running same versions of DB2. I found a few utilities ...
2
votes
1answer
233 views

How do you convert IBM DB2's recursive increment to MySQL version?

DB2 Queries: WITH TABLE1 (YEAR_END) as( VALUES (2011)) , TABLE2 (YEAR_END) AS ( VALUES(2011)) , TABLE3 (YEARS) AS ( SELECT 0+2008 FROM TABLE1 T1, TABLE2 T2 union ...
2
votes
0answers
49 views

How to avoid hardcoding a database link name in a package body

I have a PL/SQL package that copies data from a remote DB2 database using a database link. To keep the package configuration-independent I wrapped the remote table in a view. But a single field in a ...
2
votes
0answers
46 views

DB2 Query Error SQL0204N Even With The Schema Defined

I'm using Python to access tables in DB2 10.1.0 I have a login account named foobar and a schema with the same name. I have a table named users under the schema. When I'm logged in as foobar, I can ...
2
votes
1answer
40 views

Adding a column to the view which shows the date in format YYYYMM

In the following view, I want to add a column (not alter the view) named say "ABC" which shows the date in format YYYYMM (no date, only year and month). How can I do that? I am using db2. create view ...
2
votes
0answers
114 views

Adding group rights in db2 for a stored procedure

I have a list of user accounts on AIX server, where the db2 database resides in. The user accounts all belong to a specific group which I can confirm from aix shell. User accounts work in DB2. ...
2
votes
1answer
132 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 ...
2
votes
0answers
160 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
0answers
702 views

Cannot install DB2 Express C 10.1 on Mac OS X 10.7.5 [duplicate]

When I invoke ./db2setup it cannot find the JRE where it expects it. Binary for Java not found as follows: /private/tmp/db2/expc/db2/macos/install/db2setup: line 606: ...
2
votes
1answer
452 views

Can High Water Mark be cleared?

Lately I experience below errors when restoring db2 database SQL2043N Unable to start a child process or thread SQL1084C Shared memory segments cannot be allocated db2stop and then db2start ...
1
vote
2answers
223 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 ...
1
vote
1answer
237 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 ...
1
vote
2answers
774 views

Table orders regarding Nested loop join in DB2

First I would like to cite the existing post Table order in Join Query so the author is saying that the table order really doesn't make things(result, access plan)different. I have doubt on this ...
1
vote
2answers
2k views

set integrity not enforced in DB2

I am a bit confused with the SET INTEGRITY concept in DB2, why we can OFF the set integrity check to put the table in PENDING state ? does that mean that we can neglect the constraint definitions on ...
1
vote
1answer
95 views

Transaction(s) still alive: How do I find the cause?

I can tell that something is hogging the transaction log on the DB2 for one of our Websphere Commerce installations. Basically I have a burst of transaction log files that are timestamped 5 days ago. ...
1
vote
2answers
984 views

Adding User access to DB2

I have installed DB2 10.1 in a Red hat box. During the installation I was asked to create several users (db2inst1, db2fenc1 etc). I have been using db2inst1 to perform all operations with DB2 and it ...
1
vote
4answers
533 views

Backup and restore of RDBMS(Oracle, DB2, SQL Server) from Perl

What could be the best approach ? Till now could figure out the following (Oracle) Calling exp.exe and imp.exe utilities in Oracle client using Java and inturn call it from Perl. Calling exp.exe ...
1
vote
1answer
445 views

What does HSJOIN mean in an Explain Plan?

I have the following EXPLAIN PLAN results from a query on my DB2 database. 0 SELECT STATEMENT ( Estimated Costs = 5.928E+02 [timerons] ) 1 RETURN 2 HSJOIN 3 [O] ...
1
vote
1answer
87 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
70 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
87 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
1answer
571 views

SQL1641N error on linux while running db2start using db2 express c on linux (LUW) but the file system is not mounted using nosuid

I am trying to install and start db2 on my linux machine using the following script: #!/usr/bin/env bash MKDIR=/bin/mkdir RM=/bin/rm TAR=/bin/tar ...
1
vote
4answers
3k views

Query to list all tables in a schema

I am using Rational Application Developer to run querys on a database. We are unable to locate anyone who has a list of the tables on the schema and so far the queries we have found to get a list of ...
1
vote
1answer
159 views

Cannot execute stored proc linked to C routine in DB2

DB2 version: 9.7.0.6 OS: RHEL 5 Here are the steps I took to create and bind a C routine to DB2: 1> Created myprog.sqC file 2> Executed db2 prep myprog.sql bindfile 3> Executed db2 bind myprog.bnd ...
1
vote
1answer
800 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 ...
1
vote
3answers
3k views

What is the purpose of having a table NOT LOGGED INITIALLY

I came across this recently. When defining a table in DB2 LUW (at least 9.5 or higher), you can define it as NOT LOGGED INITIALLY. Example from the book I read: CREATE TABLE products ( productID ...
1
vote
1answer
293 views

Analyzing TCB Index Status for DB2

The Following is the TCB index that I could get using a command for my DB2 database. I don't know how to analyze it. Which columns are important? What do they mean? TCB Index Stats: Address ...
1
vote
1answer
10 views

System parameter in catalog tcpip node

What is the purpose of the "system" parameter when cataloging tcpip nodes? >>-CATALOG--+-------+--+-TCPIP NODE--+--nodename----------------> '-ADMIN-' +-TCPIP4 NODE-+ ...
1
vote
1answer
40 views

Way to ensure just one connection to a DB2 database

Let's suppose a database with a bad security design, say everyone access to the database with a user with DBADM or SYSADM authority, and also, there could be only username for everyone (i.e. ...
1
vote
1answer
218 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
2answers
136 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
1
vote
2answers
86 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
1answer
202 views

How to convert DB2 9.5 to DB2 10.5 online (Linux)

How to convert DB2 9.5 to DB2 10.5 online (Linux) ? This can be done with IBM InfoSphere Data Replication? Has anyone done this or have any idea how to do?
1
vote
3answers
124 views

Best practice to query administrative views for instance level elements

I want to query a monitor element at instance level (for example the memory used for the instance) via a query like this: SELECT MEMBER, MAX_MEMBER_MEM, CURRENT_MEMBER_MEM, PEAK_MEMBER_MEM FROM ...
1
vote
1answer
76 views

creating 2 database at the same time in db2

Do you know whether it is safe to have in one shell user db2inst1 creating a database A and having another shell the same user creating at the same time database B? create database A # shell 1 ...
1
vote
1answer
63 views

db2-AIX multiple admin accounts

I'd need to give (aside the instance owner and the administration server) the user rights as database administrator to a group of people already created on the AIX server. Is it possible? what will ...
1
vote
1answer
516 views

Override/kill when Code 3/SQLSTATE=57016 Occurs

I have encountered issues a few times when a process of mine performs a bulk load to a temp table we use for pre-processing purposes. The Bulk load fails for one reason or another (this we are looking ...
1
vote
1answer
3k views

DB2: The transaction log for the database is full, But there is no 'First active log file'

First, I wish to say that I have very little experience with DB2. However, I've been tasked with tracking down the problem and solution to this problem. This is a DB2 database, and our testers are ...
1
vote
1answer
487 views

Cannot install DB2 Express-C 10.1 on Mac OS X 10.7.5

I'm having troubles seting up DB2 Express-C 10.1 on my Mac OS X (v10.7.5). My initial install attempt failed, but then I found ...
1
vote
1answer
129 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
2answers
116 views

Error While restoring DB2 db from AIX to AIX server?

I am required to migrate 1 database One AIX server to another AIX server. To achieve, I took backup from 1 machine and followed below steps 1st Command I tried is as following. db2 restore db ...
1
vote
1answer
318 views

error when trying to connect to remote db2 luw database on linux

I have a db2 client on my local linux machine: alok@hostname:~$ uname -a Linux hostname 3.2.0-53-generic #81-Ubuntu SMP Thu Aug 22 21:01:03 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux alok@hostname:~$ ...
1
vote
2answers
287 views

How to call Oracle's stored procedure from DB2 stored procedure?

I am new to writing stored procedures and wondering if it's possible to call a Oralce' stored procedure from DB2 stored procedure. I have a scenario where a trigger on a DB2 table will invoke a DB2 ...
1
vote
2answers
634 views

A table with a foreign-key, referencing the tables own primary key

I was looking at the database sample that is provided by the DB2 server installaion. This database is the one created when running db2samle.exe from the "bin" folder. I noticed that the table "ACT" ...
1
vote
1answer
2k views

How to run DB Admin Tool (GUI) in IBM DB2 Express-C?

I had installed IBM DB2 Express-C in Windows but I can't find any shortcut to launch the Administration Tools (GUI). When installing, I had selected "Administration Tool" option (I had checked twice ...
1
vote
1answer
514 views

db2 tables altered, reorg

When I alter a table in DB, I need to reorg it: Call Sysproc.admin_cmd ('reorg Table myTable'); if I had done many modifications, how can I know which tables need a reorg?
1
vote
1answer
369 views

Sending a mail using DB2's Proceude UTL_MAIL

I'm trying to send mail from DB2 using the procedure UTL_MAIL. I'm using the DB2 Express Edition 10.1. First I was getting the error of SMTP Server. After using the below command, update admin cfg ...