spfile 깨졋을때
Oracle/Oracle 에러 2016. 8. 10. 21:45Oracle10g에서 database에 접속할 때 계속 init[SID].ora가 없다고 나온다.
9i~부터는 spfile이 default로 실행되기 때문에 initORCL.ora가 필요가 없다.
하지만 spfile이 어떤 이유에서 장애가 나서 init[SID]이 필요하고 나오는 것이다.
다음은 깨진 spfile을 pfile로 바꾸거나 복구하는 방법이다.
[root@oradb shared_oracle]# su - oracle
[oracle@oradb ~]$ cd $ORACLE_HOME/dbs
[oracle@oradb dbs]$ ls
init.ora initdw.ora lkPROD orapwPROD spfilePROD.ora
initORCL.ora lkORCL orapwORCL spfileORCL.ora
[oracle@oradb dbs]$ vi spfilePROD.ora
[oracle@oradb dbs]$
[oracle@oradb dbs]$
[oracle@oradb dbs]$ cp spfilePROD.ora spfilePROD.ora.bak
[oracle@oradb dbs]$ vi spfilePROD.ora
[oracle@oradb dbs]$
[oracle@oradb dbs]$
[oracle@oradb dbs]$ ls
init.ora initPROD.ora lkORCL orapwORCL spfileORCL.ora spfilePROD.ora.bak
initORCL.ora initdw.ora lkPROD orapwPROD spfilePROD.ora
[oracle@oradb dbs]$ mv spfilePROD.ora spfilePROD.ora.bak2
[oracle@oradb dbs]$
[oracle@oradb dbs]$
[oracle@oradb dbs]$ ls
init.ora initPROD.ora lkORCL orapwORCL spfileORCL.ora spfilePROD.ora.bak2
initORCL.ora initdw.ora lkPROD orapwPROD spfilePROD.ora.bak
[oracle@oradb dbs]$ ls -alrt
total 72
-rw-r--r-- 1 oracle oinstall 12920 Mar 8 2002 initdw.ora
-rw-r--r-- 1 oracle oinstall 8385 Mar 9 2002 init.ora
drwxr-xr-x 49 oracle oinstall 4096 Aug 9 19:54 ..
-rwSr----- 1 oracle oinstall 1536 Aug 9 20:36 orapwORCL
-rw-rw---- 1 oracle oinstall 24 Aug 9 20:40 lkPROD
-rwSr----- 1 oracle oinstall 1536 Aug 9 20:44 orapwPROD
-rw-rw---- 1 oracle oinstall 24 Aug 10 16:15 lkORCL
-rw-r----- 1 oracle oinstall 2560 Aug 10 16:21 spfileORCL.ora
-rw-r--r-- 1 oracle oinstall 1005 Aug 10 17:12 initORCL.ora
-rw-r----- 1 oracle oinstall 2561 Aug 10 20:36 spfilePROD.ora.bak2
-rw-r----- 1 oracle oinstall 2561 Aug 10 21:04 spfilePROD.ora.bak
-rw-r--r-- 1 oracle oinstall 985 Aug 10 21:05 initPROD.ora
drwxr-xr-x 2 oracle oinstall 4096 Aug 10 21:05 .
[oracle@oradb dbs]$ echo $ORACLE_SID
PROD
[oracle@oradb dbs]$ sqlplus "/as sysdba"
SQL*Plus: Release 9.2.0.4.0 - Production on Wed Aug 10 21:05:55 2016
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 236000356 bytes
Fixed Size 451684 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
SQL>
SQL>
SQL> alter database mount
2 ;
Database altered.
SQL> alter database open;
Database altered.
SQL> select instance_name from v$Instance;
INSTANCE_NAME
----------------
PROD
2. string spfile[SID].ora 로 바이너리를 볼수있다.
바이너리를 걷어내고 string만 볼 수 있다.
'Oracle > Oracle 에러' 카테고리의 다른 글
oracleasm createdisk DATA01 /dev/sdc1 FAILED (0) | 2016.07.27 |
---|---|
ORA-00376, ORA-01110 (0) | 2016.07.01 |
ORA-01031 (0) | 2016.06.29 |
ORA-01652: (0) | 2016.06.14 |
ORA-01858 - sqldeveloper 날짜형식 (0) | 2016.06.01 |