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
119 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
0answers
21 views

Tool to automatically refactor queries, replacing subqueries with CTEs [on hold]

I have to mantain very big and complex SQL queries (more than 1000 lines) with many nested subqueries. These queries were made by other people and are very difficult to understand, so I want to ...
4
votes
1answer
4k 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
1k 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 ...
0
votes
0answers
24 views

In DB2 , what steps need to be followed to improve bufferpool hit ratio for particular table? [on hold]

I have read Scott's article on Bufferpool hit ratios and folly . I am more interested in experts views on steps they follow when the bufferpool hit ratio drops down, to say, 60%. Also, any specific ...
-1
votes
1answer
23 views

what is force application? What are its advantages and disadvantages? [on hold]

I have googled what the force application about database is but I haven't found satisfactory answer. What is force application? What are its advantages and disadvantages?
-1
votes
1answer
15 views

how to set schedule db2 automatic delete backup after 3 days from data studio

I can successfully set backup of Data base but, I want to Set Schedule from IBM Data studio for automatic delete database backup after few Days?
3
votes
2answers
81 views

IBM i Access ODBC driver returning only first letter of column names

I'm new to DB2 and am connecting to a DB2 for i (V7R1) database using unixODBC and the IBM i Access ODBC driver for Linux. When I query the database, the results only include the first letter of the ...
3
votes
1answer
610 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
2answers
43 views

How to recover deleted records with minimal downtime?

In an OLTP environment that cannot tolerated downtime, suppose if 100 records are deleted from table, how do we recover them? One way to recover the deleted records is to restore the database and/or ...
1
vote
1answer
19 views

Can I specify the default backup location for non-automatic backups?

I noticed that when the BACKUP DATABASE command is issued without the TO clause the backup file is stored to the working directory where the command is issued. I'm wondering if it's possible to ...
5
votes
1answer
93 views

What is the meaning of `(ORDER BY x RANGE BETWEEN n PRECEDING…)` if x is a date?

In another thread: http://stackoverflow.com/questions/37759659/db2-query-to-find-average-sale-for-each-item-1-year-previous the OP wanted a sliding average for the last 365 days. Using ROWS ...
2
votes
1answer
31 views

Java version shipped with DB2 v11?

I can't seem to find any information of which Java version that will be used in the soon to be released DB2 V11.1. Does anyone else know?
1
vote
2answers
1k 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 ...
0
votes
0answers
12 views

Sloq query adding clause (db2)

I have this simple query I use to fetch datas from a log table: select distinct columnToFetch from tableLOGS where columnTIMESTAMP >='2016-06-14 17:14:00' and columnTIMESTAMP <='2016-06-14 17:...
2
votes
1answer
262 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
154 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
0answers
3k views

Db2 Express doesn't start TCP/IP listener (SQL5043N) [closed]

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
1answer
30 views

db2: configurations covered by “create db autoconfigure”

I am new to configuring memory in db2. I want to create a database using this command: db2 CREATE DB TEST USING CODESET UTF-8 TERRITORY US AUTOCONFIGURE USING mem_percent 80 APPLY DB ONLY According ...
2
votes
1answer
288 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 ...
2
votes
1answer
392 views

How do you generate the DDL that created a DB2 LUW database?

There are various options for db2look you can use to see the DDL for just about every object in the database except the command that created the database itself. Is there any way with db2look, or ...
1
vote
1answer
4k 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 ...
1
vote
2answers
254 views

The database manager failed to allocate shared memory because an operating system kernel memory limit has been reached

I have installed IBM DB2 10.5.5 and I want to create a new database there. When I entered command db2 create database test1 I am getting a error saying SQL1084C The database manager failed to ...
1
vote
1answer
3k 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 ...
0
votes
1answer
170 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 ...
0
votes
1answer
123 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 ...
0
votes
1answer
206 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 ...
3
votes
1answer
169 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
2answers
328 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 /home/db2inst1/sqllib/bin/...
1
vote
1answer
40 views

