오라클 12c 설치 후 재시작할 때 오류

2 minute read

기본설치 했는데 왜 자동실행이 안되는걸까

오라클DB 12c는 미완성품인가

SQL> startup ORA-01078: failure in processing system parameters LRM-00109: could not open parameter file ‘/u01/app/oracle/product/12.1.0.2/db_1/dbs/initcdb1.ora’

init.ora 파일을 복사해서 설정파일을 만들어준다

$ cp /u01/app/oracle/product/12.1.0.2/db_1/dbs/init.ora /u01/app/oracle/product/12.1.0.2/db_1/dbs/initcdb1.ora

그리고 다시 실행

SQL> startup ORA-48108: invalid value given for the diagnostic_dest init.ora parameter ORA-48140: the specified ADR Base directory does not exist [/u01/app/oracle/product/12.1.0.2/db_1/dbs/<ORACLE_BASE>] ORA-48187: specified directory does not exist Linux-x86_64 Error: 2: No such file or directory Additional information: 1 SQL>

주석을 원래 잘 안읽는데 갑자기 눈에 들어와서…

init.ora에 보면 다음내용이 보인다

Change ‘<ORACLE_BASE>’ to point to the oracle base (the one you specify at install time)

기본 경로대로 설치했다면

ORACLE_BASE = /u01/app/oracle

db_name=’cdb1’ memory_target=1G processes = 150 audit_file_dest=’/u01/app/oracle/admin/orcl/adump’ audit_trail =’db’ db_block_size=8192 db_domain=’’ db_recovery_file_dest=’/u01/app/oracle/fast_recovery_area’ db_recovery_file_dest_size=2G diagnostic_dest=’/u01/app/oracle’ dispatchers=’(PROTOCOL=TCP) (SERVICE=ORCLXDB)’ open_cursors=300 remote_login_passwordfile=’EXCLUSIVE’ undo_tablespace=’UNDOTBS1’

You may want to ensure that control files are created on separate physical

devices

control_files = (ora_control1, ora_control2) compatible =’11.2.0’

12버전을 깔았는데 왜 11.2.0이 나와있는걸까… 의아하지만 오류가 나진 않을테니 넘어감

SQL> startup ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated ORA-01262: Stat failed on a file destination directory Linux-x86_64 Error: 2: No such file or directory

또 오류발생

$ mkdir /u01/app/oracle/fast_recovery_area

디렉토리를 수동으로 만들어줬다

그리고 실행

SQL> startup ORACLE instance started.

Total System Global Area 1073741824 bytes Fixed Size 2932632 bytes Variable Size 671088744 bytes Database Buffers 394264576 bytes Redo Buffers 5455872 bytes ORA-00205: error in identifying control file, check alert log for more info

실행은 되었으나..

오류가 나는거 보면 제대로 실행될리가 없다.

찾아보니

http://database.sarang.net/?inc=read&aid=23564&criteria=oracle&subcrit=&id=&limit=&keyword=&page=

컨트롤파일 오류라는 것 같다.

아까 설정 아래쪽에

control_files = (ora_control1, ora_control2)

이부분 수정이 필요해보인다.

 

control_files = (“/u01/app/oracle/oradata/orcl/control01.ctl”, “/u01/app/oracle/oradata/orcl/control02.ctl”)

여기는 찾아서 추가는했는데 이걸로 해도 되는지 확신이 없다

SQL> startup ORACLE instance started.

Total System Global Area 1073741824 bytes Fixed Size 2932632 bytes Variable Size 671088744 bytes Database Buffers 394264576 bytes Redo Buffers 5455872 bytes ORA-00201: control file version 12.1.0.2.0 incompatible with ORACLE version 11.2.0.0.0 ORA-00202: control file: ‘/u01/app/oracle/oradata/orcl/control01.ctl’

SQL>

11.2버전? 무슨소린지 모르겠다

자동설치로 그냥 클릭클릭만 했을 뿐인데…

initcdb1.ora > compatible = 12.1.0.2.0 으로 변경해봤더니

SQL> startup ORACLE instance started.

Total System Global Area 1073741824 bytes Fixed Size 2932632 bytes Variable Size 671088744 bytes Database Buffers 394264576 bytes Redo Buffers 5455872 bytes ORA-01103: database name ‘ORCL’ in control file is not ‘CDB1’

SQL>

다음 오류

#db_name=’cdb1’ db_name=’orcl’

이거 다시 변경하고 서버 실행

SQL> startup ORACLE instance started.

Total System Global Area 1073741824 bytes Fixed Size 2932632 bytes Variable Size 671088744 bytes Database Buffers 394264576 bytes Redo Buffers 5455872 bytes ORA-65093: multitenant container database not set up properly

SQL>

에러확인

[oracle@localhost dbs]$ oerr ora 65093 65093, 00000, “multitenant container database not set up properly” // *Cause: An attempt was made to open a multitenant container database without // the correct parameter set for a multitenant container database in // the initialization parameter file. // *Action: Set the ‘enable_pluggable_database=true’ parameter for the // multitenant container database in the initialization parameter file // and restart the database. // [oracle@localhost dbs]$

진짜 이것만 하면 되는건가

SQL> startup ORACLE instance started.

Total System Global Area 1073741824 bytes Fixed Size 2932632 bytes Variable Size 671088744 bytes Database Buffers 394264576 bytes Redo Buffers 5455872 bytes Database mounted. Database opened. SQL>

되네

 

오라클은 엔지니어 쓰게 만들라고 어렵게 해놓나보다

오라클 안 쓰는 회사나 SE있는 회사로 이직 해야겠다