Oracle rman configure 常用配置

來源:互聯網
上載者:User

1 顯示當前的配置資訊
===========================
1.01 RMAN> show all;
1.02 查詢RMAN設定中非預設值:
SQL> select name,value from v$rman_configure;  -- 11G以前
SQL> SELECT CONF#,NAME,VALUE FROM RC_RMAN_CONFIGURATION;
    CONF# NAME                    VALUE
---------- ---------------------------------------- ----------------------------------------------------------------------------------------------

    1 RETENTION POLICY                TO REDUNDANCY 1
    2 CHANNEL                        DEVICE TYPE DISK FORMAT '/u01/app/Oracle/backup_rman/%t_%s_%p.bk'

2. 常用的configure選項
===========================
2.01 儲存策略 (retention policy)
configure retention policy to recovery window of 3 days;
configure retention policy to redundancy 3;
configure retention policy clear;
 

備份策略保持
分為兩個保持策略,一個是時間策略,決定至少有一個備份能恢複到指定的日期,一個冗餘策略,規定至少有幾個冗餘的備份。
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 5 DAYS;
CONFIGURE RETENTION POLICY TO REDUNDANCY 5;
CONFIGURE RETENTION POLICY TO NONE;
在第一個策略中,是保證至少有一個備份能恢複到Sysdate-5 的時間點上,之前的備份將標記為Obsolete。第二個策略中說明至少需要有三個冗餘的備份存在,如果多餘三個備份以上的備份將標記為冗餘。NONE 可以把使備份保持策略失效,Clear 將恢複預設的保持策略

2.02 備份最佳化 backup optimization
configure backup optimization on;
configure backup optimization off;
configure backup optimization clear;

2.03 預設裝置 default device type
configure default device type to disk;
configure default device type to stb;
configure default device type clear;

2.04 控制檔案 controlfile
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to ''/cfs01/backup/conf/conf_%F'';
configure controlfile autobackup clear;
configure controlfile autobackup format for device type disk clear;
configure snapshot controlfile name to ''/cfs01/backup/snapcf/scontrofile.snp'';
configrue snapshot controlfile name clear;

2.05 並行數(通道數) device type disk|stb pallelism n;
configure device type disk|stb parallelism 2;
configure device type disk|stb clear;
configure channel device type disk format ''e/:rmanback_%U'';
configure channel device type disk maxpiecesize 100m
configure channel device type disk rate 1200K
configure channel 1 device type disk format ''e/:rmanback_%U'';
configure channel 2 device type disk format ''e/:rmanback_%U'';
configure channel 1 device type disk maxpiecesize 100m

2.06 產生備份副本 datafile|archivelog backup copies
configure datafile backup copies for device type disk|stb to 3;
configure archivelog backup copies for device type disk|stb to 3;
configure datafile|archivelog backup copies for device type disk|stb clear
BACKUP DEVICE TYPE DISK DATABASE
FORMAT ''/disk1/backup/%U'', ''/disk2/backup/%U'', ''/disk3/backup/%U'';

2.07 排除選項 exclude
configure exclude for tablespace ''users'';
configrue exclude clear;

2.08 備份組大小 maxsetsize
configure maxsetsize to 1G|1000M|1000000K|unlimited;
configure maxsetsize clear;

2.09 其它選項 auxiliary
CONFIGURE AUXNAME FOR DATAFILE 1 TO ''/oracle/auxfiles/aux_1.f'';
CONFIGURE AUXNAME FOR DATAFILE 2 TO ''/oracle/auxfiles/aux_2.f'';
CONFIGURE AUXNAME FOR DATAFILE 3 TO ''/oracle/auxfiles/aux_3.f'';
CONFIGURE AUXNAME FOR DATAFILE 4 TO ''/oracle/auxfiles/aux_4.f'';
-
CONFIGURE AUXNAME FOR DATAFILE 1 CLEAR;
CONFIGURE AUXNAME FOR DATAFILE 2 CLEAR;
CONFIGURE AUXNAME FOR DATAFILE 3 CLEAR;
CONFIGURE AUXNAME FOR DATAFILE 4 CLEAR;

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.