zoukankan      html  css  js  c++  java
  • oracle 备份脚本

    [oracle@testdb nfs]$ cat rman_level0.sh
    #!/bin/bash
    source ~/.bash_profile
    rman target / nocatalog log /home/oracle/nfs/rman_full.log append << EOF
    run
    {allocate channel c1 type disk;
    allocate channel c2 type disk;
    allocate channel c3 type disk;
    backup  filesperset 3 as compressed backupset database format '/home/oracle/nfs/full_data_%d_%T_%s_%p';
    sql 'alter system archive log current';
    sql 'alter system archive log current';
    sql 'alter system archive log current';
    sql 'alter system archive log current';
    sql 'alter system archive log current';
    backup archivelog all format '/home/oracle/nfs/arch_%d_%T_%s_%p' delete input;
    backup current controlfile format '/home/oracle/nfs/ctl_%d_%T_%s_%p';
    }
    EOF
    rman target / nocatalog log /home/oracle/nfs/rman_delete.log append << EOF
      allocate channel for maintenance type disk; 
      crosscheck backup; 
      crosscheck archivelog all; 
      delete noprompt expired backup; 
      crosscheck copy; 
      delete noprompt  obsolete;
    EOF

  • 相关阅读:
    混杂模式
    消息队列学习
    item21
    消息队列改写
    socket select模型
    EffectiveC++ Item11
    How to read a PCap file from Wireshark with C++
    winsock select学习
    线程安全与可重入函数
    process explorer 查看句柄或者加载的dll
  • 原文地址:https://www.cnblogs.com/ss-33/p/8706619.html
Copyright © 2011-2022 走看看