Tagged Questions

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
262 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
164 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
244 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
42 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
171 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
99 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
316 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
171 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
97 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
134 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
72 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 ...
1
vote
1answer
300 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
148 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 ...
0
votes
2answers
1k views

How to unlock a table in IBM DB2 Data Studio 3.1?

I know the process to unlock a table through IBM DB2 Control Center using activity monitor, but I am completely new to IBM DB2 Data Studio 3.1 Administrative Tool. Whenever i am right clicking on that ...
1
vote
2answers
3k views

INSERT INTO with SELECT subquery db2 9.5

I have the following query that takes 4 seconds to execute: SELECT TX.* FROM TABLE_X TX INNER JOIN TABLE_Y TY ON TY.VALUE_ID = VALUE_ID_IN AND TY.PROD_ID = TX.PROD_ID WHERE (TX.PLACE_ID1 ...
1
vote
1answer
122 views

command line tool on linux to convert oracle sql into db2 sql

IBM has a GUI based tool to convert Oracle SQL into DB2 SQL. Is there a command line tool (preferably on linux) that does the same thing? The reason being, we want to do this work as part of a ...
3
votes
2answers
1k views

Why cannot I call a table function in iSeries DB2 that I just created?

Using iSeries Navigator 'Run an sql script' window I created a new table function. When I go to the Functions branch under the schema where it was created, I see the function among the other few. But ...
3
votes
2answers
453 views

How to transfer database from SQL Server to DB2?

I have a database file on disk called project.mdf. I want to import this into IBM DB2. How do I import this database?
2
votes
3answers
1k views

Not getting a result set in SSRS 2008r2 from an iSeries DB2 SQL stored procedure

After reading 'Defining an SQL procedure' section of DB2 UDB for iSeries SQL Programming Concepts V5R2 and 'Returning result sets from stored procedures' section of i5/OS Information Center, Version 5 ...
1
vote
1answer
95 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 ...
2
votes
1answer
131 views

How efficiently does iSeries DB2 use index with WHERE <>?

MS SQL dev here, this is my first attempt to optimize a DB2 query on iSeries. I was asked to help improve a huge query which consists entirely of dozens of joined subselects. Some of those subselects ...
1
vote
1answer
87 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 ...
2
votes
2answers
615 views

When is it appropriate database design to use a separate schema?

I am developing a database which has data sourced from many different applications. In my first pass at design, I placed the staging tables each in a schema named for their source application. As ...
1
vote
1answer
1k 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
1k views

Db2 Express doesn't start TCP/IP listener (SQL5043N)

At home, I've installed DB2 Express on my Win7 notebook, as a part of the IBM WebSphere installation. At first it was working, but then I restarted Windows and moved to the office, and since then I am ...
0
votes
1answer
1k views

Is there a way to determine automatic storage table spaces?

First off, we are on both Windows and AIX and are using DB2 ESE 9.7 FP 4. I am trying to determine dynamically whether or not table spaces are set up via automatic storage or not (so we can ...
1
vote
1answer
6k 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
111 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
1answer
709 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
190 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 ...
0
votes
1answer
2k views

DB2 9.7 LUW - How do I SET SESSION_USER when I am DBADM,SECADM?

Based on a previous question I have asked, I am attempting to work on a solution as recommended by mustaccio's answer, whereby I have another ID to create my DDL objects. I have been trying to follow ...
3
votes
2answers
6k views

db2 database alias not listed via list database directory but still unable to create that database

I am trying to create a database by logging on to the linux server on which the db2 server is installed, as the instance owner db2 => list database directory System Database Directory Number ...
0
votes
1answer
260 views

db2 SQL0930N error on linux - not enough space to process this statement

This is another newbie question on db2, related to space. How to I start diagnosing and then solving what the problem is so that users can connect to this database? This error is displayed when both ...
1
vote
1answer
945 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
2answers
187 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
560 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
1answer
177 views

DB2 10.1 Client throws SQL0552N running a script

I am trying to run a sql script on a remote database using DB2 10.1 on AIX 6.1. I have granted my admin user (Adm101) on the database server SECADM. But when i run my script on the remote server with ...
1
vote
2answers
601 views

Where can I find the connection string for a DB2 database?

I need to connect an application to my DB2 database. Both application and db are running on the same machine. I've tried this: ...
2
votes
4answers
467 views

Is there any rule of thumb to optimize sql queries like this

this is my first question here. Although I've been helped out from this forum over a hundred times. I was having difficulties in optimizing sql query. It takes hours to execute. Record set is also ...
3
votes
2answers
691 views

DB2 (LUW) equivalent for Oracle “drop user cascade”

This question is related to creating and initialising test and development databases for an application that has the database running on LUW (linux-unix-windows) On oracle, we have an os user (on ...
1
vote
1answer
527 views

db2 LUW help for an oracle user : create database hangs without any output, but database got created

I am new to db2 but have worked on oracle before. Trying to create a database and it succeeds, but the session where I issued a database creation command hangs. I have installed db2 10.5 on a 64 bit ...
1
vote
2answers
337 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
4answers
6k 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
1k views

how to run Db2 export command in shell

I am trying to run the following db2 command through the python pyodbc module IBM DB2 Command : "DB2 export to C:\file.ixf of ixf select * from emp_hc" i am successfully connected to the DSN using ...
1
vote
1answer
194 views

DB2 Insert and Deadlocks

My application has 4 different threads doing inserts into the same DB2 table simultaneously. Could this cause a deadlock / lockwait situtation? Theoretically I don't see a problem here; as one ...
2
votes
1answer
2k views

DB2 Communication link failure issue

I would like to get your valuable suggestions for the below problem. My Perl application connects to a DB2 database and keeps inserting data into a table. The application successfully inserts data ...
0
votes
1answer
363 views

How to revoke DBADM and clean up any related objects from DB2 LUW

This question has started because of us taking copies of production backups and restoring them into lower environments (with scrambled data of course) for developers to practice and/or debug against. ...
1
vote
1answer
936 views

How to use db2look to get the ddl of sequence?

I was wondering how to use db2look to get the ddls of sequence. db2look -d my_db_name -z my_proc_schema - I tried this but it is not showing any results. Is there an option to directly mention the ...
2
votes
1answer
2k views

How to loop through AS400 table with cursor

I have a AS400 table that contains multiple rows per person. Each row contains data concerning a transaction by the person including points assigned to each transaction. I read through all rows for ...
0
votes
1answer
1k views

DB2 LUW: Should temporary tablespaces share bufferpools with other tablespaces?

We are in the process of tuning a massive application our company has just written. Part of that tuning includes tuning the databases. We run DB2 LUW on AIX. Specifically we are at 9.7 Fix Pack 4 ...