【RMAN】rman的日誌輸出功能演示
RMAN的日誌輸出功能一般情況下很少使用,不過如果在編寫並在後臺執行比較複雜的RMAN指令碼時,為了排查錯誤,日誌功能就顯得非常重要了(當然您也可以使用shell的標準輸出功能寫日誌)。
Ok,下面演示一下這個寫日誌的過程,給大家一個感性認識
ora10g@testdb /home/oracle$ rman target / log rman_log.txt
RMAN> backup database;
RMAN> list backup summary;
RMAN> exit;
ora10g@testdb /home/oracle$ cat rman_log.txt
Recovery Manager: Release 10.2.0.1.0 - Production on Tue Jul 21 08:38:11 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORA10G (DBID=4010369505)
RMAN>
Starting backup at 21-JUL-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=134 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oracle/oradata/ora10g/system01.dbf
input datafile fno=00003 name=/oracle/oradata/ora10g/sysaux01.dbf
input datafile fno=00002 name=/oracle/oradata/ora10g/undotbs01.dbf
input datafile fno=00011 name=/oracle/oradata/ora10g/tbs_spotlight01.dbf
input datafile fno=00005 name=/oracle/oradata/ora10g/tbs_sec_d01.dbf
input datafile fno=00006 name=/oracle/oradata/ora10g/tbs_sec_i01.dbf
input datafile fno=00004 name=/oracle/oradata/ora10g/users01.dbf
input datafile fno=00012 name=/oracle/oradata/ora10g/tbs_part01.dbf
input datafile fno=00013 name=/oracle/oradata/ora10g/tbs_part02.dbf
input datafile fno=00014 name=/oracle/oradata/ora10g/tbs_part03.dbf
input datafile fno=00015 name=/oracle/oradata/ora10g/tbs_part04.dbf
input datafile fno=00016 name=/oracle/oradata/ora10g/tbs_part05.dbf
channel ORA_DISK_1: starting piece 1 at 21-JUL-09
channel ORA_DISK_1: finished piece 1 at 21-JUL-09
piece handle=/oracle/app/oracle/flash_recovery_area/ORA10G/backupset/2009_07_21/o1_mf_nnndf_TAG20090721T083821_56b3hy22_.bkp tag=TAG20090721T083821 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 21-JUL-09
channel ORA_DISK_1: finished piece 1 at 21-JUL-09
piece handle=/oracle/app/oracle/flash_recovery_area/ORA10G/backupset/2009_07_21/o1_mf_ncsnf_TAG20090721T083821_56b3k1k7_.bkp tag=TAG20090721T083821 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 21-JUL-09
RMAN>
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
1 B F A DISK 21-JUL-09 1 1 NO TAG20090721T082830
2 B F A DISK 21-JUL-09 1 1 NO TAG20090721T083821
3 B F A DISK 21-JUL-09 1 1 NO TAG20090721T083821
RMAN>
Recovery Manager complete.
ora10g@testdb /home/oracle$
ora10g@testdb /home/oracle$
發現了吧,在使用日誌輸出功能過程中,螢幕上不再輸出命令結果,所有的操作記錄均被記錄到日誌檔案rman_log.txt中。
secooler
09.07.21
-- The End --
Ok,下面演示一下這個寫日誌的過程,給大家一個感性認識
ora10g@testdb /home/oracle$ rman target / log rman_log.txt
RMAN> backup database;
RMAN> list backup summary;
RMAN> exit;
ora10g@testdb /home/oracle$ cat rman_log.txt
Recovery Manager: Release 10.2.0.1.0 - Production on Tue Jul 21 08:38:11 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORA10G (DBID=4010369505)
RMAN>
Starting backup at 21-JUL-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=134 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oracle/oradata/ora10g/system01.dbf
input datafile fno=00003 name=/oracle/oradata/ora10g/sysaux01.dbf
input datafile fno=00002 name=/oracle/oradata/ora10g/undotbs01.dbf
input datafile fno=00011 name=/oracle/oradata/ora10g/tbs_spotlight01.dbf
input datafile fno=00005 name=/oracle/oradata/ora10g/tbs_sec_d01.dbf
input datafile fno=00006 name=/oracle/oradata/ora10g/tbs_sec_i01.dbf
input datafile fno=00004 name=/oracle/oradata/ora10g/users01.dbf
input datafile fno=00012 name=/oracle/oradata/ora10g/tbs_part01.dbf
input datafile fno=00013 name=/oracle/oradata/ora10g/tbs_part02.dbf
input datafile fno=00014 name=/oracle/oradata/ora10g/tbs_part03.dbf
input datafile fno=00015 name=/oracle/oradata/ora10g/tbs_part04.dbf
input datafile fno=00016 name=/oracle/oradata/ora10g/tbs_part05.dbf
channel ORA_DISK_1: starting piece 1 at 21-JUL-09
channel ORA_DISK_1: finished piece 1 at 21-JUL-09
piece handle=/oracle/app/oracle/flash_recovery_area/ORA10G/backupset/2009_07_21/o1_mf_nnndf_TAG20090721T083821_56b3hy22_.bkp tag=TAG20090721T083821 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 21-JUL-09
channel ORA_DISK_1: finished piece 1 at 21-JUL-09
piece handle=/oracle/app/oracle/flash_recovery_area/ORA10G/backupset/2009_07_21/o1_mf_ncsnf_TAG20090721T083821_56b3k1k7_.bkp tag=TAG20090721T083821 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 21-JUL-09
RMAN>
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
1 B F A DISK 21-JUL-09 1 1 NO TAG20090721T082830
2 B F A DISK 21-JUL-09 1 1 NO TAG20090721T083821
3 B F A DISK 21-JUL-09 1 1 NO TAG20090721T083821
RMAN>
Recovery Manager complete.
ora10g@testdb /home/oracle$
ora10g@testdb /home/oracle$
發現了吧,在使用日誌輸出功能過程中,螢幕上不再輸出命令結果,所有的操作記錄均被記錄到日誌檔案rman_log.txt中。
secooler
09.07.21
-- The End --
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/519536/viewspace-609769/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RMAN刪除歸檔日誌出現RMAN-0813錯誤的處理
- rman 還原歸檔日誌(restore archivelogRESTHive
- RMAN備份整庫和歸檔日誌的方法
- oracle rman備份歸檔日誌需要先切換日誌嗎Oracle
- 使用Log4j2輸出日誌演示
- [20221121]rman刪除歸檔日誌問題.txt
- [20181010]v$rman_configuration沒有輸出.txt
- 【RMAN】RMAN的備份保留策略
- 資料遷移的時候出現RMAN-03002,RMAN-06026
- 【RMAN】RMAN備份至ASMASM
- 配置rman來自動刪除應用過的歸檔日誌
- Oracle 11G RAC複製備庫RMAN-03002 RMAN-05501 RMAN-03015 RMAN-03009 RMAN-10038Oracle
- 通過RMAN設定standby接收日誌後主庫歸檔日誌才可刪除
- RMAN-06207和RMAN-06208的處理
- ORACLE rman與RMAN-00054&ORA-09945Oracle
- RMAN(轉)
- RMAN恢復之RMAN-06555處理
- 【RMAN】Oracle rman 常用命令參考Oracle
- python如何輸出日誌?Python
- 【RMAN】在備庫執行rman備份時報錯RMAN-06820 ORA-17629
- RMAN中的通道分配
- RMAN的備份原理
- python日誌重複輸出Python
- 指令碼日誌的標準輸出指令碼
- [重慶思莊每日技術分享]-備庫使用RMAN獲得歸檔日誌
- rman備份archivelog出現ORA-19625Hive
- 【RMAN】在多租戶環境下的RMAN備份及恢復
- RMAN增量恢復
- RMAN備份概述
- oracle手工建庫後rman無法啟用(RMAN-04015)Oracle
- 案例:ADG環境遇到redo日誌member路徑有誤以及RMAN-6571錯誤
- RMAN備份恢復典型案例——RMAN備份&系統變慢
- 【RMAN】Oracle11g透過rman升級到12cOracle
- RMAN-ERROR:因為找不到過期和丟失的歸檔日誌而備份失敗Error
- 【RMAN】Oracle12c之後,rman備份Dataguard備端恢復可能出現邏輯錯誤Oracle
- RMAN 備份相關的概念
- [20190116]rman的老問題.txt
- RMAN中的 debug調式命令
- RMAN修復壞塊