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

0
votes
1answer
217 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 ...
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 ...
1
vote
1answer
725 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
138 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
428 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
440 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
322 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 ...
1
vote
1answer
134 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
1answer
432 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
304 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 ...
4
votes
2answers
776 views

Memory limitations on db2 express-c version 10.1 seems stuck at 2 gig, why?

I just updated from 9.7 to 10.1, to leverage the new 4gig memory limitation. However, my app only appears to be using 2. So i searched for a way to find out how memory is used and found this ...
3
votes
2answers
1k views

What specific tests need to be performed under Database migration from DB2 to Oracle?

Currently I am going to be testing (I am a Data Analyst) of a larger migration project where they are planning to migrate from DB2 to Oracle. My question may be little broader; however any ...
1
vote
4answers
4k 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 ...
2
votes
1answer
1k 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 ...
1
vote
1answer
175 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 ...
0
votes
1answer
300 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. ...
6
votes
2answers
858 views

Stored Procedures Best Practices: Fenced or Unfenced?

I believe I understand the reasons behind fenced and unfenced stored procedures. Fenced run "outside" of the database (in our case DB2) so as to prevent possible corruption of the database engine ...
0
votes
1answer
345 views

Get all the database in db2 through web

I would like to get all the databases available on a db2 instance from a C# application. The CLP command to be used is LIST DB DIRECTORY. How can I fire this command from C#? Is there another select ...
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 ...
0
votes
1answer
1k views

“SQL1042C An unexpected system error” when creating a database

I installed DB2 Express-C 10.1 on OS X 10.8.4. I installed it in user mode, and it seems to have created an instance with my username (avernet). I checked the instance is indeed there by running ...
1
vote
2answers
1k 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" ...
2
votes
1answer
907 views

DB2 Server Table Space Locked

At work we keep receiving the following DataException seemingly at random when one of our processes tries to write/access a table for one of our clients: com.ibm.db.DataException: A database manager ...
0
votes
1answer
720 views

“connectivity libraries needed are not found” error in IBM Data Studio

UPDATE I am getting the following error when I try to create a new database in IBM Data Studio v3.1.1.0. The connectivity libraries that are needed for local or remote non-JDBC operations were not ...
2
votes
2answers
326 views

How can I automate copying DB2 table data between remote Servers?

I have two IBM DB2 servers at separate remote locations. I need to copy data from several tables on one database on the first server to another database in the second server. Previously I've used ...
3
votes
2answers
417 views

IBM DB2 v9.7 HADR TSA failure on the standby server

I have an environment here where I have 2 servers running DB2. One is the primary and the other one is standby. They replicate with HADR and failover is made automatically by TSA. What's the default ...
2
votes
1answer
305 views

How to restore from a backup of a very old version of DB2 (version 6.1 backup)?

I am helping a client with some legacy application that is still running DB2 6.1 on Windows 2000! I am helping them migrate to newer software/hardware infrastructure. I have a backup of the DB2 6.1 ...
2
votes
1answer
1k views

How to restore IBM DB2 database from AIX to Windows?

I had made backup from remote IBM DB2 server in AIX using this command: ./db2 backup database DBEMP to /home/dbemp/backup Then I grab the backup file using FTP Client from my Windows. I run this ...
4
votes
2answers
9k views

How to backup IBM DB2 Database online?

I tried to backup the IBM DB2 (LUW) Database using this command: ./db2 backup database DBEMP to /home/user1/db2bkup But I got this message: SQL1035N The database is currently in use. ...
1
vote
1answer
3k views

IBM DB2 Database name not found but I can connect using IBM Data Studio. What happened?

In IBM Data Studio, I can create a connection to a remote IBM DB2 LUW database named DBEMP and browse the schema and data. Here is the steps to create the database connection: From IBM Data Studio, ...
1
vote
1answer
195 views

SQL Index order and performance based on cardinality and data

I've been working quite a bit on a query that's not operating very efficiently on a DB2 database. The thing will return up to 30k rows or so and take up to 10 seconds. I've been working on getting ...
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
2answers
1k 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
0answers
227 views

