rman(下),rman(

來源:互聯網
上載者:User

rman(下),rman(
備份控制檔案
 
 方法一:使用RMAN的控制檔案自動備份
 configure controlfile autobackup on;
 configure controlfile autobackup off;
 
 方法二:使用使用者管理的備份
 alter database backup controlfile to 'XXX/XXX/XXX'; -- 二進位檔案
 alter database backup controlfile to trace; -- 檔案檔案
 
 方法三:使用RMAN手動備份控制檔案
 backup current controlfile format 'XXX/XXX/XXX';
 
 方法四:進行其他備份時,一同備份控制檔案
 backup datafile 5 include current controlfile;
 備份SPFILE
 backup spfile format 'XXX/XXX/SPFILEback_%s%t';
 
 將RMAN命令執行的結果寫入到一個記錄檔中
 
 方法一:(1)spool log to 'XXX/XXX/log1.txt' append;
 (2)執行RMAN命令
 (3)spool log off;
 
 方法二:(1)rman log 'XXX/XXX/log1.txt'
 
 run{
 allocate channel c1 type disk;
 sql 'alter system archive log current';
 backup
 format 'D:\backup\pitt_%U'
 archivelog all delete input;
 release channel c1;
 }
 
 如何手工刪除歸檔記錄檔?(如果採用RMNA備份後則不用手工刪除)
 一、先手工刪除歸檔記錄檔
 二、用RMAN刪除資料庫記錄的歸檔列表資訊
 1) 進入本資料庫的rman,在命令列模式輸入"rman target /",進入rman,查看提示,確認串連的是否是本庫?
 2) 查看歸檔記錄檔的狀態:
 RMAN> list archivelog all;
 3) 刪除作業系統中的記錄檔(到作業系統級進行手工刪除,也可以是第一步;
 4) 將歸檔日誌資訊進行更新;
 RMAN> crosscheck archivelog all;
 RMAN> delete expired archivelog all; (確認時鍵入"yes")
 RMAN> exit
oracle RMAN下 這句運行語句 大家可以告訴是什不

簡單說就是備份歸檔日誌

詳細說就是:
RMAN> run --開始一組命令
2> {
3> allocate channel ch1 type disk format='e:\oracle\orabak\penny%t.arc'; --備份的目的地:磁碟,路徑
4> backup archivelog all delete all input;--備份歸檔日誌,並且備份過的刪除掉
5> release channel ch1; --釋放資源
6> }
 
oracle 10G RMAN 下 backup database 都備份什檔案?

backup database備份檔案包括資料檔案、控制檔案、記錄檔和參數檔案。如果還要備份歸檔日誌要加上plus archivelog關鍵字即可。
 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.