💡 오라클 메모리인 인스턴스를 시작시킴
💡 파라미터 파일
💡 수동으로 create database 스크립트로 db생성 작업, controlfile 생성 또는 위치 변경 작업
11:48:42 SYS @ ORA19 > shutdown abort
ORACLE 인스턴스가 종료되었습니다.
11:48:56 SYS @ ORA19 > startup nomount
ORACLE 인스턴스가 시작되었습니다.
Total System Global Area 1979709008 bytes
Fixed Size 8898128 bytes
Variable Size 520093696 bytes
Database Buffers 1426063360 bytes
Redo Buffers 24653824 bytes
11:49:05 SYS @ ORA19 > select status
11:49:17 2 from v$instance;
STATUS
------------------------------------
STARTED
경 과: 00:00:00.01
💡 control file
💡 db 이름, database에 있는 파일들의 위치와 상태정보
11:54:24 SYS @ ORA19 > startup force
ORACLE 인스턴스가 시작되었습니다.
Total System Global Area 1979709008 bytes
Fixed Size 8898128 bytes
Variable Size 520093696 bytes
Database Buffers 1426063360 bytes
Redo Buffers 24653824 bytes
데이터베이스가 마운트되었습니다.
데이터베이스가 열렸습니다.
11:54:42 SYS @ ORA19 > alter database backup controlfile to trace
11:54:56 2 as '/home/oracle/create_controlfile.sql';
데이타베이스가 변경되었습니다.
경 과: 00:00:00.02
11:58:04 SYS @ ORA19 > shutdown abort
ORACLE 인스턴스가 종료되었습니다.
11:58:11 SYS @ ORA19 >
11:58:12 SYS @ ORA19 > startup nomount
ORACLE 인스턴스가 시작되었습니다.
Total System Global Area 1979709008 bytes
Fixed Size 8898128 bytes
Variable Size 536870912 bytes
Database Buffers 1409286144 bytes
Redo Buffers 24653824 bytes
11:58:20 SYS @ ORA19 >
11:58:26 SYS @ ORA19 > @i
STATUS
------------------------------------
STARTED
11:59:54 SYS @ ORA19 > startup mount
ORA-01081: ?? ???? ORACLE? ???? ????
12:00:06 SYS @ ORA19 >
12:00:08 SYS @ ORA19 > alter database mount;
데이타베이스가 변경되었습니다.
경 과: 00:00:04.28
12:00:21 SYS @ ORA19 > @i
STATUS
------------
MOUNTED
경 과: 00:00:00.01
💡
12:04:13 SYS @ ORA19 > shutdown abort
ORACLE 인스턴스가 종료되었습니다.
12:04:22 SYS @ ORA19 >
12:04:23 SYS @ ORA19 >
12:04:23 SYS @ ORA19 > startup mount
ORACLE 인스턴스가 시작되었습니다.
Total System Global Area 1979709008 bytes
Fixed Size 8898128 bytes
Variable Size 536870912 bytes
Database Buffers 1409286144 bytes
Redo Buffers 24653824 bytes
데이터베이스가 마운트되었습니다.
12:04:35 SYS @ ORA19 >
12:04:37 SYS @ ORA19 > @i
STATUS
------------
MOUNTED
12:04:39 SYS @ ORA19 > alter database open;
데이타베이스가 변경되었습니다.
경 과: 00:00:01.01
12:05:38 SYS @ ORA19 > @i
STATUS
------------
OPEN
no mount
단계 --> parameter file 필요
mount
단계 --> control file 필요
open
단계 --> data file과 redo log file 필요
💡 data file과 redo log file이 필요함
💡 emp 테이블같이 일반 데이터도 접근이 가능한 상태가 되고 data dictionary도 접근이 가능한 상태가 됨
--> 즉, 서비스가 이뤄지는 상태가 open 단계
1. shutdown -----------> nomount
① parameter file 을 읽어서 인스턴스를 구성
② sga 가 열리고 background process 들이 기동되기 시작함
2. nomount ------------> mount
① control file 을 읽어서 mount 로 올라감
② startup 되는 모든 과정은 전부 alert log file 에 자세히 기록됨
3. mount -------------> open
① data file, redo log file을 찾습니다.
② data file, redo log file 이 둘다 완전히 열리면 open 단계가 되는 것
12:12:22 SYS @ ORA19 > show parameter db_recovery_file_dest_size
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest_size big integer 8256M
12:12:41 SYS @ ORA19 >
12:13:02 SYS @ ORA19 > alter system set db_recovery_file_dest_size=16512m scope=both;
시스템이 변경되었습니다.
경 과: 00:00:00.02
12:13:48 SYS @ ORA19 > show parameter db_recovery_file_dest_size
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /u01/app/oracle/fast_recovery_
area
db_recovery_file_dest_size big integer 16512M
12:13:56 SYS @ ORA19 > ^C
- shutdown 단계: cold backup 수행
- nomount 단계: db 생성 작업, contol file 생성 작업
- mount 단계 : 복구작업, db의 구조를 변경하는 작업
- open 단계 : 실제로 db를 제대로 사용할 수 있는 단계(서비스가 되는 단계)
shutdown -----------> nomount
① 파라미터 파일을 찾아야 nomount 로 올라갈 수 있습니다.
② $ORACLE_HOME/dbs 밑에 가서 파라미터 파일을 찾습니다.
nomount ------------> mount
① control file 이 있어야 mount 로 올라 갈수 있습니다.
② parameter file 안에 control_files 라는 파라미터에 control file 위치가 나와서
그걸 보고 control file 을 찾습니다.
① datafile , redo log file 이 있어야 open 으로 올라 갈 수 있습니다.
② datafile 과 redo log file 은 control file 안에 어디에 있는지 나와있습니다.
오라클이 controlfile 의 내용을 보고 data file ,redo log file 을 찾아서 올립니다.