该案例来自东区某金融客户的一次11.2.0.4升级到19.18 cdb,升级过程非常顺利,数据库也运行正常,已经在跑业务了。但是在对升级的19c cdb搭建dg或者备份的时候出现了ORA-00600[ktsitbs_info1]/ORA-25027。
大致的操作如下:
1. starts as a non-cdb 11.2.0.4 database
2. Upgraded to non-cdb 19c database
3. Generate xml file with DBMS_PDB.DESCRIBE
4. Create pluggable database nocopy
5. Run noncdb_to_pdb.sql and open pdb
报错trace关键信息如下:
1 2 3 4 5 6 7 8 9 |
ORA-00600: internal error code, arguments: [ktsitbs_info1], [23], [], [], [], [], [], [], [], [], [], [] 2023-08-05 18:23:57.675*:KRB:krbb.c@11063:krbbhdr(): directory block; filled=3 pr->count_krbpr=15 pr->size_krbpr=336 pr->offset_krbpr=28 2023-08-05 18:23:57.676*:KRB:krb.c@6788:krbDiskBufsizf(): ; stripe_size=0 stripe_disk=0 *bufsize=0 *bufcnt=0 2023-08-05 18:23:57.676*:KRB:krbd.c@866:krbdralc(): obtained ksfq context (0): 0x0x7ffff22d78f8 2023-08-05 18:23:57.676*:KRB:krbd.c@868:krbdralc(): ; pkrbdc->bufsize_krbdc=1048576 pkrbdc->bufcnt_krbdc=4 2023-08-05 18:23:57.676*:KRB:krbb.c@8384:krbbtgb(): Done with auxiliary thread, nxtblk: 00x7fffee733ab8, end: 00x7fffee733ab8 2023-08-05 18:23:57.676*:KRB:krbo.c@381:krboinit(): Entering; fno=61 2023-08-05 18:23:57.676*:KRB:krbo.c@428:krboinit(): Calling ktsitbs_info for; ox->tsno_krbox=23 ox->pdb_krbox=1 |
23是tablespace no,奇怪的是明明已经是pdb 3了,但是报错的pdb居然是1 root 。
该报错对于的代码如下:
1 2 3 4 5 6 7 8 9 10 |
@ if (ox->isrdf_krbox && kcfidu()) @ { @ ox->cangetcurr_krbox = TRUE; @ . @ KRBTRC1("krboinit - Calling ktsitbs_info for", tsn); @ ktsitbs_info(tsn, &tbsinfo); @ . @ ktsitbs_info only when database is open read-write. @ Do you still want me to change that check to: @ if (kcfido() && sgafinco_bit() &&!sgafincc_bit()) |
以为是shared pool的问题,flush shared pool之后报错依旧。这时判断很有可能是转换cdb的时候出现了问题。查看dba_pdbs发现新转换的pdb的guid居然是0。
翻阅mos文档,没有发现具体bug和原因,但是有一篇几乎现象一致的文章GUID of the new PDB is shows Wrong Value (Doc ID 2882993.1)
解决方案为:
1 2 3 4 5 6 |
ALTER PLUGGABLE DATABASE PDB1 CLOSE; ALTER PLUGGABLE DATABASE PDB1 UNPLUG INTO '/u01/app/oradata/pdb/pdb1.xml'; DROP PLUGGABLE DATABASE PDB1 KEEP DATAFILES; CREATE PLUGGABLE DATABASE PDB1 AS CLONE USING '/u01/app/oradata/pdb/pdb1.xml' NOCOPY; ALTER PLUGGABLE DATABASE PDB1 OPEN; ALTER PLUGGABLE DATABASE PDB1 SAVE STATE; |
该案例给的启发时,当升级到19c或者12c版本时,涉及non-cdb to cdb转换,需要检查一下pdb的guid,如果guid为0,则很有可能会遇到备份上的问题。