open数据库遭遇ORA-00913错误恢复

由于字典被人恶意进行损坏,进行了一系列恢复之后,数据库依旧无法正常启动,而且出现比较诡异的错误ORA-00913: too many values
数据库启动报ORA-00913错

Starting background process MMNL
Mon Jul 16 11:55:30 2018
MMNL started with pid=30, OS id=37580
ALTER SYSTEM enable restricted session;
ALTER SYSTEM SET _system_trig_enabled=FALSE SCOPE=MEMORY;
Autotune of undo retention is turned off.
ALTER SYSTEM SET _undo_autotune=FALSE SCOPE=MEMORY;
ALTER SYSTEM SET undo_retention=900 SCOPE=MEMORY;
ALTER SYSTEM SET aq_tm_processes=0 SCOPE=MEMORY;
ALTER SYSTEM SET enable_ddl_logging=FALSE SCOPE=MEMORY;
Resource Manager disabled during database migration: plan '' not set
ALTER SYSTEM SET resource_manager_plan='' SCOPE=MEMORY;
ALTER SYSTEM SET recyclebin='OFF' DEFERRED SCOPE=MEMORY;
Resource Manager disabled during database migration
Errors in file /s01/orabase/diag/rdbms/xff/xff1/trace/xff1_ora_37231.trc:
ORA-00913: too many values
Errors in file /s01/orabase/diag/rdbms/xff/xff1/trace/xff1_ora_37231.trc:
ORA-00913: too many values
Error 913 happened during db open, shutting down database
USER (ospid: 37231): terminating the instance due to error 913
Instance terminated by USER, pid = 37231
ORA-1092 signalled during: alter database open upgrade...
opiodr aborting process unknown ospid (37231) as a result of ORA-1092
Mon Jul 16 11:55:32 2018
ORA-1092 : opitsk aborting process

通过跟踪启动过程发现对SYS_FBA_TRACKEDTABLES表的插入报错

PARSE ERROR #140275116997968:len=70 dep=1 uid=0 oct=2 lid=0 tim=1531713543033057 err=913
insert into SYS_FBA_TRACKEDTABLES values (-1, -1, 0, '', '', 1, NULL)
Flashback Archive: Error ORA-913 in SQL
insert into SYS_FBA_TRACKEDTABLES values (-1, -1, 0, '', '', 1, NULL)

通过工具分析问题

