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

Query for Joins! [on hold]

I am providing 2 queries below. I want to join those 2 tables and find out (1) If all accounts match (2)The count of USER_SERVICE_ACCT records that have matching records in Template_Acct table. (3) ...
3
votes
0answers
24 views

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

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 ...
0
votes
0answers
26 views

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

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? [closed]

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?
1
vote
2answers
44 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
22 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 ...
0
votes
0answers
13 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:...
5
votes
1answer
94 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
33 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
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 ...
1
vote
1answer
31 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 ...
1
vote
1answer
42 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
2answers
93 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
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
votes
3answers
64 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
1answer
55 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
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
2answers
82 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 ...
0
votes
0answers
36 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 ...
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.
3
votes
1answer
61 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
3answers
137 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 ...
2
votes
1answer
38 views

How to see, if a foreign key is enforced?

How can I see in IBM DB2, if a foreign key is in enforced Status? In the systemviews REF_CONSTRAINTS and REFERENTIAL_CONSTRAINTS I see them, but I cannot see, if they are in enforced Status. Is there ...
1
vote
0answers
12 views

DB2 Iseries - dml change logs

Iseries system using I/90 Is there a way to check changes made to database object like tables and views from any systables or system views or any logs on db2 for iSeries machine.
0
votes
1answer
42 views

DB2 simple order by query

I am very new to DB2.have installed Express C version and facing some problem while running a simple query. SELECT A,B,C,D,E,F,G, H FROM TABLE_NAME where A=9999 ORDER BY D Note: A through H ...
0
votes
0answers
24 views

Remote connection failing to run any command

Our partner has created a new database to us so we can use it as a test database. He gave us all addresses and connection information so we can use it to connect to the database. I've asked here how ...
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
1answer
22 views

Problem when extracting the structure of DB2 (Back up Structure)

I want to extract the structure of a 9.7 DB2 database to use to clone it but some of the authorization statements are missing afterwards: I tried something like this: db2look -d dbName -a -x -o ...
1
vote
1answer
43 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: ...
1
vote
1answer
35 views

Add a DB2 catalog to a new remote server and make it work

I'm trying to add a new database catalog to my client environment in a windows server machine. So I've run the db2cmd tool and then the db2 tool on a windows command console once there I executed the ...
0
votes
0answers
26 views

How can I partition a table in DB2 luw [closed]

I want to know if there is an option that substitute "PARTITION BY SIZE" in DB2 luw , it works in DB2 zOS, but it is not supported by luw
0
votes
1answer
49 views

Dump specific tables from DB2 database

Is there any command line tool that I can use on a DB2 database to dump a specific set of tables? The problem is that I work in an application that its database tables was created in an existing ...
0
votes
1answer
32 views

Is the same thing(internally) putting conditions in a query over a view that directly on the view?

I'm having trouble understanding performance with queries on views. Given this two scenarios, the queries internally will be the same? SCENARIO 1 View: CREATE VIEW TEST.SIMPLEVIEW AS SELECT ...
1
vote
1answer
61 views

DB2 archive log extraordinary growth for any operation after runstat/reorg

My environment: DB2 10.1.4 Enterprise, IBM Security Identity Manager 6.0 FP6, AIX 7.1 Each archive log have a size of 40MB Yesterday, we do a maintainance on ISIM database by doing online backup. The ...
1
vote
1answer
62 views

Finding list of Duplicate records from 2 tables in DB2

I have a Person table and Address Table. Their relationship is Person.AddrId = Address.Id Person table has First_name, Last_name, and AddrId. The Address table has Address1, Zipcode, and Id. I ...
1
vote
1answer
33 views

SQL db2 remove specific item from the query

Can you please help me out with the below query? What I am looking for is a code to exclude items with wording '90003' from column COR_ID. So far I have a code that extracts data with date older than ...
1
vote
1answer
46 views

SQL DB2 query with where clause

Can you please help me out with the below query? I need to extract from column VAL_DT only items with date older than today's date but this rule should not apply to items that contain the following ...
1
vote
2answers
66 views

What does 'quiesce' stand for?

I want to know what does "quiesce" in "db2 luw" means, how can I use it in linux and how it can affect the access to the tablespaces I want to know how to tell whether or not a tablespace in a ddl ...
3
votes
0answers
49 views

AS/400 + DB2 to MongoDB?

I'm not seeing a whole lot of info on the subject, so I figured I'd ask people who might know more about it than I do: Is it possible to replicate data from an AS/400 + IBM DB2 instance to MongoDB? If ...
0
votes
0answers
29 views

Can I avoid a clear text password in the IBMLDAPSecurity.init file in DB2 on AIX when using the LDAP group plugin?

I am using DB2 on AIX and I want to manage groups using LDAP. This is why it's not good enough to enable transparent OS authentication and rely on AIX authentication against LDAP but I Need the DB2 ...
1
vote
2answers
113 views

Column or global variable ROWNUM not found

I have made an attempt at the ROW_NUMBER(), and when exporting the results in a csv it was worked perfectly. The issue I’m having now is in the where clause to bring back records where ROWNUM = 1. I ...
1
vote
0answers
114 views

Windows to DB2 Connection: Connection authorization failure occurred. Reason: Local security service non-retryable error

Error creating SQL Model Connection connection to TSMDB1. (Error: [jcc][t4][2010][11246][3.68.61] Connection authorization failure occurred. Reason: Local security service non-retryable error. ...
1
vote
1answer
58 views

how to get the start date and end date from a week number stored in a table [closed]

I am having a table WK_NO_AVL with below columns- year wk_no flag 2015 1 Y 2015 2 Y 2015 3 Y 2015 4 Y 2015 5 Y 2015 6 Y 2015 7 Y 2015 8 Y 2015 9 Y ...
0
votes
0answers
47 views

Performance drops after online backup

We are using DB2 Express-C 10.5.5 on Ubuntu Server 12.04.5 64-bit. Every night we do a full online backup: backup db MYDB online to /home/db2inst1/backup compress include logs after backup we do log ...
0
votes
1answer
52 views

Join a calendar table and a transaction table

The database (DB2) in my company contain two table : Warehouse_transaction contain item_id, transaction_qty (negative or positive value), transaction_date ; Calendar contain all days between 2012 ...
2
votes
1answer
65 views

Update the value when the row already exists

I have table 'A' in schema 'USER'. There are three columns in this table. below are the names of the columns: id (primary key) name age I want to insert a row in this table, but if the row is ...
1
vote
1answer
34 views

db2rspgn generates TYPE = ese for workgroup server edition, is that normal?

I tried to run db2rspgn on a workgroup server instance and to my surprise <instance>.TYPE = ese in the generated response file ]$ db2licm -l Product name: "DB2 Workgroup ...