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)

0
votes
1answer
985 views

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

I have a linked server on SQL Server 2012 instance pointing 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
1answer
121 views

How to connect DB2 with eclipse on mac?

I tried to connect the DB2 Express-C Version 10.1 to Eclipse Mars but it returns an exception when I tried to run the program. com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: Error ...
0
votes
0answers
13 views

Connecting to z/os db2 via trusted connection using data studio

I need to allow my developers to connect to the database using data studio. I want to use trusted context to handle security/access for this. I can't figure out how to make this work without ...
0
votes
1answer
230 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.
2
votes
1answer
211 views

How to resolve foreign key references across different databases (iSeries and SQL Server)

I've got a system that has a DB2 iSeries database. We are rewriting a portion of the system and implementing it using SQL Server and Entity Framework. Originally, I was lead to believe that there ...
1
vote
1answer
2k 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
3answers
256 views

AUTO_BACKUP not even trying to backup database

I've setup 2 identical linux servers with db2 10.5 . AUTO_BACKUP only works on one of them. Also, no health notifications come from that server at all, although postfix on localhost is running and a ...
1
vote
1answer
25 views

DB2 Reorg-recommended commands

Is there some full list of commands that can cause table to become reorg-pending? I tried google it for a while, but can't find full list. My exact problem for now - can ADD FOREIGN KEY statement ...
4
votes
1answer
39 views

Measure Performance for INSERT, UPDATE and DELETE commands on DB2

I have a DB2 database with a table for daily transactions, which is cleared to a history table at the end of the day, every day. I insert rows to this table via java-JDBC INSERT commands and they ...
1
vote
1answer
147 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 ...
4
votes
1answer
1k views

Adding group rights in db2 for a stored procedure

I have a list of user accounts on AIX server, where the db2 database resides in. The user accounts all belong to a specific group which I can confirm from aix shell. User accounts work in DB2. ...
1
vote
1answer
26 views

DB2 - cannot invalidate a view

I work on something and I need to check some views. I use this code: SELECT SUBSTR(T.TABNAME,1,32) AS TABLE, SUBSTR(T.TABSCHEMA,1,32) AS SCHEMA, T.STATUS, T.TYPE FROM SYSCAT.TABLES T WHERE T.TABNAME ...
1
vote
1answer
3k 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 ...
4
votes
1answer
3k 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
1answer
162 views

DB2 big strange problem - database is returned to CIRCULAR mode but archive logs keep coming to old archive location

my DB2 database (v 9.7) is in Circular mode. Current Logging Type:Circular (USEREXIT) = OFF (LOGRETAIN) = OFF (LOGARCHMETH1) = OFF (LOGARCHMETH2) = OFF (LOGPRIMARY) = 10 (LOGSECOND) = 10 Path to log ...
1
vote
2answers
86 views

How to get the next value of sequence?

Could somebody tell what is wrong with obvious query below: db2 => select next value for schema_name.sequence_name; As a result I'm getting: SQL0104N An unexpected token "END-OF-STATEMENT" ...
1
vote
1answer
37 views

DB2 Database Conversion Workbench Issue

I am currently trying to convert a SQL Server database to DB2. I am using the Data Conversion Workbench (DCW) for IBM Data Studio. The issue I have is that DCW can not seem to correctly extract data ...
1
vote
1answer
3k views

How to run DB2 export command in shell

I am trying to run the following DB2 command through the Python pyodbc module: DB2 export to C:\file.ixf of ixf select * from emp_hc I am successfully connected to the DSN using the pyodbc module in ...
3
votes
1answer
47 views

Unable to restore database because it exists, unable to drop because it does not exist

I've seen this mentioned a couple of times but none of the suggested solutions worked for me, so I'm posting a question together with a solution in hope that it helps someone else. During restore of ...
2
votes
1answer
35 views

#Deleted as values when using MS Access to query a db2 database through ODBC

When trying to query certain db2 tables I get #Deleted for all values in the table. But for other tables it works fine. The row count of this query is equal to the row count when using the data ...
3
votes
1answer
143 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
36 views

DB2 Naming Standards - Similar to OFA

I'm an Oracle DBA getting started on DB2. On Oracle we have a document called Optimal Flexible Architecture that sets a group of naming standards, like what should be the disk name for the database. ...
0
votes
1answer
18 views

Validation of views even though auto_reval is set to DEFERRED

According to http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/r0054951.html?lang=en it should be possible to create stored procedures and views ...
1
vote
0answers
28 views

DB2 - Error accessing a table space SQL 57048

Please can you assist me,I am mighty new at DB2, I done a backup on the prod server in order to mirror the prod server on another server. Backups ran fine. I did the restore on my test server. but ...
0
votes
1answer
139 views

Apply DB2 logs from production to DR

Is it possible to Apply DB2 9.5 logs files from Production site to DR site? Or do I have to do Backup/Restore and rollforward ...? I copied log files from production site to DR and issued the ...
1
vote
2answers
45 views

How can I ensure that only one user at a time can call a stored procedure? Can I lock an SP?

