月归档:二月 2019

ORA-07217: sltln: environment variable cannot be evaluated.

dg备库mount报ORA-07217
在一次搭建dg过程中,备库无法mount,报ORA-07217: sltln: environment variable cannot be evaluated.错误

[oracle@localhost orcl]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 13 22:27:31 2019

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-07217: sltln: environment variable cannot be evaluated.

alert日志报错

Set as converted control file due to db_unique_name mismatch
Changing di2dbun from ORCL to ORCLDG
ORA-7217 signalled during: alter database mount...
Wed Feb 13 20:33:41 2019
alter database mount
ORA-7217 signalled during: alter database mount...
Wed Feb 13 20:36:11 2019
alter database mount
ORA-7217 signalled during: alter database mount...

根据mos排查
根据mos ORA-07217: sltln: environment variable cannot be evaluated (Doc ID 2487898.1)描述排查,确认不是该问题

SQL> show parameter diag;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
diagnostic_dest                      string      /u01/app/oracle

[oracle@dg:/opt/app/oracle/arch]$env|grep ORA
ORACLE_SID=orcl
ORACLE_BASE=/opt/app/oracle
ORACLE_TERM=xterm
ORACLE_HOME=/opt/app/oracle/product/11.2.0/db_1

检查发现数据文件异常

SQL> select name from v$datafile where name like '%$%';

NAME
------------------------------------------------------
+DATA/orcl/datafile/ts_his$emr01
+DATA/orcl/datafile/ts_his$emr02

通过分析,注释掉db_file_name_convert=’+DATA/orcl/datafile/’,’/u01/app/oradata/orcl/’即可正常mount成功,数据文件命令一定要规范(不要有特殊符号),不然给后人和自己留下巨坑

发表在 ORA-xxxxx | 标签为 | 评论关闭

ORA-01205: not a data file – type number in header is 0

数据库open成功,但是有undo文件异常报ORA-00376

Mon Feb 04 07:43:18 中国标准时间 2019
Completed: alter database open
Mon Feb 04 07:43:18 中国标准时间 2019
ALTER SYSTEM disable restricted session;
Mon Feb 04 07:43:19 中国标准时间 2019
ORA-376 encountered when generating server alert SMG-4120
Mon Feb 04 07:43:19 中国标准时间 2019
Errors in file d:\oracle\xff\xff\background\xff_cjq0_5428.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-00376: file 2 cannot be read at this time
ORA-01110: data file 2: 'K:\ORACLE\SAP\SAPDATA1\UNDO_1\UNDO.DATA1'

检查文件状态
1
wrong-file-type


恢复之后报错
数据库无法正常open,提示ORA-07445 _intel_fast_memset.A和ORA-01205错误

Wed Feb 06 12:51:01 中国标准时间 2019
ALTER DATABASE RECOVER  datafile 2  
Wed Feb 06 12:51:01 中国标准时间 2019
Media Recovery Start
Read of rdba: 0x00800001 (file 2, block 1) failed with ORA-01205.
Trying reread from disk.
Reread of rdba: 0x00800001 (file 2, block 1) failed with ORA-01205
Wed Feb 06 12:51:01 中国标准时间 2019
Errors in file d:\oracle\xff\xff\usertrace\xff_ora_6988.trc:
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [_intel_fast_memset.A+44] 
                                    [PC:0x356EA7C] [ADDR:0x7F20000] [UNABLE_TO_WRITE] []
ORA-01205: not a data file - type number in header is 0

Wed Feb 06 12:52:14 中国标准时间 2019
alter database open
Wed Feb 06 12:52:15 中国标准时间 2019
LGWR: STARTING ARCH PROCESSES
ARC0 started with pid=17, OS id=6124
Wed Feb 06 12:52:15 中国标准时间 2019
ARC0: Archival started
ARC1: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC1 started with pid=18, OS id=7044
Wed Feb 06 12:52:15 中国标准时间 2019
Thread 1 opened at log sequence 1370107
  Current log# 2 seq# 1370107 mem# 0: D:\ORACLE\xff\ORIGLOGB\LOG_G12M1.DBF
  Current log# 2 seq# 1370107 mem# 1: E:\ORACLE\xff\MIRRLOGB\LOG_G12M2.DBF
