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
0answers
17 views

SQL2043N Unable to start a child process or thread

I've seen the message SQL2043N Unable to start a child process or thread occur every once in a while since upgrading to rhel7 and db2 10.5. db2diag.log does not reveal much out of interest, beside: ...
1
vote
1answer
33 views

Set a Max allocated size for a sellected storage path in db2

I have a DB2 storage group with storage paths set like C:\ D:\ E:\ Size of my C: drive is 100 GB and the other programs keep crashing because it fill data drive by one, even I can allocate more ...
0
votes
0answers
15 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 ...
1
vote
1answer
28 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 ...
1
vote
1answer
27 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
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 ...
3
votes
1answer
48 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 ...
1
vote
1answer
37 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. ...
2
votes
1answer
37 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 ...
0
votes
1answer
19 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 ...
1
vote
2answers
46 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 ...
2
votes
0answers
43 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 ...
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
61 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 ...
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 ...
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
32 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 - ...
4
votes
1answer
40 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
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
35 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 ...
1
vote
1answer
34 views

Multi event Trigger syntax

I have a db2 LUW 10.5 database. I want to create a trigger that saves a copy of a record into an audit table whenever, a record gets updated and inserted. I came up with follwing syntax: CREATE ...
1
vote
1answer
67 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 ...
0
votes
1answer
27 views

select all with other parameters in db2

What is the equivalent query for SELECT *,SUM(total_request_count) AS total_calls FROM API_REQUEST_SUMMARY in DB2. It says * is invalid in db2 data explorer. After running this I got below error ...
0
votes
0answers
19 views

Move encrypted String from Oracle DB to DB2

I have a normal String athakur@test.com. It is stored encrypted in oracle DB with some encryption key. The algo used is not available in DB2 and I want the same data in DB2. I am not able to ...
0
votes
0answers
39 views

“DB2-0 : The service has returned a service-specific error code.” error while “db2start open keystore using” command

I am using IBM DB2 10.5 I want to create encrypted database. When I write command: D:\Program Files\IBM\SQLLIB\BIN>db2start open keystore using "My1Strong2!Password" I get error like: DB2-0 : The ...
0
votes
1answer
37 views

how to get list of months between two dates in db2

I have two dates start and end date i need find list of months between two dates.for example, 01-12-2015 as start date and 01-02-2015 as end date i need result to be as , January. I am using IBM db2. ...
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 ...
1
vote
1answer
24 views

MySQL CHAR_LENGTH() alternative in IBM DB2

I have a value in a cell that has a Unicode character: "Nit€sh" I want to get the length in SB2. The problem is, If I use the length function it's considering '€' as 2 and total is 7. I am trying ...
1
vote
1answer
44 views

DB2 Express C 10.5.4 using up all memory for package cache

The testing environment (Win64) uses a express c - which does pretty well. Now when testing a java batch it runs out of private memory exhausting all available memory (14.8 GB) to package cache. As a ...
2
votes
1answer
125 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 ...
1
vote
1answer
38 views

Options for creating a read-only replica of a DB2 database

We are a dev company that develops and supports an application based on DB2 LUW 10.5 for a customer. We have a VPN that gives us access to our customer's production environment, and we often connect ...
2
votes
0answers
23 views

Need to read the DB2 DAS parameters

I need to read the DB2 DAS Parameters via any method other than DB2 Command "get admin configuration". I need to read the parameters like EXEC_EXP_TASK or SCHED_ENABLE from file or database. I ...
0
votes
1answer
22 views

Why does my DB2 silent/unattended Install instead invokes DB2 Install wizard and GUI. Can someone help on ths issue?

I want to install DB2 10.5.6 DPF on my VMWare windows machine. I manually created the response files (both the server.rsp and addpart.rsp files). When it came time to perform the server install, I ...
0
votes
2answers
51 views

duplicate SAMPLE db in db2

Right now im accessing a SAMPLE db which is in remote server. I found that its default instance db2inst1 with database name "SAMPLE". Since everybody using the same database for all their purposes, i ...
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, ...
0
votes
0answers
15 views

DB2 : adding where clause in multiple join making query execution slow [duplicate]

This is base query SELECT COUNT(distinct B.CALL_ID), C.IVR_APPLN_NAME FROM PTDT.TDT_CALL_DATA AS A, PTDT.TDT_IVR_CALL_APPLICATIONS AS B, PTDT.TDT_IVR_APPLN_REF AS C WHERE A.CALL_ID = ...
2
votes
1answer
113 views

indexing strategies

I am confused by indexing strategies advocated by one of the database products. Database is "DB2 for i" (iSeries/AS400). Please see following SQL and index advised by the product for the SQL. There ...
1
vote
0answers
25 views

Possible to have duplicate fully qualified schema names with separate data in DB2 for z/OS?

We have several application teams that are looking to do a re-write of large legacy applications. This is mostly COBOL going against DB2 for z/OS (v11). The COBOL code was generated using a tool, so ...
3
votes
1answer
81 views

How do I perform XPath query on a XML column on DB2 for i?

I have an XML column in a table. I would like to retrieve only the first child element from the XML document in each row (i.e. the result of an XPath expression /root/someVal[1]) and return in my ...
1
vote
1answer
70 views

How to profile trigger database performance impact

I want to set up some triggers on a DB2 box (LUW, 9.7). The DBAs are concerned that if the trigger fires too often, it will adversely affect general performance. What's a reasonable cheap approach ...
2
votes
2answers
126 views

Not all columns show up on select * on DB2 for IBM i

My client has a table on their IBMi with a foreign key to another table. It's not showing up with a SELECT * FROM lib.table. However, if I specifically mention it in the column list. It does show up. ...
0
votes
0answers
306 views

Insert string content into a blob in DB2 database using a simple SQL query

I am having trouble inserting in a BLOB field some text content (in fact it's an XML, I know there are field-types more suited than BLOB for this type of content, but I simply can't change it). I ...
2
votes
1answer
52 views

CPU Utilization by Long running Query

Is there any way to find how much CPU is getting consumed by a query running for long time in Database?