Technical Blog Post
Abstract
Containers of temporary automatic storage tablespaces will be redefined at normal startup
Body
For temporary automatic storage tablespaces, containers are generally redefined at normal startup.
However this is not the case If the database activation involves Crash Recovery.
The following is an example TEMPSPACE1.
[db2v111a@yakitori1 ~]$ db2pd -db test -tab 1
Database Member 0 -- Database TEST -- Active -- Up 0 days 00:00:21 -- Date 2019-12-06-21.35.41.238899
Tablespace 1 Configuration:
Address Type Content PageSz ExtentSz Auto Prefetch BufID BufIDDisk FSC NumCntrs MaxStripe LastConsecPg RSE Name
0x00007F2B8C00D300 SMS SysTmp 4096 32 Yes 32 1 1 On 1 0 31 No TEMPSPACE1
...
Containers:
Address ContainNum Type TotalPgs UseablePgs PathID StripeSet Container
0x00007F2B8C035000 0 Path 1 1 0 0 /home/db2v111a/db2v111a/NODE0000/TEST/T0000001/C0000000.TMP
# cd /home/db2v111a/db2v111a/NODE0000/TEST/T0000001/C0000000.TMP
[root@yakitori1 C0000000.TMP]# ls -l
total 662284
-rw------- 1 db2v111a db2v111 512 Nov 25 16:53 SQLTAG.NAM
As shown in the following trace, the tablespace container /home/db2v111a/db2v111a/NODE0000/TEST/T0000001/C0000000.TMP
will be redefined.
$ db2trc print -stack 158344 db2trc.flw
pid = 12244 tid = 140007801087744 node = 0
19637 | sqzEDUObj::EDUDriver entry [eduid 23 eduname db2agent]
19761 | | sqeAgent::RunEDU entry [eduid 23 eduname db2agent]
19811 | | | sqljsDrdaAsDriver entry [eduid 23 eduname db2agent]
19818 | | | | sqljsDrdaAsInnerDriver entry [eduid 23 eduname db2agent]
20067 | | | | | sqljsDriveRequests entry [eduid 23 eduname db2agent]
20068 | | | | | | sqljsSqlam entry [eduid 23 eduname db2agent]
20076 | | | | | | | sqljsParse entry [eduid 23 eduname db2agent]
20106 | | | | | | | | sqljsParseConnect entry [eduid 23 eduname db2agent]
20107 | | | | | | | | | sqljs_ddm_accsec entry [eduid 23 eduname db2agent]
20110 | | | | | | | | | | sqljsConnectAttach entry [eduid 23 eduname db2agent]
20113 | | | | | | | | | | | sqleUCagentConnect entry [eduid 23 eduname db2agent]
20138 | | | | | | | | | | | | sqleUCengnInit entry [eduid 23 eduname db2agent]
20139 | | | | | | | | | | | | | sqeApplication::AppLocalStart entry [eduid 23 eduname db2agent]
20856 | | | | | | | | | | | | | | sqleProcessConnectType entry [eduid 23 eduname db2agent]
20857 | | | | | | | | | | | | | | | sqeApplication::AppStartUsing entry [eduid 23 eduname db2agent]
20864 | | | | | | | | | | | | | | | | sqeDBMgr::StartUsingLocalDatabase entry [eduid 23 eduname db2agent]
21454 | | | | | | | | | | | | | | | | | sqeLocalDatabase::FirstConnect entry [eduid 23 eduname db2agent]
26476 | | | | | | | | | | | | | | | | | | sqledint entry [eduid 23 eduname db2agent]
41880 | | | | | | | | | | | | | | | | | | | sqlbinit entry [eduid 23 eduname db2agent]
157880 | | | | | | | | | | | | | | | | | | | | sqlbStartPools entry [eduid 23 eduname db2agent]
158259 | | | | | | | | | | | | | | | | | | | | | sqlbSMSStartPool entry [eduid 23 eduname db2agent]
158268 | | | | | | | | | | | | | | | | | | | | | | sqlbASRedefineSMSTemp entry [eduid 23 eduname db2agent]
158344 | | | | | | | | | | | | | | | | | | | | | | sqlbASRedefineSMSTemp exit
This means if you store anything except Db2 container files in /home/db2v111a/db2v111a/NODE0000/TEST/T0000001/C0000000.TMP
they will be deleted at database startup due to container redefinition.
UID
ibm13285705