Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
SQL> archive log list
Database log mode	       Archive Mode
Automatic archival	       Enabled
Archive destination	       USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     613
Next log sequence to archive   615
Current log sequence	       615

5. Ensure the archive log files are managed and not filling up. 

a. Logon as root and cd to /usr/local/bin

No Format
su - 
cd /usr/local/bin

b. Download an archive management script from the dbvisit.com website named del_arch.sh

No Format
[root@source bin]# wget http://ww2.dbvisit.com/download/files/external/del_arch.sh
--2013-12-23 01:13:17--  http://ww2.dbvisit.com/download/files/external/del_arch.sh
Resolving ww2.dbvisit.com... 67.222.54.241
Connecting to ww2.dbvisit.com|67.222.54.241|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1822 (1.8K) [application/x-sh]
Saving to: `del_arch.sh'
100%[================================================================================================================>] 1,822       --.-K/s   in 0s      
2013-12-23 01:13:18 (104 MB/s) - `del_arch.sh' saved [1822/1822]

c. Make it executable and change ownership to oracle

No Format
[root@source bin]# chmod 750 del_arch.sh 
[root@source bin]# chown oracle:dba del_arch.sh 
[root@source bin]# exit

d. As user oracle, add it to the oracle crontab. Run it every 15 minutes and delete all archives older than 4.8 hours (0.2 days)

No Format
crontab -e
*/15 * * * * /usr/local/bin/del_arch.sh orcl 0.2 > /tmp/del_arch.txt 2>&1