Successful open of redo thread 1
Wed Feb 06 12:52:15 中国标准时间 2019
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Wed Feb 06 12:52:15 中国标准时间 2019
ARC0: STARTING ARCH PROCESSES
Wed Feb 06 12:52:15 中国标准时间 2019
ARC1: Becoming the 'no FAL' ARCH
ARC1: Becoming the 'no SRL' ARCH
Wed Feb 06 12:52:15 中国标准时间 2019
ARC2: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
ARC0: Becoming the heartbeat ARCH
ARC2 started with pid=19, OS id=3772
Wed Feb 06 12:52:15 中国标准时间 2019
SMON: enabling cache recovery
Wed Feb 06 12:52:15 中国标准时间 2019
Read of rdba: 0x00800001 (file 2, block 1) failed with ORA-01205.
Trying reread from disk.
Reread of rdba: 0x00800001 (file 2, block 1) failed with ORA-01205
Wed Feb 06 12:52:15 中国标准时间 2019
Errors in file d:\oracle\xff\xff\usertrace\xff_ora_5036.trc:
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [_intel_fast_memset.A+44]
                                       [PC:0x356EA7C] [ADDR:0xD5F0000] [UNABLE_TO_WRITE] []
ORA-01205: not a data file - type number in header is 0

2


恢复成功
有备份,但是因为备份集有损坏无法正常还原,运气不错,通过人工操作正常恢复datafile 2并且正常recover成功,数据库正常open成功

Sat Feb 09 10:09:40 中国标准时间 2019
Successfully onlined Undo Tablespace 1.
Sat Feb 09 10:09:40 中国标准时间 2019
SMON: enabling tx recovery
Sat Feb 09 10:09:40 中国标准时间 2019
Database Characterset is UTF8
Opening with internal Resource Manager plan 
Starting background process QMNC
QMNC started with pid=36, OS id=3888
Sat Feb 09 10:09:42 中国标准时间 2019
Completed: alter database open
发表在 Oracle备份恢复 | 标签为 , , | 评论关闭

硬件故障数据库异常恢复

硬件故障数据库crash
有客户由于硬件故障导致数据库异常ORA-00345 ORA-00312 ORA-27070 OSD-04016

Tue Feb 05 16:58:26 2019
Thread 1 advanced to log sequence 17139 (LGWR switch)
  Current log# 12 seq# 17139 mem# 0: S:\ORADATA\ORCL\REDO12A.LOG
  Current log# 12 seq# 17139 mem# 1: S:\ORADATA\ORCL\REDO12B.LOG
Tue Feb 05 19:47:24 2019
Errors in file c:\oracle\diag\rdbms\orcl\orcl\trace\orcl_lgwr_2420.trc:
ORA-00345: redo log write error block 152097 count 8
ORA-00312: online log 12 thread 1: 'S:\ORADATA\ORCL\REDO12A.LOG'
ORA-27070: async read/write failed
OSD-04016: 异步 I/O 请求排队时出错。
O/S-Error: (OS 1) 函数不正确。
ORA-00345: redo log write error block 152097 count 8
ORA-00312: online log 12 thread 1: 'S:\ORADATA\ORCL\REDO12B.LOG'
ORA-27070: async read/write failed
OSD-04016: 异步 I/O 请求排队时出错。
O/S-Error: (OS 1) 函数不正确。
ORA-00345: redo log write error block 152105 count 1
ORA-00312: online log 12 thread 1: 'S:\ORADATA\ORCL\REDO12A.LOG'
ORA-27070: async read/write failed
OSD-04016: 异步 I/O 请求排队时出错。
O/S-Error: (OS 1) 函数不正确。

直接启动数据库报错
修复好硬件之后,直接启动数据库报ORA-00600 kcratr_scan_lastbwr错误

Fri Feb 08 20:58:15 2019
alter database mount exclusive
Successful mount of redo thread 1, with mount id 1527506791
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: alter database mount exclusive
alter database open
Beginning crash recovery of 1 threads
Started redo scan
Errors in file c:\oracle\diag\rdbms\orcl\orcl\trace\orcl_ora_3672.trc  (incident=41353):
ORA-00600: ??????, ??: [kcratr_scan_lastbwr], [], [], [], [], [], [], [], [], [], [], []
Incident details in: c:\oracle\diag\rdbms\orcl\orcl\incident\incdir_41353\orcl_ora_3672_i41353.trc
Aborting crash recovery due to error 600
Errors in file c:\oracle\diag\rdbms\orcl\orcl\trace\orcl_ora_3672.trc:
ORA-00600: ??????, ??: [kcratr_scan_lastbwr], [], [], [], [], [], [], [], [], [], [], []
Errors in file c:\oracle\diag\rdbms\orcl\orcl\trace\orcl_ora_3672.trc:
ORA-00600: ??????, ??: [kcratr_scan_lastbwr], [], [], [], [], [], [], [], [], [], [], []
ORA-600 signalled during: alter database open...
Fri Feb 08 20:58:24 2019
Trace dumping is performing id=[cdmp_20190208205824]
Fri Feb 08 20:59:04 2019
alter database open 
Beginning crash recovery of 1 threads
Started redo scan
Errors in file c:\oracle\diag\rdbms\orcl\orcl\trace\orcl_ora_1696.trc  (incident=41354):
ORA-00600: 内部错误代码, 参数: [kcratr_scan_lastbwr], [], [], [], [], [], [], [], [], [], [], []
Incident details in: c:\oracle\diag\rdbms\orcl\orcl\incident\incdir_41354\orcl_ora_1696_i41354.trc
Aborting crash recovery due to error 600
Errors in file c:\oracle\diag\rdbms\orcl\orcl\trace\orcl_ora_1696.trc:
ORA-00600: 内部错误代码, 参数: [kcratr_scan_lastbwr], [], [], [], [], [], [], [], [], [], [], []
Errors in file c:\oracle\diag\rdbms\orcl\orcl\trace\orcl_ora_1696.trc:
ORA-00600: 内部错误代码, 参数: [kcratr_scan_lastbwr], [], [], [], [], [], [], [], [], [], [], []
ORA-600 signalled during: alter database open ...

