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
295 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 ...
1
vote
0answers
12 views

DB2 Express User ID Authority Error

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 ...
1
vote
4answers
4k views

What is the purpose of having a table NOT LOGGED INITIALLY

I came across this recently. When defining a table in DB2 LUW (at least 9.5 or higher), you can define it as NOT LOGGED INITIALLY. Example from the book I read: CREATE TABLE products ( productID ...
1
vote
0answers
19 views

Recovery model of current database

I want to know how can I change the recovery model of my current database. I am having sysadm rights.Operating system is windows, Db2 10.5. can some one let me know the command please
3
votes
2answers
3k 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
0answers
40 views

I can't divide 2 count(*) values without returning zero

The statement I'm using is for a KPI in Maximo and I currently have this statement: select (select count(*) from incident where incident.slanum = 'USERADMIN' and incident.actualfinish > ...
0
votes
1answer
108 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
votes
1answer
39 views

DB2 9.5 - Shrink Tablespace

I'm trying to run the following: db2 alter tablespace TABLESPACE1 reduce I keep getting errors. As you can see, I have around 50% free pages. I'd like to shrink it in order to reclaim OS disk space. ...
1
vote
1answer
20 views

Schema copy from 9.5 V to 10.5

Using DB2 move utility db2move to copy schema and database from source to target server. The source server is Server1. The target server is Server2. Do I need to set up the TCP/IP port ...
1
vote
0answers
25 views

Delete Query throwing warning db2

I am trying to delete multiple records from view The view has Instead of Trigger defined .. The view has records consolidated from multiple tables. [db2inst1@testServer001 ~]$ db2 "delete from ...
1
vote
1answer
22 views

DB2: What's the fast way to drop a big partitioned table?

We got a partitioned table with 100000000+ rows, when I drop it it takes 10+ hours and finally failed. how to speed drop command up ?
1
vote
2answers
30 views

DB2 database -> does it continue to be platform-specific? (iSeries, LUW, z/OS)

Wikipedia says DB2 is no longer Platform-specific: Historically and unlike other database vendors, IBM produced a platform-specific DB2 product for each of its major operating systems. However, in ...
1
vote
0answers
29 views

How Do I Get DB2 NoSQL User-Defined Functions to Work

I am using NoSQL in DB2 10.5 FP4. I am creating and connecting to the database with the 'db2admin' administrator user ID on my Windows machine. I also used the 'db2 attach to DB2_01 as db2admin' ...
3
votes
0answers
158 views

How to avoid hardcoding a database link name in a package body

I have a PL/SQL package that copies data from a remote DB2 database using a database link. To keep the package configuration-independent I wrapped the remote table in a view. But a single field in a ...
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 ...
0
votes
1answer
590 views

DB2 - Not enough storage in the database heap error when trying to create database

So like the title says I'm trying to create a database using this script db2 -v -t "CREATE DATABASE %DBNAME% ON '%DBDRIVE%' USING CODESET UTF-8 TERRITORY US COLLATE USING SYSTEM CATALOG TABLESPACE ...
1
vote
1answer
121 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 ...
3
votes
2answers
845 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 ...
0
votes
1answer
466 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 ...
1
vote
1answer
189 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
0answers
35 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
21 views

How Do I Grant Permissions to Replace a Function?

I am getting the following error message (when trying to enable NOSQL in DB2 10.5, although I don't think that's really the issue): Error code: -551 DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, ...
1
vote
1answer
2k 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
177 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
646 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
96 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
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
36 views

db2_install do not have write permission on the directory or file

This is the error I encountered (I ran the db2_install and everything else as root,): DBI1288E The execution of the program /home/DB_SERVER/ibm/db2/v10.5 failed. This program failed because ...
2
votes
1answer
534 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 ...
1
vote
0answers
12 views

DB2 zOS increasing DSSIZE vs adding partition?

I'm trying to load data into a DB2 table. The tablespace has 3 partitions with about 60M,60M,70M rows. The 3rd partition is failing to load. It gives me a warning that loading this partition's dataset ...
1
vote
2answers
554 views

Within a RHEL 6.3 + High Reliability Add-on, how do I add DB2 (v9.7) into a service group to have the service controlled by the cluster?

I have a cluster of machines running RHEL 6.3 with the High Reliability Add-on. I have configured a Clustered Logical Volume Manager (CLVM) file system for DB2, which is working correctly. Our DBA's ...
2
votes
1answer
75 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 ...
2
votes
1answer
33 views

Has some command that lists the privileges of a user in db2?

I'm using db2 9.7 on linux and i want to list my privileges on database... Ex: SYSADM, SECADM, DBADM, etc. So, has some command in db2 that lists the privileges of a user in db2?
1
vote
1answer
30 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, ...
0
votes
1answer
307 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 ...
2
votes
1answer
224 views

db2 performance issue - large number of IOPS how to determine problem?

DB2 database is on storage. We are using 9.7 Storage administrators reported that today database was doing 5000 IOPS (during past days average number was 300 IOPS). Those are disk operations from ...
1
vote
1answer
31 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 ...
2
votes
2answers
3k views

How to drop a DB2 instance when the instance owner was removed

This is a real sticky situation. I was handed over a machine (running an AIX 7.1), and my first task was to re-install DB2 server on it. But someone before me had conveniently removed an instance ...
1
vote
1answer
40 views

Select statement for selecting every week's log record

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

Indicators for right balance of the number of DB2 instances per AIX LPAR

I have a question that has been bugging me, but I just don't know how to validate it. We run DB2 LUW on AIX in our shop. Our AIX is currently at 7.1. Our DB2 is at 9.7 FP 4 for most installations and ...
1
vote
0answers
29 views

Parallel insert in db2

I am trying to import from 8 files and insert into a single table in db2. I am running 8 .sql files that will do the task, but only one of them actually seem to be running and inserting into table. ...
1
vote
0answers
40 views

How to access another db from a stored procedure in db2

I want to query a table in another db from within a stored procedure in db2. For example, I am connected to db_a1, and call a stored procedure from within which I need to connect to a table in db_a2. ...
2
votes
2answers
5k views

Do I need to RUNSTATS after a REORG in DB2?

The REORG documentation says: BUILD Builds indexes. Updates index statistics. But I have always heard REORG/RUNSTATS as if they should be paired. Can anyone verify that "Updates index ...
1
vote
1answer
57 views

DB2 Commands — Different ways of stopping database

I'm hoping to get a more in-depth explanation of the following DB2 commands, which all relate to stopping the database in some way, and how they differ from each other. How do DBAs think about these ...
1
vote
2answers
209 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
295 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 ...
5
votes
4answers
6k views

Emulate REGEXP like behaviour in DB2 SQL

I posted the same on stackoverflow (please, let me know if I have to delete one). I'm working on a DB2 database and as far as I can see regexp is not supported (without additional libraries). So I ...
2
votes
2answers
259 views

Join 3 tables and return only distinct values for max datetime

I've been trying to do this the whole 2 weeks but seems like to no avail. 3 tables involved here. but am expecting the result would be distinct case no. for the same date & user. otherwise, it ...
5
votes
1answer
222 views

DB2 developers can't create table in own schema but SQL and Oracle devs can. Justified?

As a developer new to DB2, I was surprised when I discovered that I could not create my own tables in the development database environment. So, I posed a question to the db2 DBA. I don’t want to be ...
1
vote
0answers
34 views

Auditing AS 400 DB2 library user access

As part of the testing to check for authorized users having access to applications and libraries on AS 400 systems, I need help to figure out a list of users having access to applications hosted on ...