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

4
votes
2answers
2k 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
90 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
868 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
133 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
526 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
537 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
730 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
3k 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
1k 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 ...
1
vote
1answer
125 views

Online backups with VENDOR library: what should be set for ACTIVE LOG PATH?

My customer is using Veritas NetBackup so we use its library file in the LOGARCHMETH1 parameter for the VENDOR option. That is for archive logging path. What path should be set for ACTIVE LOG PATH ...
1
vote
1answer
342 views

DB2 online restore - “SQL1035N The database is currently in use.”

I am trying to do ONLINE RESTORE ROLLFORWARDING TO END OF LOGS AND COMPLETE. When I run this command I am getting error SQL1035N The database is currently in use. It does not allow any connections to ...
1
vote
1answer
232 views

Database comparison tool for IBM db2 like OPatch?

I am looking for a database comparison tool for IBM DB2. I was wondering if there is a utility for IBM DB2 similar to OPatch in Oracle's db 11g?
1
vote
1answer
199 views

DB2 DBM paramter NUMDB has value 8. Should I change it to 1 because I have only one database?

Hello I am using IBM Maximo application which is using DB2 database and I have created only one database. I heard that when paramtere NUMDB has value 8 it will divide all values in DB CONFIGURATION ...
1
vote
1answer
142 views

DB2 9.7 - Find rows inserted by a specific trigger

We are auditing a table TRANSACTIONS that inserts a row in HISTORY_TRANSACTIONS when specific columns are changed. These inserts happen through a number of triggers defined on TRANSACTIONS table. Is ...
1
vote
1answer
219 views

db2 express c mac osx

I'm experiencing some troubles with the execution of DB2 express c on Mac OSX 10.6 Snow Leopard. I have installed the db system, creating two users, db2 and db2-user. The latter is the instance ...
2
votes
1answer
610 views

How to create Buffer Pool in Database dedicated only for ONE BIG table?

I have table TICKET with 400K records in database (DB2). I wish to create one huge buffer pool which will be dedicated only to this one big table for faster response. What are the steps to do it? ...
3
votes
2answers
719 views

DB2 error - SQL Statement too long or complex

Getting this error in a DB2 production system: ERROR [HY000] [IBM][System i Access ODBC Driver][DB2 for i5/OS]SQL0101 - SQL statement too long or complex. The statement has a large number of OR ...
2
votes
1answer
614 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
652 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 ...
0
votes
1answer
471 views

Preloading a Java library in DB2, similar to ORACLE's loadjava

Edit to add details to clarify, based on Chris' comment: A Java stored procedure depends on external libraries. Locally it compiles successfully, since they are added to the classpath. But when ...
3
votes
1answer
2k views

DB2: Is it good to create the index table space to use 32 KB data page

I found our DB2 server configs all the index into one table space. And it then defines the table space to use 32kb data page. Is this good? How to judge it? Any advice is welcome.
1
vote
1answer
187 views

What is the locking behavior for Updatable/Insertable Views?

Consider I have a View that is merely a simple join between 2 tables, selecting all columns. The View is Updatable and Insertable. What would be the locking behavior when executing an UPDATE or ...
1
vote
1answer
188 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 ...
3
votes
3answers
1k views

Is it a good practice to apply Vertical Partition to a newly created model?

Suppose you are modeling the ER model for a new Object Oriented Web Application. There is a table with 20 columns, and there are going to be a lot of INSERTs populating 10 columns, and a lot of ...
4
votes
2answers
2k views

How do you set the pagesize, codeset and table space when creating a database in DB2?

I want to create a database in DB2. I found some information on this page I want to use only some options which are explained on the page: PAGESIZE CODESET TABLESPACE Then, I want to ...
1
vote
1answer
906 views

How do I use the unload command to export a table to a IXF file

For a table T in schema S, how do I use the unload command to export T data into a IXF file? The IBM DB2 documentation isn't very helpful for this simple case. I am trying to compare performance ...
4
votes
1answer
234 views

Specifying the node to connect in db2

I have 2 nodes in my db2 catalog. How would I include the node on which I want to connect inside the db2 connect paramters? Node 1 entry: Node name = DB2HOST1 Comment ...
2
votes
3answers
1k views