recover database报错
执行recover database报错ORA-00600 6101,ORA-00600 kdourp_inorder2,ORA-00600 ktbsdp1,ORA-00600 3020

Fri Feb 08 21:09:20 2019
ALTER DATABASE RECOVER  database  
Media Recovery Start
 started logmerger process
Parallel Media Recovery started with 4 slaves
Fri Feb 08 21:09:21 2019
Recovery of Online Redo Log: Thread 1 Group 12 Seq 17139 Reading mem 0
  Mem# 0: S:\ORADATA\ORCL\REDO12A.LOG
  Mem# 1: S:\ORADATA\ORCL\REDO12B.LOG
Fri Feb 08 21:09:21 2019
Errors in file c:\oracle\diag\rdbms\orcl\orcl\trace\orcl_pr02_3780.trc  (incident=49379):
ORA-00600: internal error code, arguments: [6101], [17], [21], [0], [], [], [], [], [], [], [], []
Incident details in: c:\oracle\diag\rdbms\orcl\orcl\incident\incdir_49379\orcl_pr02_3780_i49379.trc
Fri Feb 08 21:09:21 2019
Errors in file c:\oracle\diag\rdbms\orcl\orcl\trace\orcl_pr01_2040.trc  (incident=49371):
ORA-00600: internal error code, arguments: [kdourp_inorder2], [34], [0], [0], [44], [], [], [], [], [], [], []
Incident details in: c:\oracle\diag\rdbms\orcl\orcl\incident\incdir_49371\orcl_pr01_2040_i49371.trc
Fri Feb 08 21:09:21 2019
Errors in file c:\oracle\diag\rdbms\orcl\orcl\trace\orcl_pr03_1068.trc  (incident=49387):
ORA-00600: internal error code, arguments: [ktbsdp1], [], [], [], [], [], [], [], [], [], [], []
Incident details in: c:\oracle\diag\rdbms\orcl\orcl\incident\incdir_49387\orcl_pr03_1068_i49387.trc
Fri Feb 08 21:09:24 2019
Trace dumping is performing id=[cdmp_20190208210924]
Slave exiting with ORA-10562 exception
Errors in file c:\oracle\diag\rdbms\orcl\orcl\trace\orcl_pr03_1068.trc:
ORA-10562: Error occurred while applying redo to data block (file# 4, block# 1716972)
ORA-10564: tablespace USERS
ORA-01110: data file 4: 'S:\ORADATA\ORCL\USERS01.DBF'
ORA-10561: block type 'TRANSACTION MANAGED DATA BLOCK', data object# 204127
ORA-00600: internal error code, arguments: [ktbsdp1], [], [], [], [], [], [], [], [], [], [], []
Slave exiting with ORA-10562 exception
Errors in file c:\oracle\diag\rdbms\orcl\orcl\trace\orcl_pr02_3780.trc:
ORA-10562: Error occurred while applying redo to data block (file# 4, block# 1738552)
ORA-10564: tablespace USERS
ORA-01110: data file 4: 'S:\ORADATA\ORCL\USERS01.DBF'
ORA-10561: block type 'TRANSACTION MANAGED INDEX BLOCK', data object# 211606
ORA-00600: internal error code, arguments: [6101], [17], [21], [0], [], [], [], [], [], [], [], []
Slave exiting with ORA-10562 exception
Errors in file c:\oracle\diag\rdbms\orcl\orcl\trace\orcl_pr01_2040.trc:
ORA-10562: Error occurred while applying redo to data block (file# 4, block# 1725898)
ORA-10564: tablespace USERS
ORA-01110: data file 4: 'S:\ORADATA\ORCL\USERS01.DBF'
ORA-10561: block type 'TRANSACTION MANAGED DATA BLOCK', data object# 73907
ORA-00600: internal error code, arguments: [kdourp_inorder2], [34], [0], [0], [44], [], [], [], [], [], [], []
Recovery Slave PR03 previously exited with exception 10562
Fri Feb 08 21:09:28 2019
Errors in file c:\oracle\diag\rdbms\orcl\orcl\trace\orcl_pr04_2608.trc  (incident=49395):
ORA-00600: internal error code, arguments: [3020], [4], [1739291], [18516507], [], [], [], [], [], [], [], []
ORA-10567: Redo is inconsistent with data block (file# 4, block# 1739291, file offset is 1363369984 bytes)
ORA-10564: tablespace USERS
ORA-01110: data file 4: 'S:\ORADATA\ORCL\USERS01.DBF'
ORA-10561: block type 'TRANSACTION MANAGED DATA BLOCK', data object# 211552
Incident details in: c:\oracle\diag\rdbms\orcl\orcl\incident\incdir_49395\orcl_pr04_2608_i49395.trc
Slave exiting with ORA-600 exception
Errors in file c:\oracle\diag\rdbms\orcl\orcl\trace\orcl_pr04_2608.trc:
ORA-00600: internal error code, arguments: [3020], [4], [1739291], [18516507], [], [], [], [], [], [], [], []
ORA-10567: Redo is inconsistent with data block (file# 4, block# 1739291, file offset is 1363369984 bytes)
ORA-10564: tablespace USERS
ORA-01110: data file 4: 'S:\ORADATA\ORCL\USERS01.DBF'
ORA-10561: block type 'TRANSACTION MANAGED DATA BLOCK', data object# 211552
Media Recovery failed with error 448
Errors in file c:\oracle\diag\rdbms\orcl\orcl\trace\orcl_pr00_1548.trc:
ORA-00283: recovery session canceled due to errors
ORA-00448: normal completion of background process
Slave exiting with ORA-283 exception
Errors in file c:\oracle\diag\rdbms\orcl\orcl\trace\orcl_pr00_1548.trc:
ORA-00283: recovery session canceled due to errors
ORA-00448: normal completion of background process
ORA-10562 signalled during: ALTER DATABASE RECOVER  database  ...

出现上述问题主要是由于硬件突然故障,数据写丢失导致相关问题.

处理思路

RMAN> recover datafile 1;

启动 recover 于 09-2月 -19
使用通道 ORA_DISK_1

正在开始介质的恢复
介质恢复完成, 用时: 00:00:01

完成 recover 于 09-2月 -19

RMAN> recover datafile 2;

启动 recover 于 09-2月 -19
使用通道 ORA_DISK_1

正在开始介质的恢复
介质恢复完成, 用时: 00:00:01

完成 recover 于 09-2月 -19

RMAN> recover datafile 3;

启动 recover 于 09-2月 -19
使用通道 ORA_DISK_1

正在开始介质的恢复
介质恢复完成, 用时: 00:00:02

完成 recover 于 09-2月 -19

RMAN> recover datafile 4;

启动 recover 于 09-2月 -19
使用通道 ORA_DISK_1

正在开始介质的恢复
无法恢复介质
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: recover 命令 (在 02/09/2019 21:48:19 上) 失败
ORA-00283: recovery session canceled due to errors
RMAN-11003: 在分析/执行 SQL 语句期间失败: alter database recover if needed
 datafile 4
ORA-00283: 恢复会话因错误而取消
ORA-10562: Error occurred while applying redo to data block (file# 4, block# 172
5913)
ORA-10564: tablespace USERS
ORA-01110: 数据文件 4: 'S:\ORADATA\ORCL\USERS01.DBF'
ORA-10561: block type 'TRANSACTION MANAGED DATA BLOCK', data object# 73907
ORA-00600: 内部错误代码, 参数: [kdourp_inorder2], [34], [43], [44], [44], [], []
, [], [], [], [], []

SQL> recover datafile 4;
ORA-00283: 恢复会话因错误而取消
ORA-10562: Error occurred while applying redo to data block (file# 4, block#
1725913)
ORA-10564: tablespace USERS
ORA-01110: 数据文件 4: 'S:\ORADATA\ORCL\USERS01.DBF'
ORA-10561: block type 'TRANSACTION MANAGED DATA BLOCK', data object# 73907
ORA-00600: 内部错误代码, 参数: [kdourp_inorder2], [34], [43], [44], [44], [],
[], [], [], [], [], []

--通过bbed修改异常文件,屏蔽文件恢复,直接open库
SQL> alter database open;

数据库已更改。

数据库open之后,逻辑方式导出数据,重建新库,导入数据.

发表在 非常规恢复 | 标签为 , , , , , , , , | 评论关闭