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
132 views

DB2 critical alert “database partition availability”

I have a existing DB2 database that I'm just getting started with and I have connected IBM Data Studio (web) to it and it says that it has the alert "Database Partition Availability" but it doesn't ...
1
vote
2answers
30 views

How can I know my database version?

I need to know what is my database version. I'm using DB2 V9.7 on linux 64 bits. I'm connected to a database and i need to know if it is 32 or 64 bits. Can someone help me?
1
vote
0answers
12 views

How do I modify a stored procedure in IBM DB2?

I have a DB2 database and I'm using Control Center. I've found a procedure in the 'Stored Procedures' folder, which I need to modify. In MS SQL Server and Oracle you can accomplish this right from the ...
2
votes
0answers
39 views

DB2 CASE statement faster with parentheses around entire WHEN

Trying to optimize slow queries, someone on my team come across this. Having this in our stored proc: CASE WHEN MYCOL BETWEEN @STARTNUM AND @ENDNUM AND RECTYPE = 'RO' THEN 1 ELSE 0 ...
1
vote
0answers
23 views

How do I cast a varchar to Bigint in DB2

I have a field which is varchar(25) and I need to create a join between that field and a field that is a bigint So I guess I need to convert the field into bigint aswell but it's giving me some ...
2
votes
1answer
985 views

Split comma separated entries to rows

I have a Table like this: | ID | OtherID | Data +--------+-----------+--------------------------- | 5059 | 73831 | 5103,5107 | 5059 | 73941 | 5103,5104,5107 | 5059 | 73974 | ...
1
vote
0answers
44 views

Export entire Oracle schema to ASCII and import into DB2

I'm looking for a solution to export a number of schemas from Oracle to ASCII or other flat file format. The data then has to be read by DB2 import. Does anyone know the what oracle export commands ...
3
votes
0answers
28 views

DB2 - what happens when SQL archive log file reches its maximum value (S9999999.LOG)

we have DB2 in archive mode. archive log files are created and deleted from the disk. What will happen when archive log file reaches its maximum value for the name (S9999999.LOG) will it start to ...
1
vote
0answers
10 views

PHP and cleansing DB2 data for dynamic Queries [migrated]

I'm relatively new to DB2 for IBMi and am wondering the methods of how to properly cleanse data for a dynamically generated query in PHP. For example if writing a PHP class which handles all ...
1
vote
1answer
480 views

How to Start DB2 10.5 HADR on the Standby Database

I am trying to set up HADR to run on my DB2 10.5 DB2 servers. I believe I have followed the steps correctly, but I'm getting the following error: [db2insh1@rslvm20 OneView]$ db2 restore database ...
1
vote
1answer
3k views

Run a Stored Procedure in DB2 (which has dynamic DDL) under the Definer rights

For our Datawarehouse applications, we want to perform ALTER TABLE ALTER CONSTRAINT <constname> NOT ENFORCED, before the load. Perform the load and then ALTER TABLE ALTER CONSTRAINT ...
1
vote
2answers
220 views

DB2 db2fm proccess

Server is been up for 365 days, however i got some weird repeated procceses. Are these normal? ps -fea | grep db2fm db2inst1 643284 229516 29 May 25 - 212564:06 ...
1
vote
1answer
2k 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
282 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
19 views

Use of SET INTEGRITY for DETACH PARTITION

I have some partitioned tables with DB2 LUW 10 . We have one partition for each data.I am reviewing a DB2 stored procedure that runs daily detaching old data partition and creating a new partition ...
1
vote
1answer
126 views

How to determine when REORG with LONGLOBDATA is required (DB2)

REORGCHK only identifies when a reorg is required for space reclamation on normal (non-LOB) data. Is there a way of determining how many pages are wasted due to LONG and LOB data that has been ...
0
votes
0answers
13 views

Can't auto-start db2 with db2iauto

