Questions tagged [db2-9.7]

DB2 is a database management system from IBM. This tag should be used for questions about the 9.7 version of DB2. Please additionally tag your question with the generic "db2" tag. This version is currently deprecated from IBM support.

Filter by
Sorted by
Tagged with
1
vote
1answer
39 views

DB2 SUM of MAX values, single table

I have looked through many of the questions asked and answered but can't seem to find my answer, even kludging the provided answers into my queries - most usually fail, the remainder provide garbage ...
0
votes
0answers
10 views

Backup size keeps growing more then data is added

A schema grows daily, more then data is added. According to table sizes the data in the tables is 2750. The tables spaces are as follows: In storage management is see: Name#Size#Available#...
1
vote
1answer
682 views

DB2: Column-Aliases with Line-Breaks

Using DB2 9.7, is it possible to produce a result set where the column-headers contain line-breaks? Something like: select field_name as "Line1<br>Line2" from table_name I want the column-...
3
votes
1answer
2k views

SQL20448N “05/09/2016” cannot be interpreted using format string “YYYY-MM-DD” for the TIMESTAMP_FORMAT function

I am getting below error in db2 when executing the sql query- SQL20448N "05/09/2016" cannot be interpreted using format string "YYYY-MM-DD" for the TIMESTAMP_FORMAT function. here is my sql ...
1
vote
0answers
581 views

Trying to restore a db2 database but stops at roll-forward with error 'SQL1265N'

I'm trying to restore a backup that is older than the current database. The restore went ok, but the roll forward didn't giving the following error: SQL1265N The archive log file ".LOG" is not ...
2
votes
1answer
487 views

DB2 doesn't start after change db2 hostname

After changing the hostname of my db2 server, the db2 services won't start anymore. After reading the notes on how to rename the db2 hostname I understand what went wrong, some things should have ...
1
vote
1answer
135 views

DB2 LUW: how to influence query planner's choice of join

Suppose I have two tables, A and B. They "share" the same primary key, which is indexed in both tables. Table B also has a timestamp column which is separately indexed. I do a subselect on B using ...
2
votes
0answers
54 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 ...
-4
votes
1answer
4k views

Catch exception in DB2 function

I want to catch exception in DB2 function and return 0 if there was an exception. I don't know how the right syntax create function is_decimal(c_data varchar(100)) RETURNS INTEGER begin select ...
1
vote
1answer
409 views

How to run db2pd -hadr in batch mode

I am trying to automate some things on DB2 and would like to use a batch file to do this. I create the following batch file test.bat: db2cmd - -w "db2 -tvf test.db2" I then try to do two commands in ...
2
votes
1answer
124 views

Check if encrpytion key is valid in DB2

I have a DB2 table where one of the columns is encrypted using the two parameter variant of ENCRYPT (so the password is supplied in the SQL itself). Unfortunately due to an ETL issue the column got ...
1
vote
1answer
274 views

Driver properties for db2jcc in Squirrell and MON_GET_CONNECTION table function

I'm trying to set driver properties like: clientAccountingInformation clientApplicationInformation clientProgramId clientProgramName in Squirrell 3.6 (http://squirrel-sql.sourceforge.net/). See ...
3
votes
1answer
1k views

How do I modify a stored procedure in IBM DB2?

I have a DB2 database and I'm using Control Center. I've found a procedure in the 'Stored Procedures' folder, which I need to modify. In MS SQL Server and Oracle you can accomplish this right from the ...
0
votes
1answer
435 views

DB2 PURGE (old Online Backups and Archive logs) - some of the archive logs are not removed

DB is in Archive Mode. We are creating full Online Backups every night at 23:00. We set automatic removal of old online backups and archive logs. AUTO_DEL_REC_OBJ ON NUM_DB_BACKUPS 2 ...
4
votes
2answers
13k 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 | ...