Application using DB2 not launching due to Win 8

My application uses DB2. It is working fine in Win 7, but not launching in Win 8. Giving error System.Configuration.ConfigurationErrorsException: Failed to find or load the registered .Net ...
1
vote
0answers
502 views

DB2 Load Failure due to timestampformat

I'm trying to load a file into DB2 database table using DB2 Load. I'm able to load the file, using the following statement from the unix prompt. db2 +p -x load from BOM_Sales_20130326.txt of DEL ...
1
vote
1answer
900 views

Immediate refresh materialized views (MQT) with OUTER JOIN under DB2

DB2 accepts a materialized view based on an "OUTER JOIN" query, as long it doesn't refresh automatically (REFRESH IMMEDIATE). I cannot find a simple solution to get round this problem. Perhaps with ...
2
votes
2answers
400 views

SQL3550W: … target column has been defined as GENERATED ALWAYS

I am trying to export + import data from a table in a db2 database to another. But while running the export command I am getting the following error. SQL3550W The field value in row "26" and column ...
4
votes
2answers
1k views

List DB2 backups

Is there a way to list the DB2 backups? All I can find is db2 list history backup all for <dbname> but I think you need to check through all of those to see if they've since been deleted. This ...
0
votes
1answer
81 views

DB2 PureScale on Linux

Searching for DB2 PureScale supported hardware, I can see that for Linux distributions only, some System X and IBM BladeCenter BladeCenter HS22 are listed. If I try to install PuseScale on a Fujitsu ...
1
vote
1answer
717 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
105 views

Determine if existing Trigger acts on field DB2

I am eventually going to be writing a trigger on a field named "user2". Currently most of the values in this field are blank, but there are some seemingly random rows with values of '00' for the ...
3
votes
1answer
446 views

Dutch characters in DB2 problem

Ok, first of all, I have really limited knowledge about databases. Problem that I have is next: I inserted few rows with data that contains Dutch characters, such as names of different countries. ...
1
vote
1answer
456 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 ...
2
votes
2answers
520 views

DB2 UPDATE TRIGGER

I am trying to create a trigger in a DB2 database that runs on the update of a column in one table, and then fills in another table with certain values. For example, there is a power unit table with ...
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 ...
6
votes
6answers
3k views

On DB2, who updated a record and what did the record look like before the update?

(SQL Server 2008 R2 Standard, database under full recovery) I have a table with fields id, firstname, lastname. A statement is executed: insert into dbo.sometable (id, firstname, lastname) values ...
1
vote
1answer
1k views

db INDEX on ORDER BY FIELD in very simple query does not help - still slow response?

I have very simple query which returns 200K records very slow (20 seconds). SELECT * FROM TABLE ORDER BY ID DESC If I do just SELECT * FROM TABLE it returns quick result. I created INDEX on ...
1
vote
2answers
1k views

How do I add a database in IBM DB2

I'm supposed to migrate a MySQL database into IBM DB2, but I thought I'd take baby steps first before I do something like that. So for now, I'd just like to add a database. I'll admit that I have no ...
2
votes
3answers
2k views

How do i subtract a number of days from a prepared statement parameter in db2?

I have a C# application using OLEDB to connect to a DB2 database. Basically, I want to do this: SELECT CALC.WEEK, COUNT(CALC.ID) AS TRANSACTIONS , SUM(CALC.SUBTOTAL) AS REVENUE FROM ( ...
2
votes
2answers
1k views

CREATE INDEX for long columns

I am looking for alternative to create index on long column: create table line ( field_key integer not null, value varchar(4000), ... ); create index key_value_idx on line ...
1
vote
1answer
892 views

Is storing archive logs on local disk and backups on vendor storage possible?

I am using DB2 9.7. My LOGARCHMETH1 is set to VENDOR library. Example: LOGARCHMETH1=VENDOR:/usr/openv/netbackup/bin/nbdb2.sl64 Is it possible to call the following backup command: db2 backup ...