zoukankan      html  css  js  c++  java
  • oracle设置自动清理归档日志脚本

    root用户下

    [root@localhost ~]# mkdir /nstg
    [root@localhost ~]# cd /nstg/
    [root@localhost nstg]# mkdir bin log tmp
    [root@localhost nstg]# chown -R oracle:oinstall  /nstg
    [root@localhost nstg]# su - oracle
    [oracle@localhost ~]$ cd /nstg/bin
    
     vi del_arch.sh
    #!/bin/bash
    echo "----------------------------------------`date`---------------------------------------"
    source ~/.bash_profile
    rman target / <<EOF
    crosscheck archivelog all;
    delete noprompt expired archivelog all;
    delete noprompt archivelog all completed before 'sysdate-7';
    EOF
    echo -e "
    "
    echo "------------------------------------ FINISHED ------------------------------------"
    
    [oracle@localhost bin]$ crontab -e
    
    * 1 * * *  nstg/bin/del_arc.sh 

    来源

  • 相关阅读:
    map-count
    map-count
    map-constructors
    map-constructors
    multiset-find
    multiset-find
    multiset-insert
    C++ string详解
    treap(树堆)
    程序设计语言的变革
  • 原文地址:https://www.cnblogs.com/bit-by-bit/p/8342347.html
Copyright © 2011-2022 走看看