錯誤初始化引數導致無法啟動的解決辦法
在使用spfile系統引數檔案時,有時會碰到修改初始化引數後系統無法啟動的問題,下面給出幾個解決方案,建議使用方案二。
0,無法啟動場景
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /u01/app/oracle/product/10.2.0
/db_1/dbs/spfileemrep.ora
SQL> show parameter process
------------------------------------ ----------- ------------------------------
spfile string /u01/app/oracle/product/10.2.0
/db_1/dbs/spfileemrep.ora
SQL> show parameter process
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 10
log_archive_max_processes integer 2
processes integer 150
SQL> alter system set processes=50000 scope=spfile;
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 10
log_archive_max_processes integer 2
processes integer 150
SQL> alter system set processes=50000 scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-04031: unable to allocate 1480 bytes of shared memory ("shared pool","unknown object","sga heap(1,0)","procs: ksunfy")
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-04031: unable to allocate 1480 bytes of shared memory ("shared pool","unknown object","sga heap(1,0)","procs: ksunfy")
1,方法一:利用引數檔案中引數可以設定多次,以最後一個為準的特性:
[oracle@test dbs]$ cat initemrep_t.ora
spfile=/u01/app/oracle/product/10.2.0/db_1/dbs/spfileemrep.ora
processes=150
[oracle@test dbs]$ cat initemrep_t.ora
spfile=/u01/app/oracle/product/10.2.0/db_1/dbs/spfileemrep.ora
processes=150
SQL> startup pfile=/u01/app/oracle/product/10.2.0/db_1/dbs/initemrep_t.ora
ORACLE instance started.
Total System Global Area 562036736 bytes
Fixed Size 1262936 bytes
Variable Size 314575528 bytes
Database Buffers 239075328 bytes
Redo Buffers 7122944 bytes
Database mounted.
Database opened.
SQL> show parameter spfile
Fixed Size 1262936 bytes
Variable Size 314575528 bytes
Database Buffers 239075328 bytes
Redo Buffers 7122944 bytes
Database mounted.
Database opened.
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /u01/app/oracle/product/10.2.0
/db_1/dbs/spfileemrep.ora
SQL> show parameter processes
------------------------------------ ----------- ------------------------------
spfile string /u01/app/oracle/product/10.2.0
/db_1/dbs/spfileemrep.ora
SQL> show parameter processes
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 10
log_archive_max_processes integer 2
processes integer 150
SQL> create spfile from pfile;
create spfile from pfile
*
ERROR at line 1:
ORA-32002: cannot create SPFILE already being used by the instance
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 10
log_archive_max_processes integer 2
processes integer 150
SQL> create spfile from pfile;
create spfile from pfile
*
ERROR at line 1:
ORA-32002: cannot create SPFILE already being used by the instance
--這時可以使用create pfile from spfile生成pfile,但processes=50000
--修改
SQL> alter system set processes=150 scope=spfile;
System altered.
--重新啟動
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 562036736 bytes
Fixed Size 1262936 bytes
Variable Size 318769832 bytes
Database Buffers 234881024 bytes
Redo Buffers 7122944 bytes
Database mounted.
Database opened.
SQL> show parameter processes
Fixed Size 1262936 bytes
Variable Size 318769832 bytes
Database Buffers 234881024 bytes
Redo Buffers 7122944 bytes
Database mounted.
Database opened.
SQL> show parameter processes
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 10
log_archive_max_processes integer 2
processes integer 150
SQL> show parameter spfile
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 10
log_archive_max_processes integer 2
processes integer 150
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /u01/app/oracle/product/10.2.0
/db_1/dbs/spfileemrep.ora
------------------------------------ ----------- ------------------------------
spfile string /u01/app/oracle/product/10.2.0
/db_1/dbs/spfileemrep.ora
2,方法二:使用spfile重新生成pfile,修改後再生成spfile。
--雖然沒有啟動,但可以生成pfile
SQL> create pfile from spfile;
SQL> create pfile from spfile;
File created.
--使用vi修改新生成pfile中的processes=150
--重新啟動
SQL> startup pfile=?/dbs/initemrep.ora
ORACLE instance started.
Total System Global Area 562036736 bytes
Fixed Size 1262936 bytes
Variable Size 310381224 bytes
Database Buffers 243269632 bytes
Redo Buffers 7122944 bytes
Database mounted.
Database opened.
SQL> show parameter spfile
Fixed Size 1262936 bytes
Variable Size 310381224 bytes
Database Buffers 243269632 bytes
Redo Buffers 7122944 bytes
Database mounted.
Database opened.
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string
SQL> show parameter processes
------------------------------------ ----------- ------------------------------
spfile string
SQL> show parameter processes
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 10
log_archive_max_processes integer 2
processes integer 150
SQL> create spfile from pfile;
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 10
log_archive_max_processes integer 2
processes integer 150
SQL> create spfile from pfile;
File created.
3,方法三:用strings命令將spfile中的引數匯出生成pfile,修改引數,並使用pfile啟動在生成spfile。
strings spfileemrep.ora >initemrep.ora
--修改processes=150
SQL> startup pfile=?/dbs/initemrep.ora
ORACLE instance started.
ORACLE instance started.
Total System Global Area 562036736 bytes
Fixed Size 1262936 bytes
Variable Size 322964136 bytes
Database Buffers 230686720 bytes
Redo Buffers 7122944 bytes
Database mounted.
Database opened.
SQL> show parameter spfile
Fixed Size 1262936 bytes
Variable Size 322964136 bytes
Database Buffers 230686720 bytes
Redo Buffers 7122944 bytes
Database mounted.
Database opened.
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string
SQL> show parameter processes
------------------------------------ ----------- ------------------------------
spfile string
SQL> show parameter processes
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 10
log_archive_max_processes integer 2
processes integer 150
SQL> create spfile from pfile;
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 10
log_archive_max_processes integer 2
processes integer 150
SQL> create spfile from pfile;
File created.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 562036736 bytes
Fixed Size 1262936 bytes
Variable Size 322964136 bytes
Database Buffers 230686720 bytes
Redo Buffers 7122944 bytes
Database mounted.
Database opened.
SQL> show parameter spfile
Fixed Size 1262936 bytes
Variable Size 322964136 bytes
Database Buffers 230686720 bytes
Redo Buffers 7122944 bytes
Database mounted.
Database opened.
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /u01/app/oracle/product/10.2.0
/db_1/dbs/spfileemrep.ora
SQL> show parameter process
------------------------------------ ----------- ------------------------------
spfile string /u01/app/oracle/product/10.2.0
/db_1/dbs/spfileemrep.ora
SQL> show parameter process
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 10
log_archive_max_processes integer 2
processes integer 150
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 10
log_archive_max_processes integer 2
processes integer 150
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/18922393/viewspace-756995/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 時區錯誤導致oracle的EM不能啟動解決辦法Oracle
- SPFILE引數修改錯誤的解決辦法
- [Oracle]由於初始化引數檔案修改錯誤導致oracle無法startupOracle
- 11gR2私有ip修改錯誤導致crs無法啟動解決方法
- eclipse: workspace出錯導致無法啟用的解決Eclipse
- 如何解決WAS的JAVA虛擬機器引數設定錯誤,導致控制檯無法啟動的問題Java虛擬機
- 恢復資料庫引數錯誤無法啟動資料庫
- Linux檔案系統破壞,導致系統無法啟動解決辦法Linux
- tail +數字 無法開啟錯誤解決(ubutu)AI
- centos7 無法啟動網路(service network restart)錯誤解決辦法CentOSREST
- 解決hyper v導致docker無法啟動問題Docker
- oracle 92 oem 錯誤的更改oracle sga後,導致instance無法啟動的問題解決Oracle
- dbua後資料庫無法啟動錯誤的解決資料庫
- 記vscode無法啟動解決辦法VSCode
- SPFILE 錯誤導致資料庫無法啟動(ORA-01565)資料庫
- ghost win10無法引導怎麼回事 win10 ghost無法引導啟動的解決步驟Win10
- mysql 目錄遷移導致無法找到relay log 解決辦法。MySql
- Genymotion無法啟動虛擬裝置的解決辦法
- Asp.net 無法啟動IIS Express 解決辦法ASP.NETExpress
- [php]wmap應用程式無法啟動解決辦法PHP
- AngryBirds(憤怒的小鳥)無法啟動的解決辦法
- 升級python2.7 導致xend 不能啟動解決辦法Python
- 又一例SPFILE設定錯誤導致資料庫無法啟動資料庫
- dns錯誤怎麼辦 dns錯誤的解決辦法DNS
- SAP錯誤提示解決辦法
- 關於dbconsole無法啟動的解決辦法
- 電腦無法啟動怎麼辦 電腦啟動不了的原因與解決辦法
- ClamAV無法更新錯誤解決
- 登錄檔無法開啟的解決辦法
- docker容器故障致無法啟動解決例項Docker
- Win10系統無法訪問行動硬碟提示引數錯誤的解決方法Win10硬碟
- scp出現錯誤的解決辦法
- samba一個錯誤的解決辦法!Samba
- 製作的Fedora啟動U盤無法引導系統的解決方法
- ics無法啟動的解決
- 360打補丁後系統無法啟動的解決辦法
- 連線oracle錯誤解決辦法Oracle
- nginxFastCGI錯誤Primaryscriptunknown解決辦法NginxAST