DUL> desc sys.SYS_FBA_TRACKEDTABLES
object_id: 1304, dataobj#: 1304, cluster tab#: 0
segment header: (ts#: 0, rfile#: 0, block#: 0))
Name                 Null?           Type
-------------------- --------------- --------------
OBJ#                 NOT NULL        NUMBER
FA#                  NOT NULL        NUMBER
DROPSCN                              NUMBER
OBJNAME                              VARCHAR2(30)
OWNERNAME                            VARCHAR2(30)
FLAGS                                NUMBER
SPARE                                NUMBER

发现奇怪segment header记录为空,根据经验很可能tab$中该记录丢失,通过分析验证,果然是tab$中记录丢失

C:\Users\Xifenfei>cat D:\RECOVER\dul\obj.dat |grep 1304
1304|1304|0|SYS_FBA_TRACKEDTABLES|1||2||
11304||1|USER_SQLTUNE_RATIONALE_PLAN|1||5||
13040||0|ORA$AUTOTASK_CLEAN|1||66||
13041||0|AUTO_TASK_CONSUMER_GROUP|24||48||
13042||0|WEEKNIGHT_WINDOW|1||69||
13043||0|WEEKEND_WINDOW|1||69||
13044||0|HM_CREATE_OFFLINE_DICTIONARY|1||66||
13045||0|DRA_REEVALUATE_OPEN_FAILURES|1||66||
13046|13046|0|ALERT_QT|1||2||
13049|13049|0|SYS_C003549|4||1||
13048|13048|0|SYS_IL0000013046C00070$$|4||1||
13047|13047|0|SYS_LOB0000013046C00070$$|8||21||
13065||0|QT13046_BUFFER|1||4||
16281||0|/e5913043_DualReaderBuilderSub|1||29||
16282||1|/e5913043_DualReaderBuilderSub|1||5||
21304||0|/997def1d_MetalIconFactoryInte|1||29||
31304||0|/859af54a_AppOutputStream|1||29||
41304||0|/38d9d6d4_JAXBContextImpl7|1||29||
51304||0|sun/awt/FontConfiguration$2|1||29||
61304||0|/8cc2fced_CacheCustomizerError|1||29||
71304||51|/ec0dfc12_AnnotationHandlerExt|1||29||
81304|81304|63|WWV_FLOW_PAGE_PLUG_IDX2|4||1||
C:\Users\Xifenfei>cat D:\RECOVER\dul\tab.dat |grep 1304
5323|5323|0|1|11304|||7|2|1|536870912|
13046|13046|1|2|2258|||29|||539101186|

解决方法
通过一些内部方法,挂起数据库(不让他在open的过程报错),通过其他正常库获得该条tab$记录,然后插入数据库中(insert into sys.tab$ (OBJ#, DATAOBJ#, TS#, FILE#, BLOCK#, BOBJ#, TAB#, COLS, CLUCOLS, PCTFREE$, PCTUSED$, INITRANS, MAXTRANS, FLAGS, AUDIT$, ROWCNT, BLKCNT, EMPCNT, AVGSPC, CHNCNT, AVGRLN, AVGSPC_FLB, FLBCNT, ANALYZETIME, SAMPLESIZE, DEGREE, INSTANCES, INTCOLS, KERNELCOLS, PROPERTY, TRIGFLAG, SPARE1, SPARE2, SPARE3, SPARE4, SPARE5, SPARE6) values (1304, 1304, 0, 1, 8120, null, null, 7, null, 10, 40, 1, 255, 529, ‘————————————–‘, 1, 1, 0, 0, 0, 13, 0, 0, to_date(’24-08-2013 11:43:19’, ‘dd-mm-yyyy hh24:mi:ss’), 1, null, null, 7, 7, 9126805504, 0, 736, null, null, null, null, to_date(’24-08-2013 18:37:48′, ‘dd-mm-yyyy hh24:mi:ss’));
),再重启系统数据库,恢复正常
20180718104445


该库有可能还有很多字典不一致问题,建议尽快逻辑方式重建该库.

ORA-01092 ORA-00704 ORA-00942

有一朋友数据库启动出现报ORA-01092 ORA-00704 ORA-00942错误

SQL> startup
ORACLE instance started.
Total System Global Area 3056513024 bytes
Fixed Size                  2257152 bytes
Variable Size             704646912 bytes
Database Buffers         2332033024 bytes
Redo Buffers               17575936 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-00942: table or view does not exist
Process ID: 31766
Session ID: 191 Serial number: 3

数据库alert日志报错

Sat Feb 22 03:19:04 2014
ARC1 started with pid=22, OS id=31770
Sat Feb 22 03:19:04 2014
ARC2 started with pid=23, OS id=31772
Thread 1 opened at log sequence 38
  Current log# 2 seq# 38 mem# 0: /u01/app/oracle/oradata/xifenfei/redo02.log
Successful open of redo thread 1
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
SMON: enabling cache recovery
Sat Feb 22 03:19:04 2014
ARC3 started with pid=24, OS id=31774
ARC1: Archival started
ARC2: Archival started
ARC2: Becoming the 'no FAL' ARCH
ARC2: Becoming the 'no SRL' ARCH
ARC1: Becoming the heartbeat ARCH
ARC3: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
Errors in file /u01/app/oracle/diag/rdbms/xifenfeidg/xifenfei/trace/xifenfei_ora_31766.trc:
ORA-00704: bootstrap process failure
ORA-00942: table or view does not exist
Errors in file /u01/app/oracle/diag/rdbms/xifenfeidg/xifenfei/trace/xifenfei_ora_31766.trc:
ORA-00704: bootstrap process failure
ORA-00942: table or view does not exist
Error 704 happened during db open, shutting down database
USER (ospid: 31766): terminating the instance due to error 704
Instance terminated by USER, pid = 31766
ORA-1092 signalled during: ALTER DATABASE OPEN...
opiodr aborting process unknown ospid (31766) as a result of ORA-1092
Sat Feb 22 03:19:05 2014
ORA-1092 : opitsk aborting process

印象比较深的在某些版本中数据库由于access$丢失会出现类似错误:Oracle 11g丢失access$恢复方法,对数据库进行跟踪分析发现

PARSE ERROR #140521486058480:len=208 dep=1 uid=0 oct=9 lid=0 tim=1393010401966006 err=942
CREATE UNIQUE INDEX I_OBJ1 ON OBJ$(OBJ#,OWNER#,TYPE#) PCTFREE 10
INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 64K NEXT 1024K
MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 OBJNO 36 EXTENTS (FILE 1 BLOCK 336))
ORA-00704: bootstrap process failure
ORA-00942: table or view does not exist
ORA-00704: bootstrap process failure
ORA-00942: table or view does not exist

创建基表的I_OBJ1失败,这种情况比较少见,难道是obj$表丢失了,或者损坏了?搜索trace文件,发现没有obj$表创建成功

[root@xifenfei trace]# grep -i "CREATE TABLE" xifenfei_ora_31822.trc
create table bootstrap$ (
CREATE TABLE TAB$("OBJ#"
CREATE TABLE CLU$("OBJ#"
CREATE TABLE FET$("TS#" N
CREATE TABLE UET$("SEGFIL
CREATE TABLE SEG$("FILE#"
CREATE TABLE UNDO$("US#"
CREATE TABLE TS$("TS#" NU
CREATE TABLE FILE$("FILE#
CREATE TABLE IND$("OBJ#"
CREATE TABLE ICOL$("OBJ#"
CREATE TABLE COL$("OBJ#"
CREATE TABLE USER$("USER#
CREATE TABLE PROXY_DATA$(
CREATE TABLE PROXY_ROLE_D
CREATE TABLE CON$("OWNER#
CREATE TABLE CDEF$("CON#"
CREATE TABLE CCOL$("CON#"

应该是obj$表没有被创建成功,通过dbv进一步分析

[oracle@xifenfei ~]$ dbv file=/u01/app/oracle/oradata/xifenfei/system01.dbf
DBVERIFY: Release 11.2.0.4.0 - Production on Sat Feb 22 05:59:41 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
DBVERIFY - Verification starting : FILE = /u01/app/oracle/oradata/xifenfei/system01.dbf
Block Checking: DBA = 4194827, Block Type = KTB-managed data block
data header at 0x7f3100234244
kdbchk: the amount of space used is not equal to block size
        used=4595 fsc=646 avsp=3525 dtl=8120
Block 523 failed with check code 6110
DBVERIFY - Verification complete
Total Pages Examined         : 97280
Total Pages Processed (Data) : 64694
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 13128
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 3569
Total Pages Processed (Seg)  : 1
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 15889
Total Pages Marked Corrupt   : 0
Total Pages Influx           : 0
Total Pages Encrypted        : 0
Highest block SCN            : 1836897 (0.1836897)

由于block损坏导致obj$表创建异常,从而使得出现此类问题,通过bbed修复坏块之后

BBED> verify
DBVERIFY - Verification starting
FILE = /u01/app/oracle/oradata/xifenfei/system01.dbf
BLOCK = 523
DBVERIFY - Verification complete
Total Blocks Examined         : 1
Total Blocks Processed (Data) : 1
Total Blocks Failing   (Data) : 0
Total Blocks Processed (Index): 0
Total Blocks Failing   (Index): 0
Total Blocks Empty            : 0
Total Blocks Marked Corrupt   : 0
Total Blocks Influx           : 0
Message 531 not found;  product=RDBMS; facility=BBED

然后启动数据库,正常启动成功

SQL> startup
ORACLE instance started.
Total System Global Area 3056513024 bytes
Fixed Size                  2257152 bytes
Variable Size             704646912 bytes
Database Buffers         2332033024 bytes
Redo Buffers               17575936 bytes
Database mounted.
Database opened.

ORA-01092 ORA-00704 ORA-00942错误比较特殊很少见,如果您遇到了类似的,无法自行解决的,请联系我们
Tel:17813235971(同微信)    Q Q:107644445QQ咨询惜分飞    E-Mail:dba@xifenfei.com

DBV-00600: 致命错误 – [21] [5] [0] [0] 错误原因

11.2.0.4 dbv检查

C:\Users\Administrator>dbv file=D:\TEMP\example01.dbf blocksize=8192
DBVERIFY: Release 11.2.0.4.0 - Production on 星期三 7月 4 18:04:34 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
DBV-00600: 致命错误 - [21] [5] [0] [0]

12.2 dbv检查

oracle@localhost ~]$ dbv file=/tmp/example01.dbf
DBVERIFY: Release 12.2.0.1.0 - Production on Wed Jul 4 06:28:51 2018
Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.
DBV-00113: FILE (/tmp/example01.dbf) file size is not a multiple of block size

OS文件大小

---linux
[oracle@localhost ~]$ ls -l /tmp/example01.dbf
-rwxrwxrwx 1 root root 104865793 Jul  3 11:46 /tmp/example01.dbf
---win
C:\Users\Administrator>dir D:\TEMP\example01.dbf
 驱动器 D 中的卷是 本地硬盘
 卷的序列号是 EECC-4D96
 D:\TEMP 的目录
2018-07-03  23:46       104,865,793 example01.dbf
               1 个文件    104,865,793 字节
               0 个目录 2,192,213,327,872 可用字节

数据库记录文件大小

DUL> dump datafile 5 block 1
Block Header:
block type=0x0b (file header)
block format=0xa2 (oracle 10)
block rdba=0x01400001 (file#=5, block#=1)
scn=0x0000.00000000, seq=1, tail=0x00000b01
block checksum value=0xebd0=60368, flag=4
File Header:
Db Id=0x58a78964=1487374692, Db Name=ORCL, Root Dba=0x0
Software vsn=0x0, Compatibility Vsn=0xb200000, File Size=0x3200=12800 Blocks
File Type=0x3 (data file), File Number=5, Block Size=8192
Tablespace #6 - EXAMPLE rel_fn:5

比较明显数据文件头记录文件大小为12800*8192+8192(block 0)=104865792,而文件系统中显示的文件大小为104865793,不是8192的整数倍。因此出现相关错误DBV-00600: 致命错误 – [21] [5] [0] [0] 或者 DBV-00113(通过mos确认Bug 18232647 – DBVerify reports DBV-600 [21] [5] [0] [0] when datafile size is beyond expected – produce a more meaningful error (Doc ID 18232647.8))

ORA-00600: internal error code, arguments: [kcvorl_2]

一个朋友的数据库,由于redo损坏,经过一系列恢复,当我接手之时,已经是ORA-00283和ORA-16433错误

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: 'D:\ORCL\SYSTEM01.DBF'
SQL> recover database ;
ORA-00283: recovery session canceled due to errors
ORA-16433: The database must be opened in read/write mode.
SQL> recover database using backup controlfile;
ORA-00283: recovery session canceled due to errors
ORA-16433: The database must be opened in read/write mode.

通过重建控制文件继续恢复,遭遇ORA-00600 kcvorl_2错误

SQL> startup nomount pfile='d:/pfile.txt';
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size                  2177456 bytes
Variable Size            1224738384 bytes
Database Buffers          905969664 bytes
Redo Buffers                5001216 bytes
SQL> CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS  NOARCHIVELOG
  2      MAXLOGFILES 50
  3      MAXLOGMEMBERS 5
  4      MAXDATAFILES 100
  5      MAXINSTANCES 1
  6      MAXLOGHISTORY 226
  7  LOGFILE
  8    GROUP 1 'D:\ORCL\redo01.log'  SIZE 50M,
  9    GROUP 2 'D:\ORCL\redo02.log'  SIZE 50M,
 10    GROUP 3 'D:\ORCL\redo03.log'  SIZE 50M
 11  DATAFILE
 12  'D:\ORCL\SYSTEM01.DBF',
 13  'D:\ORCL\SYSAUX01.DBF',
 14  'D:\ORCL\UNDOTBS01.DBF',
 15  'D:\ORCL\USERS01.DBF',
 16  'D:\ORCL\XIFENFEI1',
 17  'D:\ORCL\XIFENFEI2'
 18  CHARACTER SET AL32UTF8
 19  ;
Control file created.
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-00600: internal error code, arguments: [kcvorl_2], [0], [54271176], [0],[54271176], [], [], [], [], [], [], []

查询了mos发现该错误一般是由于Bug 20562968 – ORA-600 [KCVORL_2] DURING SWITCHOVER AFTER DOWNGRADING TO 11.2.0.1导致主库在switchover的时候可能会遇到该错误,还是第一次遇到数据库在resetlogs 打开的时候遭遇该错误.分析trace文件

Dump continued from file: e:\oracle\diag\rdbms\orcl\orcl\trace\orcl_ora_1892.trc
ORA-00600: internal error code, arguments: [kcvorl_2], [0], [54271176], [0], [54271176], [], [], [], [], [], [], []
========= Dump for incident 3738 (ORA 600 [kcvorl_2]) ========
*** 2018-07-03 16:35:41.404
dbkedDefDump(): Starting incident default dumps (flags=0x2, level=3, mask=0x0)
----- Current SQL Statement for this session (sql_id=7j16t46cacjt9) -----
alter database open resetlogs
----- Call Stack Trace -----
calling              call     entry                argument values in hex
location             type     point                (? means dubious value)
-------------------- -------- -------------------- ----------------------------
ksedst1()+129        CALL???  skdstdst()           009233DA2 000000000 000000000
                                                   000000000
ksedst()+69          CALL???  ksedst1()            000000002 000000000 006F605E0
                                                   000000000
dbkedDefDump()+4536  CALL???  ksedst()             000000287 000000000 000000000
                                                   000000000
ksedmp()+43          CALL???  dbkedDefDump()       000000003 000000002 000000000
                                                   000468E71
ksfdmp()+87          CALL???  ksedmp()             000000000 000000000 000000000
                                                   000000000
dbgexPhaseII()+1819  CALL???  ksfdmp()             000000000 000000000 000000000
                                                   000000000
dbgexProcessError()  CALL???  dbgexPhaseII()       00C9B0570 00C9BD448 000000E9A
+2563                                              000000002
dbgeExecuteForError  CALL???  dbgexProcessError()  00C9B0570 00C9B7540 000000001
()+65                                              000000000
dbgePostErrorKGE()+  CALL???  dbgeExecuteForError  BC30C65D3 019606FF0 018881658
1726                          ()                   000502034
dbkePostKGE_kgsf()+  CALL???  dbgePostErrorKGE()   0196075B0 00CB80040 000000258
75                                                 BA268928B586
kgeadse()+342        CALL???  dbkePostKGE_kgsf()   000000000 000000000
                                                   BA2688AA3890 7FFFB6A1728
kgerinv_internal()+  CALL???  kgeadse()            006F8C5A8 0196075B0 000000000
76                                                 0196072B0
kgerinv()+49         CALL???  kgerinv_internal()   018883960 0071C3480 000000000
                                                   000000000
kgeasnmierr()+64     CALL???  kgerinv()            0014B18A0 0071C3480 018881C20
                                                   000000000
kcvorl()+8957        CALL???  kgeasnmierr()        0071C4650 018882B00 000000000
                                                   000000004
adbdrv()+54131       CALL???  kcvorl()+428         000000008 018883E20 018887A88
                                                   078136DFB
opiexe()+20842       CALL???  adbdrv()             000000023 000000003
                                                   7FF00000102 000000000
opiosq0()+5129       CALL???  opiexe()+16981       000000004 000000000 01888A8E0
                                                   009361AB3
kpooprx()+357        CALL???  opiosq0()            000000003 00000000E 01888ABB0
                                                   0000000A4
kpoal8()+940         CALL???  kpooprx()            000020C80 008832840 00CBD1A48
                                                   000000001
opiodr()+1662        CALL???  kpoal8()             00000005E 00000001C 01888E120
                                                   00CA5BAA8
ttcpip()+1325        CALL???  opiodr()             480000000000005E
                                                   49004D000000001C 01888E120
                                                   4100200000000000
opitsk()+2040        CALL???  ttcpip()             0196212D0 000000000 000000000
                                                   000000000
opiino()+1258        CALL???  opitsk()             00000001E 000000000 000000000
                                                   01888FA18
opiodr()+1662        CALL???  opiino()             00000003C 000000004 01888FAD0
                                                   000000000
opidrv()+864         CALL???  opiodr()             00000003C 000000004 01888FAD0
                                                   6F5C3A6500000000
sou2o()+98           CALL???  opidrv()+150         00000003C 000000004 01888FAD0
                                                   000000000
opimai_real()+158    CALL???  sou2o()              01888FB00 01888FBC4
                                                   100003000707E2 202020029001D
opimai()+191         CALL???  opimai_real()        00000001A 01888FC88 000000034
                                                   000000000
OracleThreadStart()  CALL???  opimai()             01888FE90 01211FF38 000000002
+724                                               01888FC88
0000000078D3B6DA     CALL???  OracleThreadStart()  01211FF38 000000000 000000000
                                                   01888FFA8
--------------------- Binary Stack Dump ---------------------

通过分析发现其中一个文件scn不对

SQL> SELECT status,
  2  checkpoint_change#,
  3  checkpoint_time,FUZZY,
  4  count(*) ROW_NUM
  5  FROM v$datafile_header
  6  GROUP BY status, checkpoint_change#, checkpoint_time,fuzzy
  7  ORDER BY status, checkpoint_change#, checkpoint_time;
STATUS  CHECKPOINT_CHANGE# CHECKPOINT_TIME    FUZ    ROW_NUM
------- ------------------ ------------------ --- ----------
ONLINE            54271175 27-MAY-18          YES          1
ONLINE            54271179 25-JUN-18          YES          5
SQL> set numw 16
SQL> SELECT status,
  2  checkpoint_change#,
  3  checkpoint_time,last_change#,
  4  count(*) ROW_NUM
  5  FROM v$datafile
  6  GROUP BY status, checkpoint_change#, checkpoint_time,last_change#
  7  ORDER BY status, checkpoint_change#, checkpoint_time;
STATUS  CHECKPOINT_CHANGE# CHECKPOINT_TIME        LAST_CHANGE#          ROW_NUM
------- ------------------ ------------------ ---------------- ----------------
RECOVER           54271175 27-MAY-18                                          1
RECOVER           54271179 25-JUN-18                                          4
SYSTEM            54271179 25-JUN-18                                          1
SQL> set linesize 150
SQL> select ts#,file#,TABLESPACE_NAME,status,
  2  to_char(CREATION_TIME,'yyyy-mm-dd hh24:mi:ss') CREATE_TIME,
  3  to_char(checkpoint_change#,'9999999999999999') "SCN",
  4  to_char(RESETLOGS_CHANGE#,'9999999999999999') "RESETLOGS SCN",FUZZY
  5  from v$datafile_header;
             TS#            FILE# TABLESPACE_NAME                STATUS  CREATE_
TIME         SCN               RESETLOGS SCN     FUZ
---------------- ---------------- ------------------------------ ------- -------
------------ ----------------- ----------------- ---
               0                1 SYSTEM                         ONLINE  2010-03
-30 10:07:48          54271179          54271176 YES
               1                2 SYSAUX                         ONLINE  2010-03
-30 10:07:52          54271175          54271176 YES
               2                3 UNDOTBS1                       ONLINE  2010-03
-30 11:07:21          54271179          54271176 YES
               4                4 USERS                          ONLINE  2010-03
-30 10:08:04          54271179          54271176 YES
               6                5 XIFENFEI1                      ONLINE  2016-08
-02 18:52:23          54271179          54271176 YES
               7                6 XIFENFEI2                      ONLINE  2016-08
-02 18:52:31          54271179          54271176 YES
6 rows selected.

有SYSAUX数据文件的scn不对,通过bbed修改scn继续恢复成功

SQL> alter database open resetlogs;
Database altered.

ORA-00600: internal error code, arguments: [1301]

有网友数据库报ORA-00600: internal error code, arguments: [1301]错误,然后就crash.简单查mos发现是bug引起
数据库版本

Sun Jul 01 17:48:09 2018
ORACLE V10.2.0.4.0 - 64bit Production vsnsta=0
vsnsql=14 vsnxtr=3
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Windows NT Version V5.2 Service Pack 2
CPU                 : 32 - type 8664, 2 Physical Cores

alert日志报错

Sun Jul 01 17:48:09 2018
Errors in file d:\oracle\product\10.2.0\admin\xifenfei\bdump\xifenfei_pmon_98792.trc:
ORA-00600: internal error code, arguments: [1301], [0x15CAEAF5C8], [11], [], [], [], [], []
Sun Jul 01 17:48:14 2018
Errors in file d:\oracle\product\10.2.0\admin\xifenfei\bdump\xifenfei_pmon_98792.trc:
ORA-00600: internal error code, arguments: [1301], [0x15CAEAF5C8], [11], [], [], [], [], []
Sun Jul 01 17:48:14 2018
PMON: terminating instance due to error 472
Sun Jul 01 17:48:14 2018
Errors in file d:\oracle\product\10.2.0\admin\xifenfei\bdump\xifenfei_lgwr_98004.trc:
ORA-00472: PMON  process terminated with error
Sun Jul 01 17:48:14 2018
Errors in file d:\oracle\product\10.2.0\admin\xifenfei\bdump\xifenfei_psp0_97900.trc:
ORA-00472: PMON  process terminated with error
Sun Jul 01 17:48:15 2018
Errors in file d:\oracle\product\10.2.0\admin\xifenfei\bdump\xifenfei_dbw3_79724.trc:
ORA-00472: PMON  process terminated with error
Sun Jul 01 17:48:16 2018
Errors in file d:\oracle\product\10.2.0\admin\xifenfei\bdump\xifenfei_dbw0_89896.trc:
ORA-00472: PMON  process terminated with error
Sun Jul 01 17:48:16 2018
Errors in file d:\oracle\product\10.2.0\admin\xifenfei\bdump\xifenfei_ckpt_98468.trc:
ORA-00472: PMON  process terminated with error
Sun Jul 01 17:48:16 2018
Errors in file d:\oracle\product\10.2.0\admin\xifenfei\bdump\xifenfei_dbw2_98348.trc:
ORA-00472: PMON  process terminated with error
Sun Jul 01 17:48:17 2018
Errors in file d:\oracle\product\10.2.0\admin\xifenfei\bdump\xifenfei_j000_109140.trc:
ORA-00472: PMON 进程因错误而终止
Sun Jul 01 17:48:17 2018
Errors in file d:\oracle\product\10.2.0\admin\xifenfei\bdump\xifenfei_dbw1_99112.trc:
ORA-00472: PMON  process terminated with error
Sun Jul 01 17:48:17 2018
Errors in file d:\oracle\product\10.2.0\admin\xifenfei\bdump\xifenfei_mman_91488.trc:
ORA-00472: PMON  process terminated with error
Sun Jul 01 17:48:53 2018
Errors in file d:\oracle\product\10.2.0\admin\xifenfei\bdump\xifenfei_q001_81352.trc:
ORA-00472: PMON  process terminated with error
Sun Jul 01 17:50:59 2018
Errors in file d:\oracle\product\10.2.0\admin\xifenfei\bdump\xifenfei_reco_91716.trc:
ORA-00472: PMON  process terminated with error
Sun Jul 01 17:50:59 2018
Errors in file d:\oracle\product\10.2.0\admin\xifenfei\bdump\xifenfei_smon_98428.trc:
ORA-00472: PMON  process terminated with error
Sun Jul 01 17:51:02 2018
Instance terminated by PMON, pid = 98792

trace文件信息中的call stack信息

ksedmp: internal or fatal error
ORA-00600: internal error code, arguments: [1301], [0x15CAEAF5C8], [11], [], [], [], [], []
check trace file d:\oracle\product\10.2.0\db_1\rdbms\trace\xifenfei_ora_0.trc for preloading .sym file messages
----- Call Stack Trace -----
calling              call     entry                argument values in hex
location             type     point                (? means dubious value)
-------------------- -------- -------------------- ----------------------------
ksedmp+663           CALL???  ksedst+55            003C878B8 000000000 00C18CE58
                                                   000000000
ksfdmp+19            CALL???  ksedmp+663           000000003 009BE3650 00BD10040
                                                   003CACC80
kgeriv+184           CALL???  ksfdmp+19            000000001 000000037
                                                   15CAEAF5C8 13CA54BB60
kgesiv+102           CALL???  kgeriv+184           003C8735C 000000001 0000003BC
                                                   15CA0562E0
ksesic2+125          CALL???  kgesiv+102           00000000A 15CAEAF5C8
                                                   15CF809B88 00042965C
ksuxdp+652           CALL???  ksesic2+125          000000515 000000002
                                                   15CAEAF5C8 000000000
ksuxdpg+114          CALL???  ksuxdp+652           000000000 0080D5698
                                                   76CCBF8BD519 009BE3010
ksucln+2458          CALL???  ksuxdpg+114          000000003 000000000 00BD3DC60
                                                   000000048
ksbrdp+903           CALL???  ksucln+2458          0049B7760 0049B777C 000000002
                                                   000000005
opirip+700           CALL???  ksbrdp+903           726F77740000001E 003C8B000
                                                   00C18FA50 000000000
opidrv+860           CALL???  opirip+700           000000032 000000004 00C18FD70
                                                   000000000
sou2o+52             CALL???  opidrv+860           000000032 000000004 00C18FD70
                                                   000000003
opimai_real+272      CALL???  sou2o+52             000000000 0076C0000 000040000
                                                   000000000
opimai+96            CALL???  opimai_real+272      000000000 000000000 000000000
                                                   000000000
BackgroundThreadSta  CALL???  opimai+96            00C18FEC8 000000001 000000000
rt+633                                             000000000
0000000078D3B71A     CALL???  BackgroundThreadSta  D65F12CF0 000000000 000000000
                              rt+633               00C18FFA8

基本上可以定位因为Bug 7294679 – ORA-600 [1301] – INSTANCE TERMINATED BY PMON 原因导致pmon无法完全正常清理被kill掉的session而引起pmon异常从而使得数据库crash.在10.2.0.5和11.2.0.1版本之前alter system kill session 请谨慎,还有类似因为kill session导致 ORA-00600 [1113]的错误.
参考文档:ORA-00600 [1301] – Instance Terminated by PMON After Killing Sessions (Doc ID 737561.1)
ORA-00600 [1113] Instance Termination When Killing Sessions (Doc ID 561322.1)

KFED – ERROR!!! could not initialize the diag context

grid用户执行kfed报ERROR!!! could not initialize the diag context错误

[grid@xifenfei ~]$ kfed
ERROR!!! could not initialize the diag context

asmtool权限/所有者不对
通过分析是由于kfed在执行的时候需要在$ORACLE_BASE/diag目录下面创建asmtool文件夹以及相关文件,当grid用户无法创建之时,就会出现此类错误

[grid@xifenfei ~]$ cd $ORACLE_BASE/diag
[grid@xifenfei diag]$ ls
asm  asmtool  rdbms  tnslsnr
[grid@xifenfei diag]$ ls -ltr
total 16
drwxr-xr-x. 3 grid oinstall 4096 Jul 31  2014 tnslsnr
drwxr-xr-x. 3 root   root     4096 Apr 21 10:11 asmtool
drwxr-x---. 4 grid oinstall 4096 Apr 29  2018 rdbms
drwxr-xr-x. 3 grid oinstall 4096 Jun 19  2018 asm

修改asmtool所有者

[root@xifenfei ~]# cd /u01/app/grid/diag/
[root@xifenfei diag]# chown  grid:oinstall asmtool/

grid用户执行kfed正常

[grid@xifenfei diag]$ kfed
as/mlib         ASM Library [asmlib='lib']
aun/um          AU number to examine or update [AUNUM=number]
aus/z           Allocation Unit size in bytes [AUSZ=number]
blkn/um         Block number to examine or update [BLKNUM=number]
blks/z          Metadata block size in bytes [BLKSZ=number]
ch/ksum         Update checksum before each write [CHKSUM=YES/NO]
cn/t            Count of AUs to process [CNT=number]
de/v            ASM device to examine or update [DEV=string]
dm/pall         Don't suppress repeated lines when dumping corrupt blocks [DMPALL=YES/NO]
o/p             KFED operation type [OP=READ/WRITE/MERGE/REPAIR/NEW/FORM/FIND/STRUCT]
p/rovnm         Name for provisioning purposes [PROVNM=string]
s/eek           AU number to seek to [SEEK=number]
te/xt           File name for translated block text [TEXT=string]
ty/pe           ASM metadata block type number [TYPE=number]

kfed创建对应目录

[grid@xifenfei asmtool]$ ls -ltr
total 8
drwxr-xr-x. 3 root   root     4096 Apr 21 10:23 user_root
drwxr-xr-x. 3 grid oinstall 4096 Apr 21 10:24 user_grid

配置Oracle传输数据加密

随着安全意识和需求的越来越高,有一些客户要求数据库传输数据过程中对其进行加密,防止有人在网络层面通过抓包,获取数据内容,从而保证了在网络层面的数据传输安全.实现这种加密,主要是通过Database Advanced Security组件实现,主要是通过slnet.ora的配置实现数据在服务端和客户端之间传输加密.
数据库安装的安全组件和支持加密算法

[oracle@ora11g ~]$ adapters
Installed Oracle Net transport protocols are:
    IPC
    BEQ
    TCP/IP
    SSL
    RAW
    SDP/IB
Installed Oracle Net naming methods are:
    Local Naming (tnsnames.ora)
    Oracle Directory Naming
    Oracle Host Naming
    Oracle Names Server Naming
Installed Oracle Advanced Security options are:
    RC4 40-bit encryption
    RC4 56-bit encryption
    RC4 128-bit encryption
    RC4 256-bit encryption
    DES40 40-bit encryption
    DES 56-bit encryption
    3DES 112-bit encryption
    3DES 168-bit encryption
    AES 128-bit encryption
    AES 192-bit encryption
    AES 256-bit encryption
    MD5 crypto-checksumming
    SHA-1 crypto-checksumming
    Kerberos v5 authentication
    RADIUS authentication

启用客户端trace
trace只是为了验证传输加密,在实际生产中该功能需要关闭,不然会比较严重影响性能和导致trace文件过多磁盘空间占用较大问题

Trace_level_client=16
Trace_directory_client=D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\log
Trace_unique_client=on
Trace_timestamp_client=on
Diag_adr_enabled=off
tnsping.trace_directory=D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\log
tnsping.trace_level=admin

捕获非加密情况数据
通过对客户端trace文件的分析,基本上可以发现客户端和服务端数据传输是明码方式进行,也就是说如果有人在这个网络上捕获包,进行分析,可以知道你的应用端和数据库端的所有操作,数据存在安全隐患

----数据库登录
[24-6月 -2018 12:37:55:555] nam_gnsp: Reading parameter "SQLNET.ENCRYPTION_CLIENT" from parameter file
[24-6月 -2018 12:37:55:555] nam_gnsp: Parameter not found
[24-6月 -2018 12:37:55:555] naequad: Using default value "ACCEPTED"
[24-6月 -2018 12:37:55:555] nam_gic: entry
[24-6月 -2018 12:37:55:555] nam_gic: Counting # of items in "SQLNET.ENCRYPTION_TYPES_CLIENT" parameter
[24-6月 -2018 12:37:55:555] nam_gic: Parameter not found
[24-6月 -2018 12:37:55:555] nam_gic: exit
[24-6月 -2018 12:37:55:555] naesno: Using default value "all available algorithms"
[24-6月 -2018 12:37:55:555] naeshow: entry
[24-6月 -2018 12:37:55:555] naeshow: These are the encryption algorithms that the client will accept:
[24-6月 -2018 12:37:55:555] naeshow: Choice 0: no algorithm; encryption inactive
[24-6月 -2018 12:37:55:555] naeshow: Choice 1: 'AES256' (ID 17)
[24-6月 -2018 12:37:55:555] naeshow: Choice 2: 'RC4_256' (ID 6)
[24-6月 -2018 12:37:55:555] naeshow: Choice 3: 'AES192' (ID 16)
[24-6月 -2018 12:37:55:555] naeshow: Choice 4: '3DES168' (ID 12)
[24-6月 -2018 12:37:55:555] naeshow: Choice 5: 'AES128' (ID 15)
[24-6月 -2018 12:37:55:555] naeshow: Choice 6: 'RC4_128' (ID 10)
[24-6月 -2018 12:37:55:555] naeshow: Choice 7: '3DES112' (ID 11)
[24-6月 -2018 12:37:55:555] naeshow: Choice 8: 'RC4_56' (ID 8)
[24-6月 -2018 12:37:55:555] naeshow: Choice 9: 'DES' (ID 2)
[24-6月 -2018 12:37:55:555] naeshow: Choice 10: 'RC4_40' (ID 1)
[24-6月 -2018 12:37:55:555] naeshow: Choice 11: 'DES40' (ID 3)
[24-6月 -2018 12:37:55:555] naeshow: exit
----数据库执行select * from dual查询
[24-6月 -2018 12:39:38:744] nioqrc: entry
[24-6月 -2018 12:39:38:744] nsbasic_bsd: entry
[24-6月 -2018 12:39:38:744] nsbasic_bsd: tot=0, plen=256.
[24-6月 -2018 12:39:38:744] nttfpwr: entry
[24-6月 -2018 12:39:38:744] nttfpwr: socket 888 had bytes written=256
[24-6月 -2018 12:39:38:744] nttfpwr: exit
[24-6月 -2018 12:39:38:744] nsbasic_bsd: packet dump
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 01 00 00 00 06 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 00 03 5E 15 61 80 00  |...^.a..|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 00 00 00 00 FE FF FF  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: FF FF FF FF FF 12 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 FE FF FF FF FF FF FF  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: FF 0D 00 00 00 FE FF FF  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: FF FF FF FF FF FE FF FF  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: FF FF FF FF FF 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 01 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 00 00 00 00 FE FF FF  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: FF FF FF FF FF 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 00 00 00 00 FE FF FF  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: FF FF FF FF FF FE FF FF  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: FF FF FF FF FF FE FF FF  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: FF FF FF FF FF 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 00 00 00 00 FE FF FF  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: FF FF FF FF FF FE FF FF  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: FF FF FF FF FF 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 12 73 65 6C 65 63 74  |..select|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 20 2A 20 66 72 6F 6D 20  |.*.from.|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 64 75 61 6C 01 00 00 00  |dual....|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 01 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_bsd: exit (0)
[24-6月 -2018 12:39:38:744] nsbasic_brc: entry: oln/tot=0,prd=0
----返回查询结果
[24-6月 -2018 12:39:38:744] nsbasic_brc: packet dump
[24-6月 -2018 12:39:38:744] nsbasic_brc: 01 04 00 00 06 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 10 17 00 00 00 02  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: FC 54 0D 44 40 AD B2 74  |.T.D@..t|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 09 CB A2 01 A7 2D 38 78  |.....-8x|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 76 04 15 03 3B 28 01 00  |v...;(..|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 01 00 00 00 51 01  |......Q.|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 80 00 00 01 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 00 00 00 54 03 01  |.....T..|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 01 00 00 00 01 05 05 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 05 44 55 4D 4D 59  |...DUMMY|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 00 00 00 00 07 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 07 78 76 04 15 05  |...xv...|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 0F 0C 01 00 00 00 E8 1F  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 02 00 00 00 02 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 00 00 00 00 06 22  |......."|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 01 00 00 00 00 00 01 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 00 00 07 01 58 08  |......X.|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 06 00 7E 2D 18 00 00 00  |..~-....|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 02 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 04 01 00 00 00 13  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 01 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 00 02 00 00 00 03  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 00 00 00 00 00 15  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 01 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 00 00 00 00 00 00  |........|
[24-6月 -2018 12:39:38:744] nsbasic_brc: 00 00 00 00              |....    |
[24-6月 -2018 12:39:38:744] nsbasic_brc: exit: oln=0, dln=250, tot=260, rc=0

启用数据传输加密
这几个参数,每个参数都有几种选项,具体在下文补充说明

--服务端配置sqlnet.ora中配置,并重启监听
SQLNET.ENCRYPTION_SERVER = requested
SQLNET.ENCRYPTION_TYPES_SERVER= (RC4_128)
--客户端sqlnet.ora中配置
SQLNET.ENCRYPTION_CLIENT = requested
SQLNET.ENCRYPTION_TYPES_CLIENT= (RC4_128)

捕获加密情况数据

----登录操作
[24-6月 -2018 12:45:16:786] nam_gnsp: Reading parameter "SQLNET.ENCRYPTION_CLIENT" from parameter file
[24-6月 -2018 12:45:16:786] nam_gnsp: Found value "requested"
[24-6月 -2018 12:45:16:786] nam_gic: entry
[24-6月 -2018 12:45:16:786] nam_gic: Counting # of items in "SQLNET.ENCRYPTION_TYPES_CLIENT" parameter
[24-6月 -2018 12:45:16:786] nam_gic: Found 1 items
[24-6月 -2018 12:45:16:786] nam_gic: exit
[24-6月 -2018 12:45:16:786] nam_gnsp: Reading parameter "SQLNET.ENCRYPTION_TYPES_CLIENT" from parameter file
[24-6月 -2018 12:45:16:786] nam_gnsp: Found value "RC4_128"
[24-6月 -2018 12:45:16:786] naeshow: entry
[24-6月 -2018 12:45:16:786] naeshow: These are the encryption algorithms that the client will accept:
[24-6月 -2018 12:45:16:786] naeshow: Choice 0: 'RC4_128' (ID 10)
[24-6月 -2018 12:45:16:786] naeshow: Choice 1: no algorithm; encryption inactive
----发送查询select * from dual
[24-6月 -2018 12:49:51:528] nttwr: socket 848 had bytes written=277
[24-6月 -2018 12:49:51:528] nttwr: exit
[24-6月 -2018 12:49:51:528] nspsend: packet dump
[24-6月 -2018 12:49:51:528] nspsend: 01 15 00 00 06 00 00 00  |........|
[24-6月 -2018 12:49:51:528] nspsend: 00 00 DF CE 9E 46 DB 71  |.....F.q|
[24-6月 -2018 12:49:51:528] nspsend: CE 88 43 9E CA 43 F8 BE  |..C..C..|
[24-6月 -2018 12:49:51:528] nspsend: E8 ED 07 F1 2E 93 B6 2C  |.......,|
[24-6月 -2018 12:49:51:528] nspsend: E9 5A E5 D8 06 8B DB EE  |.Z......|
[24-6月 -2018 12:49:51:528] nspsend: 66 9E B5 BB 24 C0 5E 4C  |f...$.^L|
[24-6月 -2018 12:49:51:528] nspsend: 33 9C 81 10 18 0F BE 30  |3......0|
[24-6月 -2018 12:49:51:528] nspsend: 79 56 4C D8 4A F9 4D 78  |yVL.J.Mx|
[24-6月 -2018 12:49:51:528] nspsend: 6A 42 24 89 D4 0D 1F 92  |jB$.....|
[24-6月 -2018 12:49:51:528] nspsend: 44 24 DA 42 15 49 22 09  |D$.B.I".|
[24-6月 -2018 12:49:51:528] nspsend: FE AF 07 EA 01 36 83 D4  |.....6..|
[24-6月 -2018 12:49:51:528] nspsend: D6 B3 16 BD 1E B2 88 93  |........|
[24-6月 -2018 12:49:51:528] nspsend: 29 39 DB 44 86 E5 C6 F2  |)9.D....|
[24-6月 -2018 12:49:51:528] nspsend: DF 87 90 4B 6E 5A 66 D3  |...KnZf.|
[24-6月 -2018 12:49:51:528] nspsend: B1 1A 3A 34 01 A9 C2 F1  |..:4....|
[24-6月 -2018 12:49:51:528] nspsend: C7 08 06 50 2B BB C4 5E  |...P+..^|
[24-6月 -2018 12:49:51:528] nspsend: C0 80 D7 72 E4 D8 C0 B6  |...r....|
[24-6月 -2018 12:49:51:528] nspsend: C4 31 90 9A 3C 83 B0 16  |.1..<...|
[24-6月 -2018 12:49:51:528] nspsend: D1 AE 82 56 39 46 08 20  |...V9F..|
[24-6月 -2018 12:49:51:528] nspsend: DE D2 DC 6B BC 5F BF 7E  |...k._.~|
[24-6月 -2018 12:49:51:528] nspsend: 25 2A 31 D7 A3 60 CE 7A  |%*1..`.z|
[24-6月 -2018 12:49:51:528] nspsend: 42 58 0A 43 11 F5 D6 0A  |BX.C....|
[24-6月 -2018 12:49:51:528] nspsend: 31 C8 96 38 F3 C2 90 6A  |1..8...j|
[24-6月 -2018 12:49:51:528] nspsend: 64 50 46 B0 A2 EF 1E 9A  |dPF.....|
[24-6月 -2018 12:49:51:528] nspsend: 86 11 67 C9 9B CD 8C 2B  |..g....+|
[24-6月 -2018 12:49:51:528] nspsend: 2A 02 0D 9B C3 C5 D3 23  |*......#|
[24-6月 -2018 12:49:51:528] nspsend: 75 4C 4A 5B A3 85 80 C5  |uLJ[....|
[24-6月 -2018 12:49:51:528] nspsend: FA F0 6C C3 23 72 D5 28  |..l.#r.(|
[24-6月 -2018 12:49:51:528] nspsend: 0E 16 C7 C8 1B 3D CC B8  |.....=..|
[24-6月 -2018 12:49:51:528] nspsend: 06 FA D7 FB 03 EB E6 41  |.......A|
[24-6月 -2018 12:49:51:528] nspsend: 05 54 B0 5A 18 CC 7F E7  |.T.Z....|
[24-6月 -2018 12:49:51:528] nspsend: 2D 36 C4 4A E6 B2 7F F6  |-6.J....|
[24-6月 -2018 12:49:51:528] nspsend: 1E 10 5B 20 CF 60 FA D3  |..[..`..|
[24-6月 -2018 12:49:51:528] nspsend: 6E B1 F7 9E 35 92 27 BA  |n...5.'.|
[24-6月 -2018 12:49:51:528] nspsend: 9A 4A F1 00 01           |.J...   |
[24-6月 -2018 12:49:51:528] nspsend: 277 bytes to transport
[24-6月 -2018 12:49:51:528] nspsend: normal exit
----接收数据
[24-6月 -2018 12:49:51:528] nttrd: exit
[24-6月 -2018 12:49:51:528] nsprecv: 262 bytes from transport
[24-6月 -2018 12:49:51:528] nsprecv: tlen=262, plen=262, type=6
[24-6月 -2018 12:49:51:528] nsprecv: packet dump
[24-6月 -2018 12:49:51:528] nsprecv: 01 06 00 00 06 00 00 00  |........|
[24-6月 -2018 12:49:51:528] nsprecv: 00 00 63 2C 04 99 D8 25  |..c,...%|
[24-6月 -2018 12:49:51:528] nsprecv: 40 38 A0 30 AE 3D 24 05  |@8.0.=$.|
[24-6月 -2018 12:49:51:528] nsprecv: 97 E4 70 E9 1D 76 8B A0  |..p..v..|
[24-6月 -2018 12:49:51:528] nsprecv: 38 AD 7E D3 B1 A1 BD B7  |8.~.....|
[24-6月 -2018 12:49:51:528] nsprecv: 29 1F 0C 19 9A 0B FD D0  |).......|
[24-6月 -2018 12:49:51:528] nsprecv: F3 13 51 E0 78 C2 7C 7D  |..Q.x.|}|
[24-6月 -2018 12:49:51:528] nsprecv: 37 BC AA 25 23 20 FF 05  |7..%#...|
[24-6月 -2018 12:49:51:528] nsprecv: E0 F6 AF C3 53 C9 50 2F  |....S.P/|
[24-6月 -2018 12:49:51:528] nsprecv: 68 0D F1 CB CE B8 90 6B  |h......k|
[24-6月 -2018 12:49:51:528] nsprecv: 90 CC B2 B5 DF D8 C3 BC  |........|
[24-6月 -2018 12:49:51:529] nsprecv: F0 7A 37 E7 1B FA 3E 6B  |.z7...>k|
[24-6月 -2018 12:49:51:529] nsprecv: 13 90 7A 10 1C 6D C5 40  |..z..m.@|
[24-6月 -2018 12:49:51:529] nsprecv: BC E0 B9 4F 69 10 49 4D  |...Oi.IM|
[24-6月 -2018 12:49:51:529] nsprecv: B9 78 2E 28 B3 8C 05 53  |.x.(...S|
[24-6月 -2018 12:49:51:529] nsprecv: 18 99 B2 AF 46 AE 1D D7  |....F...|
[24-6月 -2018 12:49:51:529] nsprecv: 0E 19 56 28 7A B6 16 72  |..V(z..r|
[24-6月 -2018 12:49:51:529] nsprecv: 46 57 C9 7A 1C DB D1 A2  |FW.z....|
[24-6月 -2018 12:49:51:529] nsprecv: A2 35 B7 DD 63 EA 5E 07  |.5..c.^.|
[24-6月 -2018 12:49:51:529] nsprecv: F9 E1 4E 54 D0 57 63 9D  |..NT.Wc.|
[24-6月 -2018 12:49:51:529] nsprecv: 12 B0 7B 6F 0C DC 98 90  |..{o....|
[24-6月 -2018 12:49:51:529] nsprecv: C1 71 3B BD DA 27 03 CE  |.q;..'..|
[24-6月 -2018 12:49:51:529] nsprecv: 4B FA 5D 64 31 17 D1 CC  |K.]d1...|
[24-6月 -2018 12:49:51:529] nsprecv: 49 A7 A7 47 D8 26 81 23  |I..G.&.#|
[24-6月 -2018 12:49:51:529] nsprecv: BC 9E 54 76 C9 98 07 CF  |..Tv....|
[24-6月 -2018 12:49:51:529] nsprecv: CF 97 A4 70 57 68 80 16  |...pWh..|
[24-6月 -2018 12:49:51:529] nsprecv: 45 14 3D 32 06 3E 1A 06  |E.=2.>..|
[24-6月 -2018 12:49:51:529] nsprecv: 0A D6 8F 51 29 D3 A4 2E  |...Q)...|
[24-6月 -2018 12:49:51:529] nsprecv: 06 0C 03 B1 7A D1 5B 3B  |....z.[;|
[24-6月 -2018 12:49:51:529] nsprecv: 22 9A 6B 0F CD F7 EA 8C  |".k.....|
[24-6月 -2018 12:49:51:529] nsprecv: D7 8C CE F8 B6 9E 80 01  |........|
[24-6月 -2018 12:49:51:529] nsprecv: 95 1A D8 35 31 84 D6 42  |...51..B|
[24-6月 -2018 12:49:51:529] nsprecv: 7C CC 2D 31 00 01        ||.-1..  |
[24-6月 -2018 12:49:51:529] nsprecv: normal exit

这里可以发现,通过配置相关传输加密之后,客户端trace看到的已经是加密之后的数据,也就是说这样可以确保数据传输安全,网络上就算捕获这些包,也无法知道应用端和数据库端交互的内容.

补充说明
1. ENCRYPTION_SERVER和ENCRYPTION_CLIENT参数对应关系
SQLNET.ENCRYPTION_SERVICE-CLIENT


2. ENCRYPTION_TYPES_SERVER和ENCRYPTION_TYPES_CLIENT采用加密算法选择,可以选择adapters查看到的一种或者多种,默认为支持所有加密算法
3. 对于jdbc应用来说,可以参考下列配置方式

import oracle.jdbc.OracleConnection;
import oracle.jdbc.pool.OracleDataSource;
import java.sql.*;
import java.util.*;
class Employee1{
public static void main (String args []) throws Exception
{
OracleDataSource ods = new OracleDataSource();
Properties props = new Properties();
props.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_LEVEL, "REQUIRED");
props.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_NET_ENCRYPTION_TYPES, "(AES256,AES192,AES128)");
ods.setURL("jdbc:oracle:thin:@//yourHost:port/dbServiceName");
ods.setUser("scott");
ods.setPassword("tiger");
ods.setConnectionProperties(props);
Connection conn = ods.getConnection();
// Create a Statement
Statement stmt = conn.createStatement ();
// Select the ENAME column from the EMP table
ResultSet rset = stmt.executeQuery ("select ENAME from EMP");
// Iterate through the result and print the employee names
while (rset.next ())
System.out.println (rset.getString (1));
rset.close();
stmt.close();
conn.close();
}
}

truncate table 无论drop storage还是reuse storage不影响数据恢复

今天有朋友咨询,truncate table有drop storage和reuse storage方式,是否影响后续的数据恢复(在没有其他覆盖的情况下),我做了一个简单的测试证明,这些都不影响truncate table的数据库恢复
创建测试环境

SQL> create table t_xifenfei tablespace USERNEW
  2   as select * from dba_objects;
Table created.
SQL> create table t_xifenfei2  tablespace USERNEW
  2   as select * from dba_objects;
Table created.
SQL>  create table t_xifenfei3  tablespace USERNEW
  2  as select * from dba_objects;
Table created.
SQL> alter system checkpoint;
System altered.
SQL> select count(*) from t_xifenfei;
  COUNT(*)
----------
     86348
SQL>  select count(*) from t_xifenfei2;
  COUNT(*)
----------
     86349
SQL>  select count(*) from t_xifenfei3;
  COUNT(*)
----------
     86350
SQL> select object_id,data_object_id,object_name from dba_objects where object_name like 't_xifenfei%';
 OBJECT_ID DATA_OBJECT_ID OBJECT_NAME
---------- -------------- ------------------------------
     88205          88205 t_xifenfei
     88206          88206 t_xifenfei2
     88207          88207 t_xifenfei3
SQL> truncate table t_xifenfei;
Table truncated.
SQL> truncate table t_xifenfei2 drop storage;
Table truncated.
SQL> truncate table t_xifenfei3 reuse storage;
Table truncated.

使用dul进行恢复

DUL>  bootstrap;
DUL> scan database;
scanning database...
scanning database finished.
DUL> unload table sys.t_xifenfei object 88205;
Unloading table: t_xifenfei,object ID: 88205
Unloading segment,storage(Obj#=88205 DataObj#=88205 TS#=6 File#=5 Block#=1410 Cluster=0)
86348 rows unloaded
DUL> unload table sys.t_xifenfei2 object 88206;
Unloading table: t_xifenfei2,object ID: 88206
Unloading segment,storage(Obj#=88206 DataObj#=88206 TS#=6 File#=5 Block#=2690 Cluster=0)
86349 rows unloaded
DUL> unload table sys.t_xifenfei3 object 88207;
Unloading table: t_xifenfei3,object ID: 88207
Unloading segment,storage(Obj#=88207 DataObj#=88207 TS#=6 File#=5 Block#=3970 Cluster=0)
86350 rows unloaded

这里证明truncate table不管是drop storage还是reuse storage或者默认,在没有被覆盖的情况下,数据均完全恢复出来

OERR: ALL 600 Ora 600 Layers

** 0000 ** Service Layer
========================
   KIESCBAS    (1)                              Component notifier component
   KIESDBAS    (100)                                         Debug component
   KIESEBAS    (300)                                         Error component
   KIESLBAS    (500)                                          Lock component
   KIESMBAS    (700)                                        Memory component
   KIESPBAS    (900)                             System Parameters component
   KIESSBAS    (1100)                          System State object component
   KIESGBAS    (1110)               Generic Linked List management component
   KIESQBAS    (1140)                                      Enqueue component
   KIESIBAS    (1180)                               Instance Locks component
   KIESUBAS    (1200)                            User State object component
   KIESABAS    (1400)                                   Async Msgs component
   KIESKBAS    (1700)                                  license Key component
   KIESRBAS    (1800)                        Instance Registration component
   KIESOBAS    (1850)                                 I/O Services component
** 2000 ** Cache Layer Component Base internal error values
===========================================================
   KIECOBAS    (2000)                                     Cache Op component
   KIECCBAS    (2100)                            Control File mgmt component
   KIECMBAS    (2200)                                        Misc (SCN etc.)
   KIECHBAS    (2400)                             Buffer Instance Hash Table
   KIECRBAS    (2600)                                    Redo file component
   KIECFBAS    (2800)                                      Db file component
   KIECABAS    (3000)                             Redo Application component
   KIECBBAS    (3200)                                    Buffer manager base
   KIECZBAS    (3400)               Archival & media recovery component base
   KIECLBAS    (3500)                           direct Loader component base
   KIECVBAS    (3600)                                recoVery component base
   KIECKBAS    (3700)                                  Thread component base
   KIECKBAS    (3800)                   Compatibility segment component base
   KIECBBAS    (3900)              Buffer working set manager component base
** 4000 ** Transaction Layer
============================
       Transaction Layer Component Base internal error values:
   KIETUBAS    (4000)                             Transaction Undo Component
      internal errors 4100-4199 used by transaction undo component as well
   KIETPBAS    (4210)                                   Transaction Parallel
   KIETLBAS    (4250)                                       Transaction List
   KIETSBAS    (4300)                                    Transaction Segment
   KIETCBAS    (4400)                          Transaction Control Component
      internal errors 4450-4499 used by transaction distributed component
   KIETBBAS    (4500)                            Transaction Block Component
   KIETABAS    (4600)                            Transaction Table Component
   KIETRBAS    (4800)                              Query Row Cache Component
   KIETMBAS    (4900)                          Transaction Monitor Component
   KIETSBAS    (4950)                              Query Bootstrap Component
   KIETEBAS    (5000)                                     Transaction Extent
** 6000 ** Data Layer
=====================
** 8000 ** Access Layer
=======================
   Data Layer Component Base internal error values:
   8000...8199 reserved for data layer
   8100...8149 reserved for index component
   8100 - 8109 used in KAU
   8110 - 8124 used in KKRI, KDIC (create index)
** 9000 ** Parallel Server
==========================
   KIECLBAS    (9000)                            KCL component: 9000 .. 9100
** 10000 ** Control Layer
=========================
** 12000 ** User/Oracle Interface Layer
=======================================
    User/Oracle Interface & SQL Layer "components" (in a loose sense)
   KIEUTBAS   (12000)                         TAC* component: 12000 .. 12009
   KIEURBAS   (12010)                         SORT component: 12010 .. 12199
   KIEUPBAS   (12200)                         OPI* component: 12200 .. 12299
   KIEUSBAS   (12300)      PRS, APA, EVA, EXP, QBA component: 12300 .. 12399
   KIEUWBAS   (12400)    QKA, MSQ, and row source components: 12400 .. 12499
                              reserved for rix: 12480 .. 12499
   KIEUVBAS   (12600)                         *DRV component: 12600 .. 12799
   KIEUDBAS   (12800)          KKDL, KKDC and KKM components: 12800 .. 12999
   KIEUXBAS   (13000                     DELEXE, UPDEXE, CRI: 13000 .. 13079
                                                        REF : 13080 .. 13089
                                                        WSM : 13090 .. 13099
   KIEUABAS   (13100)                                 OPIAMR: 13100 .. 13149
   KIEULBAS   (13200)                            ACL and ATB: 13200 .. 13230
   KIEUZBAS   (13250)                       AUD, AUSDRV, AOP: 13250 .. 13300
   KIEUOBAS   (13301)             KOK* and object extensions: 13301 .. 13499
   KIELCBAS   (16000)                            loader column array builder
** 14000 ** System-dependent "Layer"
====================================
   System Dependent Layer Component Base internal error values:
   KIESFBAS   (14000)                                         File component
   KIESCBAS   (14100)                                  Concurrency component
   KIESPBAS   (14200)                                      Process component
   KIESXBAS   (14300)                            Exception-handler component
   KIESMBAS   (14500)                                       Memory component
   ** Note that multiple ports can use the same internal error numbers.
      We allow this because we don't want to waste numbers on port internal
      errors, something which is very rarely used.  In addition it is
      likely that any bug that is reporting a port internal error to the
      generic (portable) coding group is going to have to supply a lot of
      documentation - so if two ports use the same number, it should never
      confuse anybody.
** 15000 ** Security Layer
==========================
    15000 - 15079 reserved for KZ*, SEC, and GRA;
    15080 - 15099 reserved for KZL;
    15100 - 15159 reserved for KKP;
    15160 - 15199 reserved for KKO and KKE;
        15190 .. 15199 reserved for KKOCRI
    15200 - 15229 reserved for KKS;
    15230 - 15259 reserved for KKT;
    15260 - 15399 reserved for KKD;
    15400 - 15409 reserved for KKY;
    15410 - 15499 reserved for KKX (and PSD);
    15500 - 15549 reserved for KKM;
    15550 - 15599 reserved for KKR; (and KXH)
    15600 - 15619 reserved for KKF; (parallel query)
    15620 - 15639 reserved for KKZ (snapshots);
    15640 - 15659 reserved for KKXA;
    15660 - 15669 reserved for KKJ (job queue);
    15670 - 15679 reserved for KKFS (parallel query)
    15680 - 15689 reserved for KKRT;
    15690 - 15699 reserved for other KK*;
    15700 - 15799 reserved for KXFP; (parallel query)
    15800 - 15809 reserved for KXFX; (parallel query)
    15810 - 15819 reserved for KXFQ; (parallel query)
    15820 - 15849 reserved for other KXF*; (parallel query)
    15850 - 15859 reserved for KSX*;
    15860 - 15999 reserved for other KX*;
** 16000 ** Loader "Layer"
==========================
    16000 - 16149 reserved for the direct loader;
    16150 - 16199 reserved for the c level call interface to direct loader;
    16200 - 16229 reserved for KQL;
    16230 - 16249 reserved for KQLR;
    16250 - 16299 reserved for KQA;
    16300 - 16399 reserved for KM*;
    16400 - 16449 reserved for KKB;
    16450 - 16499 reserved for KQLM;
    16500 - 16549 reserved for KQD;
    16550 - 16559 reserved for KQF;
    16600 - 16650 reserved for KQLS;
    16651 - 16700 reserved for KQLD;
    16701 - 16750 reserved for KQLB;
** 17000 ** Generic "Layer"
===========================
    17000 - 17089 reserved for KGL;
    17090 - 17099 reserved for KGE;
    17100 - 17199 reserved for KGH;
    17200 - 17249 reserved for KGLR/KGLRO;
    17250 - 17269 reserved for KGP;
    17270 - 17299 reserved for KGI;
    17300 - 17399 reserved for KGHX;
    17500 - 17624 reserved for I/O subsystem KG components (KGFD, KGFF, KGK)
    17625 - 17639 reserved for KGL3;
    17640 - 17989 reserved for other KG*;
    17990 - 17999 reserved for PL/SQL;
** 18000 **   K2 (2-phase commit),subdiv'd in k2.h: 18000 .. 18499
==================================================================
    18000 - 18999 reserved for K2*;
** 19000 ** Object Layer
========================
    19000 - 19999 reserved for KO*;
    20000 - 20399 reserved for bitmap index KDIB*;
    20400 - 20499 reserved for KKPO;;
    20500 - 20999 reserved for SMR;
** 21000 ** Replication Layer
=============================
    21000 - 21999 reserved for KN*;
** 23000 ** OLTP Layer
======================
    23000 - 23999 reserved for KW*;
    24000 - 24049 reserved for QOL;

oracle 18c依旧支持bbed

18c数据库版本

SQL> select BANNER from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production

编译18c的bbed

[oracle@localhost soft]$ make -f ./rdbms/lib/ins_rdbms.mk BBED=./bin/bbed ./bin/bbed
Linking BBED utility (bbed)
rm -f bin/bbed
/u02/soft/bin/orald -o bin/bbed -m64 -z noexecstack -Wl,--disable-new-dtags -L/u02/soft/rdbms/lib/
-L/u02/soft/lib/ -L/u02/soft/lib/stubs/  /u02/soft/lib/s0main.o /u02/soft/rdbms/lib/ssbbded.o
/u02/soft/rdbms/lib/sbbdpt.o `cat /u02/soft/lib/ldflags`    -lncrypt18 -lnsgr18 -lnzjs18 -ln18
-lnl18 -lngsmshd18 -ldbtools18 -lclntsh -lclntshcore  `cat /u02/soft/lib/ldflags`    -lncrypt18
-lnsgr18 -lnzjs18 -ln18 -lnl18 -lngsmshd18 -lnro18 `cat /u02/soft/lib/ldflags`    -lncrypt18
-lnsgr18 -lnzjs18 -ln18 -lnl18 -lngsmshd18 -lnnz18 -lzt18 -lztkg18 -lztkg18 -lclient18 -lnnetd18
-lcommon18 -lgeneric18 -lmm -lsnls18 -lnls18  -lcore18 -lsnls18 -lnls18 -lcore18 -lsnls18 -lnls18
-lxml18 -lcore18 -lunls18 -lsnls18 -lnls18 -lcore18 -lnls18 `cat /u02/soft/lib/ldflags`    -lncrypt18
-lnsgr18 -lnzjs18 -ln18 -lnl18 -lngsmshd18 -lnro18 `cat /u02/soft/lib/ldflags`    -lncrypt18 -lnsgr18
-lnzjs18 -ln18 -lnl18 -lngsmshd18 -lclient18 -lnnetd18  -lcommon18 -lgeneric18   -lsnls18 -lnls18
-lcore18 -lsnls18 -lnls18 -lcore18 -lsnls18 -lnls18 -lxml18 -lcore18 -lunls18 -lsnls18 -lnls18 -lcore18
-lnls18 -lclient18 -lnnetd18  -lcommon18 -lgeneric18 -lsnls18 -lnls18  -lcore18 -lsnls18 -lnls18
-lcore18 -lsnls18 -lnls18 -lxml18 -lcore18 -lunls18 -lsnls18 -lnls18 -lcore18 -lnls18
`cat /u02/soft/lib/sysliblist` -Wl,-rpath,/u02/soft/lib -lm    `cat /u02/soft/lib/sysliblist` -ldl -lm   -L/u02/soft/lib

启动bbed

[oracle@localhost soft]$ bbed
Password:
BBED: Release 2.0.0.0.0 - Limited Production on Fri Jun 15 17:06:28 2018
Copyright (c) 1982, 2018, Oracle and/or its affiliates.  All rights reserved.
************* !!! For Oracle Internal Use only !!! ***************
BBED> set filename '/u02/app/oracle/oradata/XFFDB/system01.dbf'
        FILENAME        /u02/app/oracle/oradata/XFFDB/system01.dbf
BBED> map
 File: /u02/app/oracle/oradata/XFFDB/system01.dbf (0)
 Block: 1                                     Dba:0x00000000
------------------------------------------------------------
 Data File Header
 struct kcvfh, 1272 bytes                   @0
 ub4 tailchk                                @8188
BBED> p kcvfh
struct kcvfh, 1272 bytes                    @0
   struct kcvfhbfh, 20 bytes                @0
      ub1 type_kcbh                         @0        0x0b
      ub1 frmt_kcbh                         @1        0xa2
      ub2 wrp2_kcbh                         @2        0x0000
      ub4 rdba_kcbh                         @4        0x00400001
      ub4 bas_kcbh                          @8        0x00000000
      ub2 wrp_kcbh                          @12       0x0000
      ub1 seq_kcbh                          @14       0x01
      ub1 flg_kcbh                          @15       0x04 (KCBHFCKV)
      ub2 chkval_kcbh                       @16       0x2df1
      ub2 spare3_kcbh                       @18       0x0000
   struct kcvfhhdr, 76 bytes                @20
      ub4 kccfhswv                          @20       0x00000000
      ub4 kccfhcvn                          @24       0x12000000<--已经为18c版本(16进制12=10进制18)
      ub4 kccfhdbi                          @28       0x386dba85
      text kccfhdbn[0]                      @32      X
      text kccfhdbn[1]                      @33      F
      text kccfhdbn[2]                      @34      F
      text kccfhdbn[3]                      @35      D
      text kccfhdbn[4]                      @36      B
      text kccfhdbn[5]                      @37
      text kccfhdbn[6]                      @38
      text kccfhdbn[7]                      @39
      ub4 kccfhcsq                          @40       0x000027af
      ub4 kccfhfsz                          @44       0x0001ae00
      s_blkz kccfhbsz                       @48       0x00
      ub2 kccfhfno                          @52       0x0001
      ub2 kccfhtyp                          @54       0x0003
      ub4 kccfhacid                         @56       0x00000000
      ub4 kccfhcks                          @60       0x00000000
      text kccfhtag[0]                      @64
      text kccfhtag[1]                      @65
      text kccfhtag[2]                      @66
      text kccfhtag[3]                      @67
      text kccfhtag[4]                      @68
      text kccfhtag[5]                      @69
      text kccfhtag[6]                      @70
      text kccfhtag[7]                      @71
      text kccfhtag[8]                      @72
      text kccfhtag[9]                      @73
      text kccfhtag[10]                     @74
      text kccfhtag[11]                     @75
      text kccfhtag[12]                     @76
      text kccfhtag[13]                     @77
      text kccfhtag[14]                     @78
      text kccfhtag[15]                     @79
      text kccfhtag[16]                     @80
      text kccfhtag[17]                     @81
      text kccfhtag[18]                     @82
      text kccfhtag[19]                     @83
      text kccfhtag[20]                     @84
      text kccfhtag[21]                     @85
      text kccfhtag[22]                     @86
      text kccfhtag[23]                     @87
      text kccfhtag[24]                     @88
      text kccfhtag[25]                     @89
      text kccfhtag[26]                     @90
      text kccfhtag[27]                     @91
      text kccfhtag[28]                     @92
      text kccfhtag[29]                     @93
      text kccfhtag[30]                     @94
      text kccfhtag[31]                     @95
   ub4 kcvfhrdb                             @96       0x00400208
   struct kcvfhcrs, 8 bytes                 @100
      ub4 kscnbas                           @100      0x00000007
      ub2 kscnwrp                           @104      0x8000
      ub2 kscnwrp2                          @106      0x0000
   ub4 kcvfhcrt                             @108      0x39aaed07
   ub4 kcvfhrlc                             @112      0x39c5e108
   struct kcvfhrls, 8 bytes                 @116
      ub4 kscnbas                           @116      0x0016ac11
      ub2 kscnwrp                           @120      0x8000
      ub2 kscnwrp2                          @122      0x0000
   ub4 kcvfhbti                             @124      0x00000000
   struct kcvfhbsc, 8 bytes                 @128
      ub4 kscnbas                           @128      0x00000000
      ub2 kscnwrp                           @132      0x0000
      ub2 kscnwrp2                          @134      0x0000
   ub2 kcvfhbth                             @136      0x0000
   ub2 kcvfhsta                             @138      0x2004 (KCVFHOFZ)
   struct kcvfhckp, 36 bytes                @484
      struct kcvcpscn, 8 bytes              @484
         ub4 kscnbas                        @484      0x001cb769
         ub2 kscnwrp                        @488      0x8000
         ub2 kscnwrp2                       @490      0x0000
      ub4 kcvcptim                          @492      0x3a585ab6
      ub2 kcvcpthr                          @496      0x0001
      union u, 12 bytes                     @500
         struct kcvcprba, 12 bytes          @500
            ub4 kcrbaseq                    @500      0x00000007
            ub4 kcrbabno                    @504      0x0000fce3
            ub2 kcrbabof                    @508      0x0010
      ub1 kcvcpetb[0]                       @512      0x02
      ub1 kcvcpetb[1]                       @513      0x00
      ub1 kcvcpetb[2]                       @514      0x00
      ub1 kcvcpetb[3]                       @515      0x00
      ub1 kcvcpetb[4]                       @516      0x00
      ub1 kcvcpetb[5]                       @517      0x00
      ub1 kcvcpetb[6]                       @518      0x00
      ub1 kcvcpetb[7]                       @519      0x00
   ub4 kcvfhcpc                             @140      0x0000003c
   ub4 kcvfhrts                             @144      0x3a5859f0
   ub4 kcvfhccc                             @148      0x0000003b
   struct kcvfhbcp, 36 bytes                @152
      struct kcvcpscn, 8 bytes              @152
         ub4 kscnbas                        @152      0x00000000
         ub2 kscnwrp                        @156      0x0000
         ub2 kscnwrp2                       @158      0x0000
      ub4 kcvcptim                          @160      0x00000000
      ub2 kcvcpthr                          @164      0x0000
      union u, 12 bytes                     @168
         struct kcvcprba, 12 bytes          @168
            ub4 kcrbaseq                    @168      0x00000000
            ub4 kcrbabno                    @172      0x00000000
            ub2 kcrbabof                    @176      0x0000
      ub1 kcvcpetb[0]                       @180      0x00
      ub1 kcvcpetb[1]                       @181      0x00
      ub1 kcvcpetb[2]                       @182      0x00
      ub1 kcvcpetb[3]                       @183      0x00
      ub1 kcvcpetb[4]                       @184      0x00
      ub1 kcvcpetb[5]                       @185      0x00
      ub1 kcvcpetb[6]                       @186      0x00
      ub1 kcvcpetb[7]                       @187      0x00
   ub4 kcvfhbhz                             @312      0x00000000
   struct kcvfhxcd, 16 bytes                @316
      ub4 space_kcvmxcd[0]                  @316      0x00000000
      ub4 space_kcvmxcd[1]                  @320      0x00000000
      ub4 space_kcvmxcd[2]                  @324      0x00000000
      ub4 space_kcvmxcd[3]                  @328      0x00000000
   sword kcvfhtsn                           @332      0
   ub2 kcvfhtln                             @336      0x0006
   text kcvfhtnm[0]                         @338     S
   text kcvfhtnm[1]                         @339     Y
   text kcvfhtnm[2]                         @340     S
   text kcvfhtnm[3]                         @341     T
   text kcvfhtnm[4]                         @342     E
   text kcvfhtnm[5]                         @343     M
   text kcvfhtnm[6]                         @344
   text kcvfhtnm[7]                         @345
   text kcvfhtnm[8]                         @346
   text kcvfhtnm[9]                         @347
   text kcvfhtnm[10]                        @348
   text kcvfhtnm[11]                        @349
   text kcvfhtnm[12]                        @350
   text kcvfhtnm[13]                        @351
   text kcvfhtnm[14]                        @352
   text kcvfhtnm[15]                        @353
   text kcvfhtnm[16]                        @354
   text kcvfhtnm[17]                        @355
   text kcvfhtnm[18]                        @356
   text kcvfhtnm[19]                        @357
   text kcvfhtnm[20]                        @358
   text kcvfhtnm[21]                        @359
   text kcvfhtnm[22]                        @360
   text kcvfhtnm[23]                        @361
   text kcvfhtnm[24]                        @362
   text kcvfhtnm[25]                        @363
   text kcvfhtnm[26]                        @364
   text kcvfhtnm[27]                        @365
   text kcvfhtnm[28]                        @366
   text kcvfhtnm[29]                        @367
   ub4 kcvfhrfn                             @368      0x00000001
   struct kcvfhrfs, 8 bytes                 @372
      ub4 kscnbas                           @372      0x00000000
      ub2 kscnwrp                           @376      0x0000
      ub2 kscnwrp2                          @378      0x0000
   ub4 kcvfhrft                             @380      0x00000000
   struct kcvfhafs, 8 bytes                 @384
      ub4 kscnbas                           @384      0x00000000
      ub2 kscnwrp                           @388      0x0000
      ub2 kscnwrp2                          @390      0x0000
   ub4 kcvfhbbc                             @392      0x00000000
   ub4 kcvfhncb                             @396      0x00000000
   ub4 kcvfhmcb                             @400      0x00000000
   ub4 kcvfhlcb                             @404      0x00000000
   ub4 kcvfhbcs                             @408      0x00000000
   ub2 kcvfhofb                             @412      0x000a
   ub2 kcvfhnfb                             @414      0x000a
   ub4 kcvfhprc                             @416      0x39aaecfc
   struct kcvfhprs, 8 bytes                 @420
      ub4 kscnbas                           @420      0x00000001
      ub2 kscnwrp                           @424      0x0000
      ub2 kscnwrp2                          @426      0x0000
   struct kcvfhprfs, 8 bytes                @428
      ub4 kscnbas                           @428      0x00000000
      ub2 kscnwrp                           @432      0x0000
      ub2 kscnwrp2                          @434      0x0000
   ub4 kcvfhtrt                             @444      0x00000000
BBED>

这里证明bbed依旧能够在Oracle 18c的数据库版本中工作,oracle 12.2依旧支持bbed