How do I join two tables on two different instances of DB2?

There are two instances of DB2 running on the same machine. One has a table aliased to the a table in the other one. Is there a way to do this in DB2 or does it have to be done via an external tool? ...
1
vote
1answer
709 views

IBM DB2 9.7, possible to temporarily disable transaction logs?

I want to clean the whole database, so I am dropping all tables and DB objects in two FOR loops, within one transaction. This makes the transaction logs become full. I could increase the transaction ...
1
vote
1answer
469 views

Is SET INTEGRITY of any use after IMPORT statements, or just after LOAD statements?

I'm getting the feeling, both from documentation and empirically, that you can only put SET INTEGRITY to good use after a LOAD, not after an IMPORT. LOAD is mentioned for SET INTEGRITY, but not ...
3
votes
2answers
103 views

Searching for pairs of date/time values in a single row

I have a legacy IBM DB2 database table that contains lots of records of phone calls. It has columns for ID, customer number, employee who took the call, etc. The date/time for each call is kept in a ...
4
votes
2answers
544 views

Isolation Level for a Data Warehouse

We are building out a data warehouse (and also some data marts as well) in our organization. My DBA skills have mostly been on OLTP type applications, but I am moving into supporting OLAP for our ...
3
votes
2answers
2k views

Problem installing DB2Express

I installed DB2 Express 10.1 on my Windows 7 (64bit) notebook. Now after the installation finished I cannot connect to the database. During the installation I specified "C:\Daten\db\db2" as the ...
3
votes
2answers
2k views

DB2 Express-C on Mac OS X

I have followed all the steps described on the Getting Started with DB2 Express v9.7 e-book and installed DB2 Express-C on my Mac. The installation succeeded without a problem. I did setup OS X ...
4
votes
2answers
2k views

DB2: Error when using NOT EXISTS with SYSIBM.DUAL in a batch query

I have data in a java object as data1, data2. data1 and data2 together forms a composite key in myTable where I want to insert the object. The writing is happening as a batch. Like 10 insert ...
1
vote
1answer
96 views

Are there any guidelines for the “IBM Premier Level Business Partner”? [closed]

Our company currently subcontracts a DB2 project to a company which have "IBM Premier Level Business Partner". I was just wondering, are there any guideline about what they should provide (say, SQAP, ...
2
votes
3answers
1k views

db2 range partitioning attach and detach issue

We have a table which is used in many select Queries, as it is be accessed by customers to fetch their information. Also they can change their information too whenever they want. We had to retrieve ...
2
votes
1answer
3k views

query to find closest lesser date

I have a table with rates. each rate has an effective starting date. (the ending date of any rate is implied by the existence of a record with a newer effective starting date.) I also have a table ...
2
votes
1answer
2k views

DB2 Express on Windows 7 - Disable security?

I'm trying to install DB2 Express-C on my PC (Windows 7 pro), but no matter how I've installed or configured it, I can't grant the ability to create databases to my windows domain account. No matter ...
2
votes
1answer
293 views

How to choose working database in DB2?

In SQL server I can use the USE statement to switch between working databases. Is there a similar command for DB2?
2
votes
1answer
186 views

DB2 Count problem

We have a query that returns over 20,000 rows on some occasions but times out due to the large amount of data. We have written a COUNT(*) query to throw an error if the record count is more than ...
3
votes
1answer
4k views

How to find out what caused the database(DB2) in a locking state

I know how to check the DB is in a lock state or not, but my question is how to find out which query caused the lock on table /db. IS there any log file getting created if something unexpected ...
1
vote
1answer
319 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 ...
4
votes
2answers
1k views

Replicate DB2 table to SQL Server 2008

I need to replicate data from a DB2 database into a SQL Server Database (along the lines of about 80 tables). I can create an SSIS package, to just flat copy the data from one to another pretty easy, ...
1
vote
1answer
271 views

What program to use for the best compression ratio for DB2 log files?

What linux program to use to compress DB2 log files with the best compression ratio? UPDATE I thought that these log files would be text type files. But viewing them didn't prove this. I tried to ...