改SGA太小,ORACLE无法启动 的问题修复
今天在测试库上使用:alter system set sga_target=300m scope=spfile
结果那个m 没写上,导致ORACLE重启的时候无法启动了。
报错:ORA-00371: not enough shared pool memory, should be atleast 62198988 bytes
原因是ORACLE启动时用SPFILE参数文件。
那就不用这个文件,用那个默认的
SQL> startup pfile='/home/oracle/oracle/product/10.2.0/db_1/dbs/init.ora';
ORACLE instance started.
Total System Global Area 125829120 bytes
Fixed Size 1218052 bytes
Variable Size 117443068 bytes
Database Buffers 4194304 bytes
Redo Buffers 2973696 bytes
ORA-00205: error in identifying control file, check alert log for more info。
后来才知道默认的只是个示例,是不能实际使用的。
看来只能修改参数文件了,但那个spfile不能直接修改的。同事说用create pfile from spfile ,创建出pfile ,修改过来sga_taget参数,再启动。
我才发现,create pfile命令是不需要oracle启动的,它只是个sqlplus的工具。看来 要区分哪些命令是数据库命令,哪些命令是sqlplus命令。
那就根据 spfile 创建pfile,然后在修改sga_target,再利用create spfile from pfile 重新生成spfile.
SQL> create pfile='/home/oracle/initORCL.ora' from spfile;
File created.
SQL> startup pfile='/home/oracle/initORCL.ora';
ORA-32006: SQL_TRACE initialization parameter has been deprecated
ORACLE instance started.
Total System Global Area 314572800 bytes
Fixed Size 1219160 bytes
Variable Size 96470440 bytes
Database Buffers 213909504 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
现在数据可以OPEN了。
总结:1:数据启动先找spfile,若没有才去找pfile.spfile 无法直接编辑,但可以间接修改:用create pfile from spfile 创建pfile ,修改pfile ,再用create spfile from pfile 重新生成spfile ,可完成对spfile值的修改。2:create pfile 命令不需要oracle的启动
转自:http://hi.baidu.com/longredhao/item/12a79ca437c30d298819d3ed
备注:从cmd窗口登录成功
conn sys/wlan@wlan as sysdba;
浙公网安备 33010602011771号