Followed guide Auto-starting instances . [root@oktest-stage-db-1 ~]# db2greg -getinstrec instancename=db2inst1 | grep -i startatboot StartAtBoot = 1 [root@oktest-stage-db-1 ~]# ...
1
vote
1answer
15 views

Where do I set the I/O size for DB2 9.7 LUW driver (AIX 6.1)?

I am looking to change the I/O size returned from the DB2 server for query results. (As per below instruction from SAP BODS 4.X performance optimization guide) Increase the size of each I/O from ...
0
votes
1answer
977 views

DB2 - how to safely blow away database on linux?

I'm using (I believe) 10.1.2, on CentOS 6.5 (for sure). The underlying problem I have is that the database upgrade package prepared in house isn't working for me, in at least the sense that the ...
1
vote
1answer
835 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 ...
2
votes
1answer
1k 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 ...
0
votes
0answers
22 views

DB2 Fixpack 10 install missing folder!

Hello everyone that are reading this! I'm trying to perform a fixpack install into DB2 9.7 version database in a linux 64 bits server. i terminate my database, stop my instance. And when i try to ...
0
votes
1answer
408 views

Problem deleting detached partition in DB2 LUW V9.7

Recently in prod environment we are having problems while dropping the detached partitions its giving this error """ DB21034E The command was processed as an SQL statement because it was not a ...
0
votes
2answers
111 views

List of open (uncommitted transactions) in DB2 LUW

How can I get list of open (uncommitted transactions) in DB2 LUW? Or just the oldest transaction id? Basically, I need to get the first change of the oldest open transaction. I found ...
3
votes
2answers
4k views

DB2 to require password each time

I am using db2inst1 to connect to a database in DB2 which I have installed on my machine. Therefore, db2inst1 user does not require username/password authentication (borrows them from the OS). I would ...
1
vote
1answer
2k 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 ...
1
vote
0answers
18 views

DB2 Setting up table access based on LDAP groups

I have a DB2 database installed and set up. My users can access any table that I grant SELECT to the PUBLIC group. However, it doesn't appear to acknowledge the groups the user is in in LDAP. The user ...
2
votes
4answers
3k views

UPDATE … FROM … syntax for iSeries for a MS SQL Server developer

When I wanted to update a table to the values from another table in SQL Server I would use following syntax: UPDATE t1 SET t1.a = t2.a FROM t1 INNER JOIN t2 ON t2.b = t1.b What would be iSeries 7 ...
0
votes
1answer
123 views

How to track IOPS statistics?

Is there a way to access statistics about IO operations per second in DB2 9.7? I am not interested in the buffer pool hit ratio, just IOPS.
1
vote
1answer
34 views

Is there any way to trace optimizer's work in DB2?

Just like the MEMO structure in SQL Server which is kind of a "paper trail" of steps the optimizer takes in optimizing the query, is there anything in DB2 through which I can get the information like, ...
1
vote
2answers
36 views

What is the impact on a running database when OS date is changed and set to past

My SAP back end db is db2. Need to understand the impact on this running database (db2 under HPUX) if I change the OS date and set it to a past date please. Thanks.
0
votes
1answer
617 views

DB2 Linked Server on SQL Server 2012 - Grant Access to Users

I have a linked server on SQL Server 2012 Instance to point to a DB2 database and I have Sys Admin access to that Instance. I am unable to test connection to that DB2OLEDB database as I get below ...
2
votes
2answers
40 views

DB2 sorting by lowercase uppercase - problem

I'm struggling with DB2 - sorting by Polish letters with diacritics and uppercase/lowercase. When I created a database using: CREATE DATABASE P1DS8 AUTOMATIC STORAGE YES ON '/home/db2inst1' DBPATH ...
1
vote
1answer
70 views

db2pd: Database mydb not activated on partition 0

As a user with DBADM privileges I enter db2pd -db mydb -locks showdetail from the DB2 CLP. The command then fails with message Database mydb not activated on database partition 0. Option -locks ...
6
votes
7answers
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 ...
2
votes
1answer
89 views

DB2 9.7, create or replace tablespace possible?

I am creating my tablespaces in the sql scripts that create the database schema. This causes a problem in continuous integration processes, where consecutive execution of the script is not possible ...
1
vote
1answer
68 views

DB2 ROLLFORWARD option “TO END OF LOGS” - does it read archive logs?

I read about ROLLFORWARD option on link http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0001978.html?cp=SSEPGG_9.7.0%2F3-6-2-4-106 but I could not find ...
1
vote
0answers
51 views

DB2 TSM Archivelog backups missing

New to DB2 on AIX currently running V9.7 Using TSM to backup the database with the command: db2 backup db (db name here) online use tsm include logs When I run the backup it finishes without ...
1
vote
1answer
64 views

DB2 ROLLFORWARD ERROR when doing “TO A POINT IN TIME” option

I do restore command of backup image which was made 03.03.2015 at 19:20: db2 restore database maxdb71 from "/data/archiveBackup" taken at 20150303192002 without prompting; Then I try to do the ...
1
vote
1answer
74 views

DB2 - question regarding RESTORE OFFLINE backup and Archive Logs

I configured last night DB2 to be in Archive Mode. I created required offline backup at 23:00 last night. First online backup will be created at Friday night. Archive logs now keep coming to the ...
2
votes
0answers
30 views

How to reinstall a legacy DB2 Server 7.x for Linux?

We have to move our legacy database dump to a new Linux installation. I know DB2 7.x is out of support for over a decade, but is there a way to obtain a DB2 7.x Server installation media for Linux? ...
1
vote
1answer
10k 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 ...
0
votes
1answer
31 views

Multiple records and determine if a combination if values exist and write this to a new column

I'm struggling with a problem. An order can have multiple lines and accordingly a type (F=Footwear/N=Non-FTW,Mixed=Both) I need to determine if the order consists of which type and create a new ...
1
vote
0answers
58 views

accessing DB2 database connection by squirrel sql client

I am Ramashankar actually I am using Ubuntu OS . When I try to connect with DB2 database through Squirrel sql client it shows the connection is successful but no database table shows after connecting ...
0
votes
1answer
37 views

DB2 PURGE (old Online Backups and Archive logs) - some of the archive logs are not removed

DB is in Archive Mode. We are creating full Online Backups every night at 23:00. We set automatic removal of old online backups and archive logs. AUTO_DEL_REC_OBJ ON NUM_DB_BACKUPS 2 ...
0
votes
1answer
33 views

DB2 Transaction Logs - can they be COPY-PASTE on another Disaster Recovery Server?

We have Server1 with Online Backup1, Archive Logs 1,2,3 for example and Transaction Logs from 1 to 10. We are interested in next scenario: If Server1 fails completely and we want to move everything ...
2
votes
1answer
37 views

DB2 - Why new multiple C000000x subfolders are created in Archive Log folder?

After switching to Archive mode (from Circular mode to keeping archive logs on the disk) we had C0000000 folder where archive logs were copied. Now I noticed that folders C0000001, C0000002, C0000003 ...
1
vote
1answer
35 views

DB2 Indexes are taking very large size on disk space

I have huge table in DB with estimated size 7 GB (I saw that using DB2CC and did the action Estimate Size for that Table). In estimate size dialog I noticed that two of my indexes for that table ...
1
vote
0answers
8 views

DB2 Change Journal Receiver Size

We are running DB2 on our iSeries, and there is a journal + journal receiver created. The current size of the journal receiver is 200MB (found using the DSPJRNRCVA command). Is there a way to change ...
1
vote
1answer
115 views

DB2 Express User ID Authority Error [closed]

I'm trying to create a sample database in first steps after installing db2 Express V10.5 I've looked at the answers provided below, but I'm not able to resolve my issue. How to grant rights for a user ...