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
1answer
719 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
196 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
191 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
569 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
341 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
2k 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
3k 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
874 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
538 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 ...
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
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
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
1answer
711 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
2k views

Install db2 express c on Mac OSX

I have posted the question yesterday, then I was able to figure it out by myself. As I haven't found any complete guide, I'm writing down the steps just in case. So the question is: "How do I ...
1
vote
1answer
224 views

Should indexes automatically be placed into their own bufferpool?

We work with DB2 LUW (specifically we are currently on 9.7 FP4) running on AIX. Per best practices from IBM, they recommend that when you build a table, you place the data, the indexes, and LOBs/LONG ...
1
vote
1answer
1k views

What does TBSCAN GENROW mean in Explain Plan?

In a DB2 Explain Plan, what does TBSCAN GENROW (line 5 below) mean? SELECT STATEMENT ( Estimated Costs = 1.811E+03 [timerons] ) 1 RETURN 2 NLJOIN 3 [O] TBSCAN 4 SORT ...
1
vote
1answer
18 views

How can i give SECADM to instance owner in DB2?

i'm using db2 9.7 on linux and created a user "db2fee1i" to be a instance owner. I restored a database, but even being SYSADM i only can connect to database. I need to give DATAACCESS to another user, ...
1
vote
1answer
33 views

Select statement for selecting every week's log record

Here is a simplified version of the table in question: +------------------------------------------------------+ | DatabaseName | LogRecordNumber | LogTimestamp | ...
1
vote
1answer
39 views

Not getting CLI Trace log DB2

Currently I am working on fixing an issue with the Java-DB2 connection leak. For which I require the CLI Trace logs. In my db2cli.ini I have added the below parameters, but still I am not getting the ...
1
vote
1answer
57 views

db2 removal of Generate always Expression on Timestamp data type

I have a column UPDATE_TIME with an expression TIMESTAMP NOT NULL GENERATED ALWAYS FOR EACH ROW ON UPDATE AS ROW CHANGE TIMESTAMP How to remove the Generated always for timestamps? I tried ...
1
vote
1answer
87 views

Db2 high availability Instance configuration db2haicu fails

Hi I Configured db2 HADR between two servers and the servers are running in HADR Primary and Standby are syncing up I tried to configure the instance configuration utility db2haicu on both the ...
1
vote
1answer
44 views

Removing apostrophe in result set

create view ENTRP_SERVS.V_IRS_BULK as Select Atr.Ssn_Tx ,Names.First_Na ,Names.Middle_Na ,Names.Last_Na ,Reff.Ref_Cd_Desc_Tx Suffix_Na ,MBR.PRSN_MBRSH_ID, T_PRSN_MBRSH_TAX.FILTER_TYPE_CD From ...
1
vote
1answer
176 views

DB2 LOAD: Poor performance while loading table with large BLOBs

I need help regarding LOAD-command with BLOBs. I notice very poor performance while loading a table which contains large BLOBs. While tracing the OS, I only have about 15MB/sec I/O-speed. But in ...
1
vote
1answer
34 views

Equivalent SQL Server's Backup COPY ONLY in DB2

In, DB2 when you have a recovery strategie, you have a Full backup, then some deltas or incrementals in between. They are creating based on the previous full (first delta, or any incre. ...
1
vote
1answer
136 views

Running queries directly on DB2 databases

Just have a general query, if it is really fine or safe to run long select queries on RDBMS production Databases specifically DB2? If NO, what are the major risks and issues in executing select ...
1
vote
1answer
57 views

Spatial Loader DB2 giving error while importing shape file

While I am trying to import a shapefile using db2se import_shape file utility, db2se import_shape <dbname> -userId <userid> -pw <password> -fileName ...
1
vote
1answer
59 views

Merging a Select query into a view

I am using DB2. So, I have a view which is working fine. It is : Select Atr.Ssn_Tx ,Names.First_Na ,Names.Middle_Na ,Names.Last_Na ,Reff.Ref_Cd_Desc_Tx Suffix_Na ,MBR.PRSN_MBRSH_ID From ...
1
vote
1answer
2k views

DB2 SQL: How to select all days in a date range even if no data exists for some days

I am really really new to the whole programming world. I have found this previously. However I need rolling dates and into a SQL i am not aware what it is. Example of the SQL im using: Select ...
1
vote
1answer
268 views

IBM DB2 9.7 and latest 10 version compatibility

At some point projects need to move from IBM DB/2 9.7 to some 10 version. Are there any significant compatibility issues that should be taken into account? We ofcourse use tables in schemas, but then ...
1
vote
2answers
128 views

DB2 removing white spaces in field values

In a table I have a column called column_xml defined as CLOB(1000000). The fields in the column contain XML formatted information. My problem is that there are lots of white spaces in these fields ...
1
vote
2answers
130 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
161 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 ...
1
vote
1answer
26 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
1k 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 ...
1
vote
1answer
101 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 ...
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
124 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 ...
1
vote
1answer
180 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
532 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
1answer
195 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 ...
1
vote
1answer
951 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 ...
1
vote
1answer
221 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
1k 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 ...
1
vote
1answer
134 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 ...
1
vote
2answers
117 views

Partition Fact Table

In one of my fact table which has close to 25 million records in it and now when a cognos team try to run the report on top of that it takes lot of time, So i am thinking of partitioning the table we ...
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
343 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
3k views

DB2 Online Restore but Without Roll Forward?

I read a lot of documentations for db2 restore but I could not find how to perform online restore from the last database backup but without roll forwarding of logs? I will appreciate command ...
1
vote
1answer
200 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
3answers
695 views

Migrate DB2 UDB (Iseries) to SQL Server [closed]

I'm looking for a tools that allows migration of DB2/UDB databases to SQL Server. It's quite easy migrate schema and data using linked server or import export with SISS. But what about stored ...