系统环境:windows server 2008R2
数据库环境:oracle 11.2.0.1
问题描述:一测试数据库oradb启动时报错ORA-01261&&ORA-00202,报错日志如下:
C:\Users\localadmin>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期二 8月 8 10:12:29 2017
Copyright (c) 1982, 2010, Oracle. All rights reserved.
已连接到空闲例程。
SQL> startup;
ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated
ORA-01263: Name given for file destination directory is invalid
OSD-04018: ??????????????????????????
O/S-Error: (OS 2) ??????????????????????
SQL>
startup报错ORA-01261&&ORA-01263的意思是:当前数据库开启了闪回区,但是当前闪回区参数 db_recovery_file_dest设置的目录不存在了: ORA-01263: Name given for file destination directory is invalid
解决方法很简单,查看启动参数文件pfile(ORACLE_HOME/dbs/initoradb.ora),看 db_recovery_file_dest的文件目录配置,查看存储并创建改目录 :
*.aq_tm_processes=0
*.audit_file_dest='C:\oracle\admin\oradb\adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='C:\oracle\oradata\oradb\control01.ctl',' C:\oracle\flash_recovery_area\oradb\control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='oradb'
*. db_recovery_file_dest='C:\oracle\flash_recovery_area'
*.db_recovery_file_dest_size=4294967296
*.diagnostic_dest='C:\oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=oradbXDB)'
*.job_queue_processes=0
*.log_archive_format='ARC%S_%R.%T'
*.memory_target=3294625792
*.nls_language='SIMPLIFIED CHINESE'
*.nls_territory='CHINA'
*.open_cursors=300
*.optimizer_use_sql_plan_baselines=TRUE
*.processes=200
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
需要注意的是,还需要在 flash_recovery_area目录下创建oradb文件夹,然后从数据文件目录拷贝最新的控制文件到oradb下并重命名为 control02.ctl
否则,启动数据库时会报错:
SQL> startup;
ORACLE 例程已经启动。
Total System Global Area 3290345472 bytes
Fixed Size 2180224 bytes
Variable Size 1979714432 bytes
Database Buffers 1291845632 bytes
Redo Buffers 16605184 bytes
ORA-00205: ?????????, ??????, ???????
告警日志内容:
Tue Aug 08 10:14:41 2017
MMNL started with pid=16, OS id=11856
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
starting up 1 shared server(s) ...
ORACLE_BASE from environment = C:\oracle
Tue Aug 08 10:14:41 2017
ALTER DATABASE MOUNT
ORA-00210: ???????????
ORA-00202: ????: ''C:\ORACLE\FLASH_RECOVERY_AREA\ORADB\CONTROL02.CTL''
ORA-27041: ??????
OSD-04002: 无法打开文件
O/S-Error: (OS 3) 系统找不到指定的路径。
ORA-205 signalled during: ALTER DATABASE MOUNT...
然后,再次启动数据库能够正常启动:
SQL> startup;
ORACLE 例程已经启动。
Total System Global Area 3290345472 bytes
Fixed Size 2180224 bytes
Variable Size 1979714432 bytes
Database Buffers 1291845632 bytes
Redo Buffers 16605184 bytes
数据库装载完毕。
数据库已经打开。
SQL>
总结:可能是存储或者人为误删除导致数据库损失闪回区目录,数据库无法启动,需要按照参数文件配置修复存储目录及相应的控制文件即可。
数据库环境:oracle 11.2.0.1
问题描述:一测试数据库oradb启动时报错ORA-01261&&ORA-00202,报错日志如下:
C:\Users\localadmin>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期二 8月 8 10:12:29 2017
Copyright (c) 1982, 2010, Oracle. All rights reserved.
已连接到空闲例程。
SQL> startup;
ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated
ORA-01263: Name given for file destination directory is invalid
OSD-04018: ??????????????????????????
O/S-Error: (OS 2) ??????????????????????
SQL>
startup报错ORA-01261&&ORA-01263的意思是:当前数据库开启了闪回区,但是当前闪回区参数 db_recovery_file_dest设置的目录不存在了: ORA-01263: Name given for file destination directory is invalid
解决方法很简单,查看启动参数文件pfile(ORACLE_HOME/dbs/initoradb.ora),看 db_recovery_file_dest的文件目录配置,查看存储并创建改目录 :
*.aq_tm_processes=0
*.audit_file_dest='C:\oracle\admin\oradb\adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='C:\oracle\oradata\oradb\control01.ctl',' C:\oracle\flash_recovery_area\oradb\control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='oradb'
*. db_recovery_file_dest='C:\oracle\flash_recovery_area'
*.db_recovery_file_dest_size=4294967296
*.diagnostic_dest='C:\oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=oradbXDB)'
*.job_queue_processes=0
*.log_archive_format='ARC%S_%R.%T'
*.memory_target=3294625792
*.nls_language='SIMPLIFIED CHINESE'
*.nls_territory='CHINA'
*.open_cursors=300
*.optimizer_use_sql_plan_baselines=TRUE
*.processes=200
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
需要注意的是,还需要在 flash_recovery_area目录下创建oradb文件夹,然后从数据文件目录拷贝最新的控制文件到oradb下并重命名为 control02.ctl
否则,启动数据库时会报错:
SQL> startup;
ORACLE 例程已经启动。
Total System Global Area 3290345472 bytes
Fixed Size 2180224 bytes
Variable Size 1979714432 bytes
Database Buffers 1291845632 bytes
Redo Buffers 16605184 bytes
ORA-00205: ?????????, ??????, ???????
Tue Aug 08 10:14:41 2017
MMNL started with pid=16, OS id=11856
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
starting up 1 shared server(s) ...
ORACLE_BASE from environment = C:\oracle
Tue Aug 08 10:14:41 2017
ALTER DATABASE MOUNT
ORA-00210: ???????????
ORA-00202: ????: ''C:\ORACLE\FLASH_RECOVERY_AREA\ORADB\CONTROL02.CTL''
ORA-27041: ??????
OSD-04002: 无法打开文件
O/S-Error: (OS 3) 系统找不到指定的路径。
ORA-205 signalled during: ALTER DATABASE MOUNT...
然后,再次启动数据库能够正常启动:
SQL> startup;
ORACLE 例程已经启动。
Total System Global Area 3290345472 bytes
Fixed Size 2180224 bytes
Variable Size 1979714432 bytes
Database Buffers 1291845632 bytes
Redo Buffers 16605184 bytes
数据库装载完毕。
数据库已经打开。
SQL>
总结:可能是存储或者人为误删除导致数据库损失闪回区目录,数据库无法启动,需要按照参数文件配置修复存储目录及相应的控制文件即可。