글
백업대상
만약을 위해 백업을 받아야 하는 파일들이 있다.
필수적으로 백업을 받아놓아야 하는 파일은
Data files , Redo log files , Control files
선택적인 파일은
Parameter file , Password file , sqlnet.ora , listener.ora , tnsnames.ora 파일 등.
Datafile 조회
set line 200
col name for a50
select name , status from v$datafile;
Controlfile 조회
col name for a60
select name from v$controlfile;
Redo log file 조회
!vi log.sql
set line 200
col group# for 999
col mb for 999
col member for a45
col seq# for 999
col status for a8
col arc for a5
select a.group#,a.member,b.bytes/1024/1024 MB,b.sequence# "SEQ#",b.status , b.archived "ARC" from v$logfile a, v$log b where a.group#=b.group# order by 1,2
'Backup&Recovery' 카테고리의 다른 글
Controlfile 장애복구 (0) | 2015.04.14 |
---|---|
닫힌백업(cold backup / closed backup) (0) | 2015.04.13 |
Archive log 압축하여 저장공간 줄이기 (0) | 2015.04.13 |
Archive Log mode 로 변경하기 (0) | 2015.04.13 |
Archive Hang 해결 (0) | 2015.04.13 |
글
Archive log 압축하여 저장공간 줄이기
기본값은 사용안함 disable 이다.
DB 오픈 상태에서
select archivelog_compression from v$database;
alter database archivelog compress enable; or disable;
※ 일반적으로 압축률 50%
데이터 복제 솔루션 사용시 (DataGuard 등) 이 기능으로 인해 문제 발생 가능.
'Backup&Recovery' 카테고리의 다른 글
닫힌백업(cold backup / closed backup) (0) | 2015.04.13 |
---|---|
백업대상 (0) | 2015.04.13 |
Archive Log mode 로 변경하기 (0) | 2015.04.13 |
Archive Hang 해결 (0) | 2015.04.13 |
실습 전 디스크 추가하기 (리눅스 디스크추가) (0) | 2015.04.13 |
글
Archive Log mode 로 변경하기
<순서>
파라미터 파일 수정 -> DB 종료 -> startup mount; -> mode 변경 -> DB 오픈
show parameter spfile;
spfile 의 경우
alter system set log_archive_dest_1='location=/data/arc1' scope=spfile;
alter system set log_archive_dest_1='location=/data/arc2' scope=spfile;
alter system set log_archive_format="%s_%t_%r.arc" scope=spfile;
pfile 의 경우 아래 내용 추가
vi $ORACLE_HOME/dbs/initSID.ora
log_archive_start=true -> 9i 까지만 사용하고 10g 이상 버전에서는 절대 쓰면 안된다.
log_archive_dest_1='location=/data/arc1'
log_archive_dest_1='location=/data/arc2'
log_archive_format=%s_%t_%r.arc
shutdown immediate;
startup mount;
archive log list;
alter database archivelog;
alter database open;
alter system switch logfile;
/
/
!ls /data/arc2
아카이브 파일 생성 확인
'Backup&Recovery' 카테고리의 다른 글
닫힌백업(cold backup / closed backup) (0) | 2015.04.13 |
---|---|
백업대상 (0) | 2015.04.13 |
Archive log 압축하여 저장공간 줄이기 (0) | 2015.04.13 |
Archive Hang 해결 (0) | 2015.04.13 |
실습 전 디스크 추가하기 (리눅스 디스크추가) (0) | 2015.04.13 |