Change column from NOT LOGGED to LOGGED

I have a database DAT1 running on DB2 version 10.5. I want to enable logging for all CLOB and BLOB columns of my table TAB1. The table was initially created with those columns as NOT LOGGED but now I ...
0
votes
1answer
259 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.
3
votes
1answer
669 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
41 views

DB2 SQL error: SQLCODE: -805, SQLSTATE: 51002

I am doing a batch process which fetches rows from table 50000 times. The query is: SELECT * FROM <table name> WHERE <condition; this changes for each iteration(50000)> This batch ...
1
vote
1answer
108 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
vote
2answers
91 views

How to get the Sum of all column values in the last row of a resultset without using UNION?

I need to get the sum of all column values of a result set in the last row. Here is my SQL query. SELECT CS_YEAR AS YEAR, CS_MNTH AS MONTH, CS_WK AS WEEK_NO, 'Total' AS ...
1
vote
1answer
63 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
1answer
42 views

Error running DB2MOVE command

I'm trying to execute the DB2MOVE command at a db2 prompt console in a windows 7 machine (I have db2 client installed, with proper catalogs and nodes created and tested.). The steps I made was: ...
2
votes
2answers
41 views

DB2 add user with a password

I'm struggling here on how to do this I couldn't find anywhere or won't be able understand the documentation. So I'm connected as a DBA user on a DB2 client (TOAD for example) and I want to create a ...
1
vote
0answers
33 views

See Full Exception String In Error Message

Right now I am trying to use HTTPGETCLOB function to pull data from an API. The problem is that the resulting error message does not show the whole exception string from the server. Below is the error ...
1
vote
1answer
54 views

What to do when the active log directory is full?

Here's my database configuration: Log file size (4KB) (LOGFILSIZ) = 125000 Number of primary log files (LOGPRIMARY) = 10 Number of secondary log files ...
1
vote
3answers
131 views

Difference between a schema and a database in db2

I can not figure out what is the difference between schema and database in db2 I find this SQL so confusing for example : CREATE TABLE schema1.table1 .... .... .... IN database1.tabspace1 Can ...
-1
votes
3answers
63 views

how to find the last date from the week number as input

I need to find the last date of week when i pass year and week number as input in my stored procedure. week starts on monday and last day of week will be friday. Database - IBM db2 9.7 platform - ...
1
vote
0answers
37 views

Automatic task scheduler is not working

I created a DB2 task to run my stored procedure automatically at a specific time, so below are the steps which I followed: First of all I enabled the task schedular using this command: db2set ...
1
vote
0answers
34 views

What does page size signify? [closed]

A page is a container of Data and it is the smallest I/O unit that a database deals with, but what does page size mean? For example what does a page size of 4KB tell us? Why not use page sizes of ...
0
votes
0answers
11 views

Is it possible to modify temporal history?

I have a case where we would like some data to "go away" forever. This could be, for example, to fix bad data created by a program bug, but the bottom line is that the business requirement would be ...
3
votes
1answer
9k views

How to run DB Admin Tool (GUI) in IBM DB2 Express-C?

I had installed IBM DB2 Express-C in Windows but I can't find any shortcut to launch the Administration Tools (GUI). When installing, I had selected "Administration Tool" option (I had checked twice ...
0
votes
0answers
34 views

Db2 JSON enablement

I followed the instructions to setup the JSON capability on my DB210.5 Windows server, running db2nosql... -setup enable. It succeeded, but when I launch the db2nosql I see this: nosql>Type your ...
3
votes
1answer
60 views

non-optimal use of index

I'm somewhat puzzled by the scenario below. The table involved (relevant parts) is defined as: CREATE TABLE Nya. UPSEC_COURSE ( UPSEC_COURSE_ID CHAR(11) NOT NULL, ...
1
vote
0answers
11 views

DB2 3-way Deadlatch

Encountered 3-Way DeadLatch, it happens when the tcb of the index file is reloaded, want to know what conditions would cause the tcb to be reloaded.