Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- ogg 설치 방법
- 아카이브로그 삭제
- ogg 구성
- oracle error
- sql문 전체 출력 방법
- PostgreSQL 아키텍처
- PostgreSQL Parameter
- multitenant
- PostgreSQL Backup and Recovery
- 다른계정에서 dblink 삭제방법
- pg_dumpall
- PostgreSQL Install
- pgcrypto
- pg_basebackup
- PostgreSQL 스키마 관리
- Archive delete
- OGG
- dblink 삭제
- 19c tde
- PostgreSQL 테이블스페이스 생성 삭제
- PostgreSQL Admin
- table lock 조치 방법
- Linux
- Goldengate
- ogg-01028
- oracle
- PostgreSQL Parameter 설정 방법
- psql 복구
- sql문 짤릴 때
- db upgrade
Archives
- Today
- Total
인성장
[Oracle] Active Data Guard 구성 후, Standby DB Archive log file 관리 방법 본문
Oracle/Admin
[Oracle] Active Data Guard 구성 후, Standby DB Archive log file 관리 방법
인성장 2025. 9. 18. 16:03Acitve Data Guard 구성 후, Standby DB Archive log file 관리 방법
Oracle에서 ADG 구성 후, Standby DB 서버의 Archive log file을 주기적으로 관리(삭제) 해주지 않으면 해당 디스크 경로가 100% Full이 차는 경우가 종종 있습니다. 이미 적용(Apply)된 Archive log file을 수동으로 삭제해줘도 무방하지만, 매번 모니터링하고 관리해주기 번거롭기 때문에 스크립트화 하여 자동으로 DR 서버 Archive log file을 정리해주는 것이 좋습니다.
아래와 같이 스크립트를 참조하여 각 환경에 맞게 만들고 crontab에 등록하여 사용하시면 됩니다.
Standby DB Archive log file Automatic delete 방법
$ vi applied_rm_archive.sh
===============================================================================================
#!/bin/ksh
#
#
# Remove applied archivelog thread 1;
#
#
export ORACLE_BASE=/oracle/app/oracle
export ORACLE_HOME=/oracle/app/oracle/product/19c
export ORACLE_SID=TEST
export PATH=/usr/sbin:/usr/bin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH:$ORACLE_HOME/OPatch
tmpfile=/home/oracle/arch_id1.out
$ORACLE_HOME/bin/sqlplus -S /nolog <<EOF > $tmpfile
connect / as sysdba
set head off
set pages 0
select max(sequence#) from v\$archived_log where applied = 'YES' and thread#=1 group by thread#;
exit
EOF
echo DELETE NOPROMPT ARCHIVELOG UNTIL SEQUENCE = `head -n 1 $tmpfile | awk '{print $1}'` THREAD 1 ';' > $tmpfile
$ORACLE_HOME/bin/rman target / <<EOF > applied_archive_del.log
@$tmpfile
exit
EOF
===============================================================================================
'Oracle > Admin' 카테고리의 다른 글
[Oracle] SYS 계정에서 일반 계정 DB LINK 삭제 방법 (2) | 2025.04.29 |
---|---|
[Oracle] 멀티테넌트(Multitenant) 관리 및 사용법 (2) | 2024.09.13 |
[Oracle] Timezone Upgrade 방법 (1) | 2024.07.23 |
[Oracle] 19c TDE 구성 방법 (0) | 2024.06.19 |
[Oracle] Lock Table & Session 조치 방법 (2) | 2024.05.02 |