修改并生成spfile参数文件之后,想启动实例到nomount状态,却发现不能启动,原因是参数文件有误,看了报错,却发现是由于
一个自动管理文件的目录在系统里没有对应的目录或文件,再看看系统层,发现确实没有这个目录: /u01/app/oracle/oradata/omf。
想着以前没有设置过该值对应的参数啊,突然想到我的这个库是迁移过来的,这个目录是源库所设置的目录,用来自动管理一些表空间
数据文件的,于是才解决了这个错误,修改后,正常启动了数据库。以下是解决过程:
由于一台虚拟机上有两个库,所以首先要指定将要运行的库名:
1、指定ORACLE_SID:
[oracle@enmo dbs]$ export ORACLE_SID=OCMU
[oracle@enmo dbs]$
[oracle@enmo dbs]$
[oracle@enmo dbs]$ echo ORACLE_SID
ORACLE_SID
[oracle@enmo dbs]$
[oracle@enmo dbs]$ echo $ORACLE_SID
OCMU
[oracle@enmo dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Oct 10 17:16:02 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
2、 启动实例到nomount状态:
SQL> startup nomount;
ORA-01261: Parameter db_create_file_dest destination string cannot be translated
ORA-01262: Stat failed on a file destination directory
Linux-x86_64 Error: 2: No such file or directory
SQL>
第一次报错,以上错误ORA-01261指定了错误的原因,参数的值不正确。
再次启动:
SQL> startup nomount;
ORA-01261: Parameter db_create_file_dest destination string cannot be translated
ORA-01262: Stat failed on a file destination directory
Linux-x86_64 Error: 2: No such file or directory
3、 修改参数文件:
[oracle@enmo dbs]$ vi initOCMU.ora
ORA11GR2.__db_cache_size=327155712
ORA11GR2.__java_pool_size=4194304
ORA11GR2.__large_pool_size=8388608
ORA11GR2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
ORA11GR2.__pga_aggregate_target=289406976
ORA11GR2.__sga_target=545259520
ORA11GR2.__shared_io_pool_size=0
ORA11GR2.__shared_pool_size=197132288
ORA11GR2.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/OCMU/adump'
*.audit_trail='DB','EXTENDED'
*.compatible='11.2.0.4.0'
*.control_files='/u01/app/oracle/oradata/OCMU/control01.ctl','/u01/app/oracle/fast_recovery_area/control02.ctl','/u01/app/oracle/oradata/OCMU/control03.ctl','/u01/app/FRA/control04.ctl'
*.db_block_size=8192
#*.db_create_file_dest='/u01/app/oracle/oradata/omf' ------把该参数直接注释掉(或者在系统层创建对应的目录也可以)
*.db_domain=''
*.db_name='ORA11GR2'
*.db_recovery_file_dest='/u01/app/FRA'
*.db_recovery_file_dest_size=3221225472
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ORA11GR2XDB)'
*.memory_target=833617920
*.O7_DICTIONARY_ACCESSIBILITY=FALSE
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
~
"initOCMU.ora" 27L, 1093C written
4、再次启动数据库实例:
[oracle@enmo dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Oct 10 17:39:17 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 830930944 bytes
Fixed Size 2257800 bytes
Variable Size 536874104 bytes
Database Buffers 289406976 bytes
Redo Buffers 2392064 bytes
修改参数文件后,实例能正常开启。开启之后,看似一个小问题,缺影响的数据库实例不能正常开启。所以才修改参数文件的时候,
要认真修改,反复检查,特别一些参数值的目录路径的参数,更加要细心修改,多一点或者多一个空格,都可能造成
参数文件不能被识别。更加要细心检查控制文件的参数值,以及一些重要参数,比如说审计文件的目录,这个是手动
建库生成并修改参数文件是最容易忽略并最容易出错的一个参数。这个希望多多留意。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31392094/viewspace-2126420/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/31392094/viewspace-2126420/