Hi,
I migrated to 11.5, but when I connect to the databases, it says:
$ db2 connect to MYDB
SQL5035N The connection failed because the database product has been updated
and the database needs to be upgraded SQLSTATE=55001
When I perform the upgrade:
$ db2 upgrade db MYDB
SQL1704N Database upgrade failed. Reason code "9".
When I see the db2diag.log I got:
2020-03-16-10.40.22.886051-300 I231717E678 LEVEL: Error
PID : 10098 TID : 139989975295744 PROC : db2sysc 0
INSTANCE: mydb NODE : 000 DB : MYDB
APPHDL : 0-34 APPID: *LOCAL.db2inst1.200316154021
AUTHID : RAI HOSTNAME: db2server
EDUID : 23 EDUNAME: db2agent (MYDB) 0
FUNCTION: DB2 UDB, buffer pool services, sqlbStartPools, probe:2318
MESSAGE : ZRC=0x80020435=-2147351499=SQLB_MIG_NOT_ALLOWED_BY_TSP_STATE
"Database migration is not allowed due to tablespace state."
DATA #1 : <preformatted>
Tablespace TS_4K_TMP_SYS (ID 1) has state 4000, migration is not allowed.
That tablespace is a system temporary one, and it seems it is offline.
In the ./SQL00001/SQLSPCS.1 file, I got the location of that TS, an it is:
$ strings ./SQL00001/SQLSPCS.1
SYSCATSPACE
e]SV
/db2/datos/mydb/mydb/mydb/NODE0000/MYDB/T0000000/C0000000.CAT
TS_4K_TMP_SYS
/db2/temp/mydb/mydb/TS_4K_TMP_SYS
USERSPACE1
1f]SV
...
And that directory exists:
$ ls -la /db2/temp/mydb/mydb/TS_4K_TMP_SYS
total 4
drwx------. 2 rai backups 24 Sep 6 2019 .
drwxr-x---. 11 rai backups 221 Sep 6 2019 ..
-rwx------. 1 rai backups 512 Sep 6 2019 SQLTAG.NAM
I need to access the database, or at least the data, but I cannot connect, migrate o dump via db2dart.
What can I do?
------------------------------
Andres Gomez Casanova
------------------------------
#Db2