How to delete the archive log script that has been applied by dg
This article mainly introduces how to delete the archive log script that has been applied by dg, which has a certain reference value. Interested friends can refer to it. I hope you will learn a lot after reading this article. Let's take a look at it.
#! / bin/bash
# by ray
# 2017-08-30
# v0.1
. ~ / .bash_profile
# get sequence id that have applied.
[- e / home/oracle/.applied_archivelog.txt] & & rm-f / home/oracle/.applied_archivelog.txt
Sqlplus-s / nolog / home/oracle/log/delete_archivelog.log; exit 1)
Logfile=/home/oracle/log/delete_archivelog_ `date +% Y% m% dmurf% H% M% S`.log
Rman target / log $logfile append