标签云
asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-00742 ORA-01110 ORA-01555 ORA-01578 ORA-01595 ORA-08103 ORA-600 2131 ORA-600 2662 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 Oracle 恢复 ORACLE恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (103)
- 数据库 (1,770)
- DB2 (22)
- MySQL (77)
- Oracle (1,611)
- Data Guard (52)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (166)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (69)
- Oracle Bug (8)
- Oracle RAC (54)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (29)
- Oracle备份恢复 (592)
- Oracle安装升级 (98)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (86)
- PostgreSQL (30)
- pdu工具 (6)
- PostgreSQL恢复 (9)
- SQL Server (32)
- SQL Server恢复 (13)
- TimesTen (7)
- 达梦数据库 (3)
- 达梦恢复 (1)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (39)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (22)
-
最近发表
- Oracle 19c 202507补丁(RUs+OJVM)-19.28
- 2025年的Oracle 8.0.5数据库恢复
- ORA-600 kokiasg1故障分析(obj$中核心字典序列全部被恶意删除)
- ORA-00756 ORA-10567故障数据0丢失恢复
- 数据库文件变成32k故障恢复
- tcp连接过多导致监听TNS-12532 TNS-12560 TNS-00502错误
- 文件系统格式化MySQL数据库恢复
- .sstop勒索加密数据库恢复
- 解决一次硬件恢复之后数据文件0kb的故障恢复case
- Error in invoking target ‘libasmclntsh19.ohso libasmperl19.ohso client_sharedlib’问题处理
- ORA-01171: datafile N going offline due to error advancing checkpoint
- linux环境oracle数据库被文件系统勒索加密为.babyk扩展名溯源
- ORA-600 ksvworkmsgalloc: bad reaper
- ORA-600 krccfl_chunk故障处理
- Oracle Recovery Tools恢复案例总结—202505
- ORA-600 kddummy_blkchk 数据库循环重启
- 记录一次asm disk加入到vg通过恢复直接open库的案例
- CHECKDB 发现了 N 个分配错误和 M 个一致性错误
- 达梦数据库dm.ctl文件异常恢复
- Oracle Recovery Tools修复ORA-00742、ORA-600 ktbair2: illegal inheritance故障
年归档:2016
ORA-28040: No matching authentication protocol
电脑上面安装了三个版本的数据库10.2.0.3,11.2.0.1,12.1.0.2版本,使用他们分别尝试连接另外一个12.2.0.3的环境数据库发现只有12.1的版本客户端可以连接到12.2上面,其他版本报ORA-28040错误
分别测试连接,报ORA-28040错误
C:\Users\XIFENFEI>sqlplus sys/oracle@192.168.137.121/orcl12c2 as sysdba SQL*Plus: Release 12.1.0.2.0 Production on 星期三 7月 20 00:03:01 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. 连接到: Oracle Database 12c Enterprise Edition Release 12.2.0.0.3 - 64bit Production SQL> SQL> C:\Users\XIFENFEI>D:\app\FAL\product\11.2.0\dbhome_1\bin\sqlplus sys/oracle@192.168.137.121/orcl12c2 as sysdba SQL*Plus: Release 11.2.0.1.0 Production on 星期三 7月 20 00:10:33 2016 Copyright (c) 1982, 2010, Oracle. All rights reserved. ERROR: ORA-28040: No matching authentication protocol C:\Users\XIFENFEI>D:\app\product\10.2.0\db_1\bin\sqlplus sys/oracle@192.168.137.121/orcl12c2 as sysdba SQL*Plus: Release 10.2.0.3.0 - Production on 星期三 7月 20 00:09:30 2016 Copyright (c) 1982, 2006, Oracle. All Rights Reserved. ERROR: ORA-28040: 没有匹配的验证协议 请输入用户名:
ORA-28040错误说明
28040, 0000, "No matching authentication protocol" // *Cause: There was no acceptable authentication protocol for // either client or server. // *Action: The administrator should set the values of the // SQLNET.ALLOWED_LOGON_VERSION_SERVER and // SQLNET.ALLOWED_LOGON_VERSION_CLIENT parameters, on both the // client and on the server, to values that match the minimum // version software supported in the system. // This error is also raised when the client is authenticating to // a user account which was created without a verifier suitable for // the client software version. In this situation, that account's // password must be reset, in order for the required verifier to // be generated and allow authentication to proceed successfully.
解决方法
在服务端的sqlnet.ora文件中加入上如下信息,然后重启监听
[oracle@ora1221 admin]$ vi sqlnet.ora SQLNET.ALLOWED_LOGON_VERSION_CLIENT=8 SQLNET.ALLOWED_LOGON_VERSION_SERVER=8 [oracle@ora1221 admin]$ lsnrctl stop LSNRCTL for Linux: Version 12.2.0.0.3 - Production on 17-JUN-2016 06:36:13 Copyright (c) 1991, 2016, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) The command completed successfully [oracle@ora1221 admin]$ lsnrctl start LSNRCTL for Linux: Version 12.2.0.0.3 - Production on 17-JUN-2016 06:36:17 Copyright (c) 1991, 2016, Oracle. All rights reserved. Starting /u01/app/oracle/product/12.2.0/db_2/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 12.2.0.0.3 - Production Log messages written to /u01/app/oracle/diag/tnslsnr/ora1221/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora1221)(PORT=1521))) Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 12.2.0.0.3 - Production Start Date 17-JUN-2016 06:36:17 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Log File /u01/app/oracle/diag/tnslsnr/ora1221/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora1221)(PORT=1521))) The listener supports no services The command completed successfully
sqlnet中参数说明
SQLNET.ALLOWED_LOGON_VERSION_SERVER 是服务端参数对于jdbc和oci都生效,该参数不是只具体数据库版本,而是指授权协议的版本
SQLNET.ALLOWED_LOGON_VERSION_CLIENT 是指作为客户端连接其他实例的时候生效,也是只授权协议版本,而且该参数只对oci生效,jdbc 需要通过在代码中类似实现
OracleDataSource ods = new OracleDataSource(); ods.setURL(jdbcURL); ods.setUser("scott"); ods.setPassword("tiger"); Properties props = new Properties(); props.put("oracle.jdbc.allowedLogonVersion", 12); ods.setConnectionProperties(props); Connection con = ods.getConnection();
上述两个参数可以填写值
12a for Oracle Database 12c release 12.1.0.2 or later authentication protocols (strongest protection)
12 for the critical patch updates CPUOct2012 and later Oracle Database 11g authentication protocols (recommended)
11 for Oracle Database 11g authentication protocols (default)
10 for Oracle Database 10g authentication protocols
9 for Oracle9i Database authentication protocol
8 for Oracle8i Database authentication protocol
具体描述请见:http://docs.oracle.com/database/121/NETRF/sqlnet.htm#NETRF2010
再次测试连接
C:\Users\XIFENFEI>D:\app\FAL\product\11.2.0\dbhome_1\bin\sqlplus sys/oracle@192.168.137.121/orcl12c2 as sysdba SQL*Plus: Release 11.2.0.1.0 Production on 星期三 7月 20 00:20:21 2016 Copyright (c) 1982, 2010, Oracle. All rights reserved. 连接到: Oracle Database 12c Enterprise Edition Release 12.2.0.0.3 - 64bit Production SQL> exit 从 Oracle Database 12c Enterprise Edition Release 12.2.0.0.3 - 64bit Production 断开 C:\Users\XIFENFEI>D:\app\product\10.2.0\db_1\bin\sqlplus sys/oracle@192.168.137.121/orcl12c2 as sysdba SQL*Plus: Release 10.2.0.3.0 - Production on 星期三 7月 20 00:20:28 2016 Copyright (c) 1982, 2006, Oracle. All Rights Reserved. 连接到: Oracle Database 12c Enterprise Edition Release 12.2.0.0.3 - 64bit Production SQL> C:\Users\XIFENFEI>sqlplus sys/oracle@192.168.137.121/orcl12c2 as sysdba SQL*Plus: Release 12.1.0.2.0 Production on 星期三 7月 20 00:20:55 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. 连接到: Oracle Database 12c Enterprise Edition Release 12.2.0.0.3 - 64bit Production
该问题在jdbc中也表现明显,建议参考Starting With Oracle JDBC Drivers (文档 ID 401934.1)和Client / Server Interoperability Support Matrix for Different Oracle Versions (文档 ID 207303.1)选择完全兼容性的客户端和jdbc版本,另外可以关注相关文章:
ORA-28040 and SQLNET.ALLOWED_LOGON_VERSION_CLIENT for JDBC Thin Clients (文档 ID 2000339.1)
ORA-28040 Using JDBC Connection to 12c Database (文档 ID 2111118.1)
JDBC Version 10.2.0.4 Produces ORA-28040 Connecting To Oracle 12c (12.1.0.2) Database (文档 ID 2023160.1)
ORA-28040 and SQLNET.ALLOWED_LOGON_VERSION_CLIENT for JDBC Thin Clients (文档 ID 2000339.1)
Oracle 12c undo异常处理—root pdb undo异常
在12c pdb环境中如果root pdb的undo文件异常,数据库该如何恢复呢?这篇文章模拟undo丢失的情况下进行恢复
模拟环境
三个会话,其中第一个会话对pdb1中的表进行操作,并且有事务未提交,第二个会话对pdb2进行操作,也未提交事务;第三个会话直接abort库,模拟突然库异常,然后删除root pdb下面的undo文件
--会话1 [oracle@ora1221 oradata]$ sqlplus / as sysdba SQL*Plus: Release 12.2.0.0.3 Production on Thu Jun 16 22:24:20 2016 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 2516582400 bytes Fixed Size 8260048 bytes Variable Size 671090224 bytes Database Buffers 1828716544 bytes Redo Buffers 8515584 bytes Database mounted. Database opened. SQL> SQL> SQL> SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB1 MOUNTED 4 PDB2 MOUNTED SQL> alter session set container=pdb1; Session altered. SQL> alter database open; Database altered. SQL> create user chf identified by oracle; User created. SQL> grant dba to chf; Grant succeeded. SQL> create table chf.t_xifenfei_p1 as 2 select * from dba_objects; Table created. SQL> insert into chf.t_xifenfei_p1 2 select * from dba_objects; 72427 rows created. SQL> select count(*) from chf.t_xifenfei_p1; COUNT(*) ---------- 144853 --会话2 [oracle@ora1221 ~]$ ss SQL*Plus: Release 12.2.0.0.3 Production on Thu Jun 16 22:34:01 2016 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.0.3 - 64bit Production SQL> alter session set container=pdb2; Session altered. SQL> alter database open; Database altered. SQL> create user chf identified by oracle; User created. SQL> grant dba to chf; Grant succeeded. SQL> create table chf.t_xifenfei_p2 2 as select * from dba_objects; Table created. SQL> delete from chf.t_xifenfei_p2; 72426 rows deleted. SQL> select count(*) from chf.t_xifenfei_p2; COUNT(*) ---------- 0 --会话3 [oracle@ora1221 ~]$ ss SQL*Plus: Release 12.2.0.0.3 Production on Thu Jun 16 22:36:16 2016 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.0.3 - 64bit Production SQL> shutdown abort ORACLE instance shut down. --删除cdb undo文件 [oracle@ora1221 orcl12c2]$ ls -ltr total 2040912 drwxr-x---. 2 oracle oinstall 4096 Jun 16 18:26 pdbseed drwxr-x---. 2 oracle oinstall 4096 Jun 16 18:27 pdb2 drwxr-x---. 2 oracle oinstall 4096 Jun 16 18:28 pdb1 -rw-r-----. 1 oracle oinstall 209715712 Jun 16 22:24 redo03.log -rw-r-----. 1 oracle oinstall 5251072 Jun 16 22:24 users01.dbf -rw-r-----. 1 oracle oinstall 34611200 Jun 16 22:25 temp01.dbf -rw-r-----. 1 oracle oinstall 849354752 Jun 16 22:35 system01.dbf -rw-r-----. 1 oracle oinstall 73408512 Jun 16 22:35 undotbs01.dbf -rw-r-----. 1 oracle oinstall 492838912 Jun 16 22:35 sysaux01.dbf -rw-r-----. 1 oracle oinstall 209715712 Jun 16 22:36 redo02.log -rw-r-----. 1 oracle oinstall 209715712 Jun 16 22:36 redo01.log -rw-r-----. 1 oracle oinstall 18726912 Jun 16 22:36 control02.ctl -rw-r-----. 1 oracle oinstall 18726912 Jun 16 22:36 control01.ctl [oracle@ora1221 orcl12c2]$ rm undotbs01.dbf [oracle@ora1221 orcl12c2]$ ls -l un* ls: cannot access un*: No such file or directory
启动数据库
由于有undo文件丢失数据库在启动的时候检测到文件丢失(ORA-01157),无法open,offline文件后依旧无法启动(ORA-00376)
[oracle@ora1221 orcl12c2]$ ss SQL*Plus: Release 12.2.0.0.3 Production on Thu Jun 16 22:51:21 2016 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to an idle instance. SQL> startup pfile='/tmp/pfile' ORACLE instance started. Total System Global Area 2516582400 bytes Fixed Size 8260048 bytes Variable Size 671090224 bytes Database Buffers 1828716544 bytes Redo Buffers 8515584 bytes Database mounted. ORA-01157: cannot identify/lock data file 4 - see DBWR trace file ORA-01110: data file 4: '/u01/app/oracle/oradata/orcl12c2/undotbs01.dbf' offline 数据文件 SQL> alter database datafile 4 offline ; alter database datafile 4 offline * ERROR at line 1: ORA-01145: offline immediate disallowed unless media recovery enabled SQL> alter database datafile 4 offline drop; Database altered. SQL> alter database open; alter database open * ERROR at line 1: ORA-00603: ORACLE server session terminated by fatal error ORA-01092: ORACLE instance terminated. Disconnection forced ORA-00604: error occurred at recursive SQL level 1 ORA-00376: file 4 cannot be read at this time ORA-01110: data file 4: '/u01/app/oracle/oradata/orcl12c2/undotbs01.dbf' Process ID: 7547 Session ID: 16 Serial number: 56234
把undo_management修改为manual后启动库,依旧报ORA-00376
SQL> startup pfile='/tmp/pfile' mount; ORACLE instance started. Total System Global Area 2516582400 bytes Fixed Size 8260048 bytes Variable Size 671090224 bytes Database Buffers 1828716544 bytes Redo Buffers 8515584 bytes Database mounted. SQL> show parameter undo_management; NAME TYPE ------------------------------------ ---------------------- VALUE ------------------------------ undo_management string MANUAL SQL> alter database open; alter database open * ERROR at line 1: ORA-00603: ORACLE server session terminated by fatal error ORA-01092: ORACLE instance terminated. Disconnection forced ORA-00604: error occurred at recursive SQL level 1 ORA-00376: file 4 cannot be read at this time ORA-01110: data file 4: '/u01/app/oracle/oradata/orcl12c2/undotbs01.dbf' Process ID: 7981 Session ID: 16 Serial number: 56572
设置_corrupted_rollback_segments参数
SQL> startup pfile='/tmp/pfile' mount; ORACLE instance started. Total System Global Area 2516582400 bytes Fixed Size 8260048 bytes Variable Size 671090224 bytes Database Buffers 1828716544 bytes Redo Buffers 8515584 bytes Database mounted. SQL> show parameter _corrupted_rollback_segments; NAME TYPE ------------------------------------ ---------------------- VALUE ------------------------------ _corrupted_rollback_segments string _SYSSMU1_3200770482$, _SYSSMU2 _3597554035$, _SYSSMU3_2898427 493$, _SYSSMU4_670955920$, _SY SSMU5_1233449977$, _SYSSMU6_32 67641983$, _SYSSMU7_2822479342 $, _SYSSMU8_1645196706$, _SYSS MU9_3032014485$, _SYSSMU10_474 465626$ SQL> alter database open; Database altered.
通过设置_corrupted_rollback_segments参数之后,数据库正常启动,下面继续其他pdb
open pdb1
SQL> alter session set container=pdb1; Session altered. SQL> alter database open; Database altered. SQL> select count(*) from chf.t_xifenfei_p1; COUNT(*) ---------- 72426
pdb2 open
SQL> alter session set container=pdb2; Session altered. SQL> alter database open; Database altered. SQL> select count(*) from chf.t_xifenfei_p2; COUNT(*) ---------- 72426
至此数据库基本上恢复完成,但是看到的pdb里面两个测试表的数据和我们预测的有一定的偏差,看来cdb中的undo和pdb中的undo还是有一定的依赖关系.同时也说明了root的undo异常对于其他pdb的open最少在恢复上面影响不大.下一篇测试业务pdb中undo异常处理
Oracle 12c redo 丢失恢复
模拟redo丢失
对数据库的一个pdb模拟事务操作,然后abort库,并且删除所有redo,模拟生产环境redo丢失的case
[oracle@ora1221 oradata]$ ss SQL*Plus: Release 12.2.0.0.3 Production on Wed Jun 15 10:13:20 2016 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 2516582400 bytes Fixed Size 8260048 bytes Variable Size 671090224 bytes Database Buffers 1828716544 bytes Redo Buffers 8515584 bytes Database mounted. Database opened. SQL> SQL> SQL> set pages 100 SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB1 MOUNTED 4 PDB2 MOUNTED SQL> select con_id,file#,checkpoint_change# from v$datafile_header order by 1; CON_ID FILE# CHECKPOINT_CHANGE# ---------- ---------- ------------------ 1 1 1500157 1 3 1500157 1 4 1500157 1 7 1500157 2 5 1371280 2 6 1371280 2 8 1371280 3 9 1499902 3 12 1499902 3 11 1499902 3 10 1499902 4 15 1499903 4 14 1499903 4 13 1499903 4 16 1499903 15 rows selected. SQL> alter PLUGGABLE database pdb1 open; Pluggable database altered. SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB1 READ WRITE NO 4 PDB2 MOUNTED SQL> alter session set container=pdb1; Session altered. SQL> create user chf identified by oracle; User created. SQL> grant dba to chf; Grant succeeded. SQL> create table chf.t_pdb1_xifenfei as select * from dba_objects; Table created. SQL> delete from chf.t_pdb1_xifenfei; 72426 rows deleted. --另外一个节点 [oracle@ora1221 ~]$ ss SQL*Plus: Release 12.2.0.0.3 Production on Wed Jun 15 10:19:21 2016 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.0.3 - 64bit Production SQL> shutdown abort ORACLE instance shut down. [oracle@ora1221 orcl12c2]$ ls redo* redo01.log redo02.log redo03.log [oracle@ora1221 orcl12c2]$ rm redo0* [oracle@ora1221 orcl12c2]$ ls -l redo* ls: cannot access redo*: No such file or directory
尝试启动数据库
[oracle@ora1221 orcl12c2]$ ss SQL*Plus: Release 12.2.0.0.3 Production on Wed Jun 15 10:26:20 2016 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to an idle instance. SQL> startup mount; ORACLE instance started. Total System Global Area 2516582400 bytes Fixed Size 8260048 bytes Variable Size 671090224 bytes Database Buffers 1828716544 bytes Redo Buffers 8515584 bytes Database mounted. SQL> alter database open; alter database open * ERROR at line 1: ORA-00313: open failed for members of log group 1 of thread 1 ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/orcl12c2/redo01.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 7
使用隐含参数启动
----pfile里面增加 _allow_error_simulation=TRUE _allow_resetlogs_corruption=true ~ SQL> shutdown immediate; ORA-01109: database not open Database dismounted. ORACLE instance shut down SQL> startup pfile='/tmp/pfile' mount ORACLE instance started. Total System Global Area 2516582400 bytes Fixed Size 8260048 bytes Variable Size 671090224 bytes Database Buffers 1828716544 bytes Redo Buffers 8515584 bytes Database mounted. SQL> alter database open resetlogs; alter database open resetlogs * ERROR at line 1: ORA-00603: ORACLE server session terminated by fatal error ORA-01092: ORACLE instance terminated. Disconnection forced ORA-00600: internal error code, arguments: [kcbzib_kcrsds_1], [], [], [], [], [], [], [], [], [], [], [] Process ID: 36797 Session ID: 16 Serial number: 24277
继续重启库
ORA-600 kcbzib_kcrsds_1错误尝试重启数据库,如果不行,考虑使用bbed修改文件头信息
SQL> startup mount pfile='/tmp/pfile' ORACLE instance started. Total System Global Area 2516582400 bytes Fixed Size 8260048 bytes Variable Size 671090224 bytes Database Buffers 1828716544 bytes Redo Buffers 8515584 bytes Database mounted. SQL> recover database until cancel; ORA-00283: recovery session canceled due to errors ORA-16433: The database or pluggable database must be opened in read/write mode. SQL> alter database backup controlfile to trace as '/tmp/ctl'; alter database backup controlfile to trace as '/tmp/ctl' * ERROR at line 1: ORA-16433: The database or pluggable database must be opened in read/write mode.
重建控制文件
SQL> startup nomount pfile='/tmp/pfile' ORACLE instance started. Total System Global Area 2516582400 bytes Fixed Size 8260048 bytes Variable Size 671090224 bytes Database Buffers 1828716544 bytes Redo Buffers 8515584 bytes SQL> CREATE CONTROLFILE REUSE DATABASE "orcl12c2" RESETLOGS NOARCHIVELOG 2 MAXLOGFILES 50 3 MAXLOGMEMBERS 5 4 MAXDATAFILES 100 5 MAXINSTANCES 1 6 MAXLOGHISTORY 226 7 LOGFILE 8 GROUP 1 '/u01/app/oracle/oradata/orcl12c2/redo01.log' SIZE 200M, 9 GROUP 2 '/u01/app/oracle/oradata/orcl12c2/redo02.log' SIZE 200M, 10 GROUP 3 '/u01/app/oracle/oradata/orcl12c2/redo03.log' SIZE 200M 11 DATAFILE 12 '/u01/app/oracle/oradata/orcl12c2/system01.dbf', 13 '/u01/app/oracle/oradata/orcl12c2/sysaux01.dbf', 14 '/u01/app/oracle/oradata/orcl12c2/undotbs01.dbf', 15 '/u01/app/oracle/oradata/orcl12c2/pdbseed/system01.dbf', 16 '/u01/app/oracle/oradata/orcl12c2/pdbseed/sysaux01.dbf', 17 '/u01/app/oracle/oradata/orcl12c2/users01.dbf', 18 '/u01/app/oracle/oradata/orcl12c2/pdbseed/undotbs01.dbf', 19 '/u01/app/oracle/oradata/orcl12c2/pdb1/system01.dbf', 20 '/u01/app/oracle/oradata/orcl12c2/pdb1/sysaux01.dbf', 21 '/u01/app/oracle/oradata/orcl12c2/pdb1/undotbs01.dbf', 22 '/u01/app/oracle/oradata/orcl12c2/pdb1/users01.dbf', 23 '/u01/app/oracle/oradata/orcl12c2/pdb2/system01.dbf', 24 '/u01/app/oracle/oradata/orcl12c2/pdb2/sysaux01.dbf', 25 '/u01/app/oracle/oradata/orcl12c2/pdb2/undotbs01.dbf', 26 '/u01/app/oracle/oradata/orcl12c2/pdb2/users01.dbf' 27 CHARACTER SET AL32UTF8 28 ; Control file created. SQL> recover database until cancel; ORA-00283: recovery session canceled due to errors ORA-01610: recovery using the BACKUP CONTROLFILE option must be done SQL> recover database until cancel using backup controlfile; ORA-00279: change 1500161 generated at 06/15/2016 10:40:42 needed for thread 1 ORA-00289: suggestion : /u01/app/oracle/product/12.2.0/db_2/dbs/arch1_1_914582438.dbf ORA-00280: change 1500161 for thread 1 is in sequence #1 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} /u01/app/oracle/oradata/orcl12c2/redo01.log Log applied. Media recovery complete. SQL> alter database open resetlogs; Database altered. 1 <strong>open过程alert日志</strong> 1 <strong>open pdb1</strong> 1 SQL> alter PLUGGABLE database pdb1 open; Pluggable database altered.
pdb1 open alert日志
2016-06-15T11:13:39.423057+08:00 alter PLUGGABLE database pdb1 open PDB1(3):Autotune of undo retention is turned on. 2016-06-15T11:13:39.495559+08:00 PDB1(3):Endian type of dictionary set to little PDB1(3):[40547] Successfully onlined Undo Tablespace 2. PDB1(3):Undo initialization finished serial:0 start:371149831 end:371149872 diff:41 ms (0.0 seconds) PDB1(3):Database Characterset for PDB1 is AL32UTF8 PDB1(3):********************************************************************* PDB1(3):WARNING: The following temporary tablespaces in container(PDB1) PDB1(3): contain no files. PDB1(3): This condition can occur when a backup controlfile has PDB1(3): been restored. It may be necessary to add files to these PDB1(3): tablespaces. That can be done using the SQL statement: PDB1(3): PDB1(3): ALTER TABLESPACE <tablespace_name> ADD TEMPFILE PDB1(3): PDB1(3): Alternatively, if these temporary tablespaces are no longer PDB1(3): needed, then they can be dropped. PDB1(3): Empty temporary tablespace: TEMP PDB1(3):********************************************************************* PDB1(3):Opatch validation is skipped for PDB PDB1 (con_id=0) PDB1(3):Opening pdb with no Resource Manager plan active Pluggable database PDB1 opened read write Completed: alter PLUGGABLE database pdb1 open
open pdb2
SQL> alter PLUGGABLE database pdb2 open; alter PLUGGABLE database pdb2 open * ERROR at line 1: ORA-00600: internal error code, arguments: [17090], [], [], [], [], [], [], [], [], [], [], []
分析alert日志和trace文件
--alert日志部分 PDB1(3):alter PLUGGABLE database pdb2 open PDB1(3):ORA-65118 signalled during: alter PLUGGABLE database pdb2 open... 2016-06-15T11:28:57.439963+08:00 PDB1(3):Unified Audit: Audit record write to table failed due to ORA-25153. Writing the audit record to OS spillover file. Please grep in the trace files for ORA-25153 for more diagnostic information. Errors in file /u01/app/oracle/diag/rdbms/orcl12c2/orcl12c2/trace/orcl12c2_ora_40547.trc (incident=29073) (PDBNAME=PDB1): ORA-00600: internal error code, arguments: [17090], [], [], [], [], [], [], [], [], [], [], [] PDB1(3):Incident details in: /u01/app/oracle/diag/rdbms/orcl12c2/orcl12c2/incident/incdir_29073/orcl12c2_ora_40547_i29073.trc PDB1(3):***************************************************************** PDB1(3):An internal routine has requested a dump of selected redo. PDB1(3):This usually happens following a specific internal error, when PDB1(3):analysis of the redo logs will help Oracle Support with the PDB1(3):diagnosis. PDB1(3):It is recommended that you retain all the redo logs generated (by PDB1(3):all the instances) during the past 12 hours, in case additional PDB1(3):redo dumps are required to help with the diagnosis. PDB1(3):***************************************************************** 2016-06-15T11:28:59.123041+08:00 PDB1(3):Use ADRCI or Support Workbench to package the incident. See Note 411.1 at My Oracle Support for error and packaging details. 2016-06-15T11:28:59.945667+08:00 Dumping diagnostic data in directory=[cdmp_20160615112859], requested by (instance=1, osid=40547), summary=[incident=29073]. 2016-06-15T11:35:59.987419+08:00 PDB1(3): alter PLUGGABLE database pdb2 open PDB1(3):ORA-65118 signalled during: alter PLUGGABLE database pdb2 open... --trace部分 PARSING IN CURSOR #0x7f051a3d7650 len=118 dep=1 uid=0 oct=3 lid=0 tim=372490287736 hv=1128335472 ad='0x6ca82f00' sqlid='gu930gd1n223h' select tablespace_name, tablespace_size, allocated_space, free_space, con_id from cdb_temp_free_space order by con_id END OF STMT EXEC #0x7f051a3d7650:c=0,e=144,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=2538033465,tim=372490287732 FETCH #0x7f051a3d7650:c=0,e=290,p=0,cr=14,cu=0,mis=0,r=0,dep=1,og=4,plh=2538033465,tim=372490288109 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 52 FileOperation=2 fileno=0 filetype=36 obj#=402 tim=372490288373 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 17 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490288577 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 3 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490288655 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 690 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490289365 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 6 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490289470 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 445 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490289934 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 3 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490289983 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 375 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490290374 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 6 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490290453 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 367 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490290839 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 3 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490290882 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 355 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490291252 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 4 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490291298 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 276 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490291590 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 1 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490291614 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 256 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490291879 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 2 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490291903 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 261 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490292172 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 30 FileOperation=3 fileno=0 filetype=36 obj#=402 tim=372490292225 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 934 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490293171 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 3 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490293208 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 245 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490293465 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 262 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490293755 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 1 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490293780 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 250 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490294039 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 256 FileOperation=8 fileno=1 filetype=36 obj#=402 tim=372490294323 WAIT #0x7f051bd5f870: nam='Disk file operations I/O' ela= 8 FileOperation=5 fileno=0 filetype=36 obj#=402 tim=372490294359 2016-06-15T11:36:00.055196+08:00 Incident 29074 created, dump file: /u01/app/oracle/diag/rdbms/orcl12c2/orcl12c2/incident/incdir_29074/orcl12c2_ora_40547_i29074.trc ORA-00600: internal error code, arguments: [17090], [], [], [], [], [], [], [], [], [], [], []
从中可以判断出来是由于CDB$ROOT的未增加tempfile导致
SQL> alter tablespace temp add tempfile '/u01/app/oracle/oradata/orcl12c2/temp01.dbf' reuse; Tablespace altered. SQL> alter PLUGGABLE database pdb2 open; Pluggable database altered.
查看数据库恢复情况
SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB1 READ WRITE NO 4 PDB2 READ WRITE NO SQL> select con_id,file#,checkpoint_change#,resetlogs_change# from v$datafile_header; CON_ID FILE# CHECKPOINT_CHANGE# RESETLOGS_CHANGE# ---------- ---------- ------------------ ----------------- 1 1 2500167 1500164 1 3 2500167 1500164 1 4 2500167 1500164 2 5 1371280 1341067 2 6 1371280 1341067 1 7 2500167 1500164 2 8 1371280 1341067 3 9 2501017 1500164 3 10 2501017 1500164 3 11 2501017 1500164 3 12 2501017 1500164 4 13 2502748 1500164 4 14 2502748 1500164 4 15 2502748 1500164 4 16 2502748 1500164 15 rows selected.
至此基本上测试完成在在cdb环境中丢失redo的恢复。在生产中,需要把temp加全,并且建议重建数据库
发表在 ORACLE 12C, Oracle备份恢复
标签为 kcbzib_kcrsds_1, ORA-16433, ORA-600 17090, ORA-600 kcbzib_kcrsds_1, redo异常
评论关闭