I have a procedure that generates reports basis user requests. The request is such that at a time only one user can call the procedure. Is there any way I can handle this using DB2? Like place a lock ...
0
votes
1answer
69 views

DB2 ODBC inconsistent connectivity

My ASP.net application uses ODBC(64 bit) to connect to DB2 Database(9.5.3). I am using 64 bit IBM DB2 Client 10.5. on Windows Server 2008 R2. Connection pool is turned on. It works fine(immediate ...
2
votes
0answers
42 views

Error in loading data using DB2 load command in DB2 10.5

I have a IBM DB2 database in our application. We have a monthly Java batch process which loads data in the tables using "load Replace" sql command. Around millions of record will be updated every ...
3
votes
1answer
507 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
5k 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 ...
3
votes
1answer
548 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
32 views

DB2 : Alter table: CLOB to VARCHAR

I have a Table which some nut head had created. The data in it is not more than varchar(100) but he has created the column as CLOB. Need to change it to Varchar (100). The below query does not seem ...
2
votes
0answers
60 views

How to check wether a DB2 source table and their MySQL MyISAM duplicate are identical?

I want to compare two big tables if they are identical. If I update/insert one table into the other the process takes about 11 hours. What I am looking for is like a sum function which sum ups a key ...
2
votes
2answers
292 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 ...
3
votes
1answer
35 views

DB2: Reorg and RunStats

Is there any frequency at which i should run REORG and RUNSTATS on my master tables? If i have a daily load of around 1,000,000 records into my table would it be suggestible to run a REORG and ...
1
vote
0answers
27 views

IBM Bluemix SQL Database service data store management

I'm working on IBM Bluemix SQL Database service with premium plan. According to our application the sql service can have many schemas. Is there any way to seperate data storage of each schema to ...
1
vote
1answer
2k views

SQL1641N error on linux while running db2start using db2 express c on linux (LUW) but the file system is not mounted using nosuid

I am trying to install and start db2 on my linux machine using the following script: #!/usr/bin/env bash MKDIR=/bin/mkdir RM=/bin/rm TAR=/bin/tar ...
3
votes
1answer
47 views

How to extract the structure out of DB2 (Back up Structure)?

Is there a way in db2 to take a backup of the database structure (Metadata) without actual data? My purpose is to pull structure (tables, views, indexes, triggers, procedures and functions) from an ...
1
vote
0answers
34 views

Error adding Database to TSA Cluster - db2haicu

I'm testing TSA Clustering using two test servers. It's replicating our production environment. I'm using two nodes shared disk topology. When running db2haicu, I am getting the following error in ...
1
vote
1answer
35 views

DB2 Unexpected token in correct sql statement

I trying execute statement like following (i obfuscated it a little) in DB2: UPDATE FIRSTTABLE SET fstatus=1 WHERE fid in (SELECT T.fid FROM FIRSTTABLE T INNER JOIN SECONDTABLE V ON V.efvid = ...
1
vote
1answer
22 views

DB2 TRIM huge data

We need to execute a TRIM on each and every column in all our stagging tables before uploading them due to a high chance of spaces coming in all the data. update tabname set ...
2
votes
0answers
26 views

DB2 Dynamic Load from cursor

We have to load a number of huge tables using Load From cursor. The query formed for the same is a dynamic query as the column names are to be specified. we do the same using the below code in a ...
2
votes
1answer
31 views

DB2 : Load from cursor Dynamic query

We need to move multiple tables using Load from cursor. But the number columns in the source and destination tables are not the same. Also the tables structures can change so we need the same to ...
4
votes
1answer
41 views

Encrypt data with DES_CBC_PKCS5 in DB2

I am using encryption algo DES/CBC/PKCS5Padding. How do I encrypt data using this in DB2? In Pl/SQL I used DBMS_CRYPTO package with DES_CBC_PKCS5 from DBMS_CRYPTO Block Cipher Suites - ...
2
votes
1answer
94 views

Can I set order of query execution?

Below query is executing in approx 5 min: SELECT COUNT(distinct B.CALL_ID), C.IVR_APPLN_NAME FROM PTDT.TDT_CALL_DATA AS A, PTDT.TDT_IVR_CALL_APPLICATIONS AS B, ...
1
vote
3answers
270 views

REPLACE INTO SELECT from table

Is there a way in DB2 to replace the entire table with just selected rows from the same table ? Something like REPLACE into tableName select * from tableName where col1='a'; (I can export the ...
6
votes
6answers
10k 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 ...
1
vote
1answer
65 views

what is the formal statement terminator with db2 sql

I have added / character as statement terminator all in my db2 statements. I can run sql file in data studio client without any issue. But when I run the sql file in db2 command prompt by issuing db2 ...
1
vote
1answer
31 views

Set uncommitted read as default in Oracle SQL Developer with DB2 database

I am using SQL Developer with a IBM DB2 database. I am only querying the data for analytical purposes - never making any updates, additions or deletions. I was wondering if there is a way to ensure ...
3
votes
2answers
7k 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 ...