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
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
0answers
18 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
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 > ...
-1
votes
1answer
38 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' ...
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
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 ...
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 ...
2
votes
1answer
32 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
29 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
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 ...
1
vote
1answer
39 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
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
39 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. ...
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
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 ...
2
votes
2answers
257 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 ...
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 ...
2
votes
0answers
33 views

Optimization suggestions for db2 materialized view

I have a view for db2 9.7 which has consolidated o/p from few tables. The view is built and it is working fine I want optimization suggestions on the view SQL CREATE VIEW XYZZ AS SELECT ...
1
vote
1answer
43 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
15 views

“Approximately equal” between Sync and Async operations for PageCleaners

The documentation of num_iocleaners says: The parameter can be reduced if both of the following conditions are true: pool_data_writes is approximately equal to pool_async_data_writes ...
0
votes
1answer
300 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 ...
5
votes
1answer
221 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
1answer
94 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
49 views

DB2 importing/replacing fields from a file that contains XML

In two tables I have a column called table1.column_xml and table2.column_xml_2 defined as CLOB(1000000). The fields in the column contain XML formatted information like below column_xml ...
-1
votes
1answer
62 views

How we can make database resumable in perl script

I have a Perl code which connects with database and scan data from different different table. I face a problem if I lose my connection: it roll back all the transaction. How could I make the Perl ...
0
votes
0answers
24 views

DB2 LUW 9.5 ignoring indexes

I am seeing something in DB2 that I've never seen before. DB2_VERSION: 09.05.5 AIX VERSION: 7.1.0.0 I've got a query that is properly indexed. In fact, it’s heavily indexed. However, when I get the ...
2
votes
1answer
48 views

How to apply a regex on a column fetched from DB

I am using IBM DB2. So, I am retrieving a column named SSN from a table. I have to apply the following regex on that column: ([1-57-8][0-9]{2} |0([1-9][0-9] |[0-9][1-9]) |6([0-57-9][0-9] ...
-2
votes
1answer
43 views

Need help with putting conditions on a column in a result set [duplicate]

I am using IBM DB2. So, I have a SQL query in which I am retrieving a person's SSN from a table. I want to put conditions on that SSN column of the result set, conditions like : 1) It should start ...
0
votes
1answer
53 views

In DB2 LUW 9.5, is there any way to change the collating sequence without recreating the db?

The documentation says "no" :-) I'm looking for some heady old DBA to whisper dark secrets about cludgy hacks that I'll get fired for sure for using ;-)
0
votes
0answers
31 views

DB2 Trigger for EVENT and ARCHIVE TABLE

I have a requirement on DB2. There is a two Table EVENT and ARCHIVE. Both table has ROW_ID and STATUS field. Case 1: When Update STATUS Zero to One at EVENT table that row will insert at ARCHIVE ...
0
votes
1answer
79 views

How do tablespaces differ in DB2 from databases in MySQL or SQL Server? [closed]

In DB2, it seems there is a strong separation between what a database is and what a tablespace is. Where as in MySQL and MS SQL Server tablespace and database seemed to be used synonymously. What are ...
2
votes
0answers
327 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 | ...
0
votes
2answers
104 views

Does anyone use modules in DB2 LUW?

Our environment is currently DB2 9.7 Fix Pack 4 on AIX. I am in the processing of designing and coding some SQL PL stored procedures responsible for archiving data into an archive schema and then ...
1
vote
0answers
31 views

who are the group people in db2 and who are the users db2luw

I am new to DB2, I want to learn basics in db2luw. Like Who will create group, and under this group who are the users, and what group people do, and what users will do Thanks in advance Raghava
1
vote
1answer
95 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
18 views

System parameter in catalog tcpip node

What is the purpose of the "system" parameter when cataloging tcpip nodes? >>-CATALOG--+-------+--+-TCPIP NODE--+--nodename----------------> '-ADMIN-' +-TCPIP4 NODE-+ ...
0
votes
1answer
473 views

configure client ibm_db2 for php

I am installing a RHEL server with nginx and php that can connect to a db2 database, download and install the "IBM Data Server Client" package, also install the pecl library through: pecl install ...
1
vote
1answer
21 views

The query result changes in remote and local database

The below table is created in local database and remote databases. CREATE TABLE EMPLOYEE1 ( EMP_ID INTEGER, EMP_NAME VARCHAR(10), EMP_DEPT VARCHAR(10) ); Insert the below rows in tables created in ...
1
vote
1answer
45 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
votes
3answers
110 views

Retrieve recently inserted 5 rows [closed]

I want to fetch recently inserted 5 rows from my table. I want to know the sql query for the same. My table is: table xyz ( id integer generated always as identity (start with 1 increment by 1), ...
1
vote
1answer
202 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 ...
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
36 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. ...
0
votes
1answer
32 views

Raster files into DB2

Team, We have been loading shapefiles into DB2 using db2se import utilities. I have been trying to find help to load Raster files and i wasnt able to find any help on this. it would be really ...