DB
오라클 파라미터 파일 손상으로 인한 복구방법
viera
2021. 11. 30. 18:22
반응형
# 서버다운으로 인해 오라클 접속시 다음과 같은 에러가 발생하였다.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3701
Additional information: -446465241
Process ID: 0
Session ID: 0 Serial number: 0
오류를 검색하여보니 갑작스러운 종료로 인해 오라클 파라미터 파일이 손상되어 발생하는 현상이였다.
그렇다면 해결책은 파라미터 파일을 재생성해줘야 한다.
1. 해당 경로로 이동
[oracle@localhost ~]$ cd $ORACLE_HOME/dbs
[oracle@localhost dbs]$ ls
D:devoradata c:oracleaaa.csv hc_orcl.dat init.ora lkORCL orapworcl spfileorcl.ora
|
2. 오라클 접속하여 파라미터 파일 생성
[oracle@localhost dbs]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 30 11:16:26 2021
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to an idle instance.
SQL> create pfile from spfile;
File created.
|
3. 오라클 종료 후 initorcl.ora 파일 수정
[oracle@localhost dbs]$ vi initorcl.ora #db_recovery_file_dest ~ # 주석처리 #db_recovery_file_dest ~ # 주석처리 |
4. 다시 오라클 접속하여 pfile 마운트 후 데이터베이스 오픈 후 spfile 생성
SQL> startup mount pfile=initorcl.ora
ORACLE instance started.
Total System Global Area 2432696320 bytes Fixed Size 8795664 bytes
Variable Size 671091184 bytes
Database Buffers 1744830464 bytes
Redo Buffers 7979008 bytes
Database mounted.
SQL> alter database flashback off;
Database altered.
SQL> alter database open;
Database altered.
SQL> create pfile from spfile;
File created.
|
5. 완료 후 DB instance 상태 확인
SQL> select status from v$instance;
STATUS
------------
OPEN
|
반응형