今天Linux服务器机子重启了下,Oracle启动不起来,提示:解决ORA-00824: cannot set sga_target due to existing
看了很多解决方法,发现下面这个特别好,特别简单
按照这种思路:
1、我们完全可以先用pfile的配置参数启动数据库实例
2、通过pfile重建spfile文件(create spfile from pfile)
3、关闭数据库实例
4、正常启动数据库实例
具体的操作如下:
su - oracle
[oracle@redhat pfile]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Oct 20 00:20:19 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected to an idle instance.
Connected to an idle instance.
SQL>lsnrctl start
这条语句运行后,会出现pfile文件,把这个文件弄出来备份,然后,再运行下面的语句
SQL> startup pfile='/home/oracle/admin/zgz/pfile/init.ora.82220096537'
SQL> startup pfile='/home/oracle/admin/zgz/pfile/init.ora.82220096537'
--“通过pfile文件启动oracle实例”
ORACLE instance started.
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218968 bytes
Variable Size 88082024 bytes
Database Buffers 188743680 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.
SQL> create spfile from pfile='/home/oracle/admin/zgz/pfile/init.ora.82220096537';--“通过pfile重建spfile文件”
Fixed Size 1218968 bytes
Variable Size 88082024 bytes
Database Buffers 188743680 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.
SQL> create spfile from pfile='/home/oracle/admin/zgz/pfile/init.ora.82220096537';--“通过pfile重建spfile文件”
File created.
SQL> shutdown immediate
--"关闭数据库实例"
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup --"通过spfile文件正常启动oracle实例"
ORACLE instance started.
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup --"通过spfile文件正常启动oracle实例"
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218968 bytes
Variable Size 88082024 bytes
Database Buffers 188743680 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.
SQL>
Fixed Size 1218968 bytes
Variable Size 88082024 bytes
Database Buffers 188743680 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.
SQL>