Questions tagged [db2-luw]

DB2 for Linux, UNIX and Windows

DB2 for LUW is part of the DB2 family, that runs in these operative system.

Many parts of the internal structure are the same in all members of the DB2 family, but there are also things specific for each architecture.

This tag is for question related specifically to this member of the family.

913 questions
0
votes
1 answer

java.sql.PreparedStatement.setArray() : Unsupported cross conversion

I'm getting the exception shown below, when I run the following query with jdbc. This is a simplified example, the other parts of the preparedStatementSetter with setString and setInt, etc. ran successfully. public List
K.C.
  • 2,084
  • 2
  • 25
  • 38
0
votes
1 answer

SELECT rows while performing operation for each row with previous one as argument

Let's say I have a table of something like: +-------+ | FIELD | +-------+ | 1000 | | 1200 | | 1300 | | 900 | | 1400 | +-------+ How can I perform SELECT query to retrieve rows 0..N, but instead of getting their values, get arithmetical…
Andrew Dunai
  • 3,061
  • 19
  • 27
0
votes
2 answers

DB2 Suspend Logging

Running DB2 9.7.5 LUW on Windows 2008. I'm transfering data hourly from a MS SQL 2008 server over the WAN. I read the data from MS SQL, parse the data and batch insert into a work table in DB2, then in DB2 merge the data from the work table to the…
GeekyDaddy
  • 384
  • 2
  • 12
0
votes
1 answer

IBM DB2 9.7 determining default tablespace

I have a DB2 9.7 database. I have defined any specific tablespace, so all tables go to USERSPACE1. Now I have created two new tablespaces and assign two tables to each of the two new tablespaces with the IN clause. However, now all the other tables…
user1340582
  • 19,151
  • 35
  • 115
  • 171
0
votes
4 answers

Update only 1 record in DB2 from multiple identical records?

I'm trying to update a single record which is the exact copy of another record. Is there any way to limit or select only 1 record while updating? Thanks
Superman
  • 871
  • 2
  • 13
  • 31
0
votes
1 answer

Reading excel rows and simultaneously processing it

I have an Excel sheet and its humongous.. Around like 200000 rows that needs to be processed. All I have to do is read it and process them with a query on a DB2 table. I have written the program where its more than 8 hours to process 5000 rows. Is…
Samtius
  • 51
  • 1
  • 4
0
votes
2 answers

calculate/sum timestamp in sql

I am stucking by calculating the timestamp,how can i calculate/sum on different timestamp, example as below Time (Timestamp in one column) *********************** 0:00:01 0:00:08 0:00:12 0:00:38 0:01:04 2:04:49 15:48:38 23:30:59 7:05:52 8:17:29 I…
Roshan
  • 47
  • 2
  • 10
0
votes
2 answers

Subquery returning more than 1 row in db2 query

I am using a insert query in which the subquery giving more than 100 record, due to which the insert is failing, is there any way I can insert all these 100 records in the table.. Query is: INSERT INTO test values ((select id from test3), 'NEW')
Sandy
  • 419
  • 1
  • 8
  • 15
0
votes
2 answers

Proper method to migrate DB2 materialized query tables (MQTs) using db2move and db2look

I'm migrating a database from DB2 10.1 for Windows x86_64 to DB2 10.1 for Linux x86_64 - this is a combination of operating systems and machine types that have incompatible backup file formats, which means I can't just do a backup and…
Pridkett
  • 4,883
  • 4
  • 30
  • 47
0
votes
3 answers

JDBC type-2 behavior with multiple DB2 Client versions installed

Our J2EE based application is run on Websphere Applicaiton Server- AIX server with 2 versions of DB2 Client installed (Db2v9.5, Db2v9.7). I have a db SAMPLE which is remotely cataloged in both the two DB2 client versions with the same alias name…
Chandru
  • 336
  • 1
  • 5
  • 14
0
votes
2 answers

how to return the value of a scalar function in db2

I have a db2 function returning an integer. As per my limited knowledge the only way to see this function working is using to return column in a query like the example below. Is there a way to display a return value of a function given a parameter…
Abruzzo Forte e Gentile
  • 14,423
  • 28
  • 99
  • 173
0
votes
2 answers

using strace to debug db2 CLI executing a query

I would like to use strace to debug a strange behaviour I have with db2. I have a SQL function myFoo() implemented in C that doesn't get called for some reason (some code access path not existing or not authorized see here). My Sql Function call a…
Abruzzo Forte e Gentile
  • 14,423
  • 28
  • 99
  • 173
0
votes
1 answer

printing logs in db2 stored procedure

I have a stored procedure and have put some debug messages like call dbms_output.put ('calling clean up on '); while invoking the procedure, I don't see this line. I am using Aqua data studio for my work. I also did the following while…
user1588737
  • 280
  • 2
  • 6
  • 12
0
votes
1 answer

DB2: How to timely delete records

I have a table in DB2 database that has a few columns, one of which is L_TIMESTAMP. The need is to delete records where difference between L_TIMESTAMP and CURRENT TIMESTAMP is greater than 5 minutes. This check needs to happen every hour. Please let…
Aspirant
  • 1,934
  • 4
  • 25
  • 44
0
votes
2 answers

Connection to DB2 Linux database using JDBC

Scenario: I have a java application which interacts with DB2 database deployed on Linux. The java application is used for basic Extract, Transform and Load operations. We connect to the database using jdbc type-4 driver having the URL…
Neo
  • 93
  • 1
  • 12