佳木斯湛栽影视文化发展公司

主頁(yè) > 知識(shí)庫(kù) > catalog方式的rman備份與恢復(fù)示例

catalog方式的rman備份與恢復(fù)示例

熱門標(biāo)簽:服務(wù)外包 百度競(jìng)價(jià)排名 呼叫中心市場(chǎng)需求 AI電銷 Linux服務(wù)器 地方門戶網(wǎng)站 鐵路電話系統(tǒng) 網(wǎng)站排名優(yōu)化

注:catalog目錄需要專門創(chuàng)建一個(gè)用于恢復(fù)的數(shù)據(jù)庫(kù)

一、catalog備份
1、創(chuàng)建表空間

復(fù)制代碼 代碼如下:

SQL>create tablespace rman datafile 'C:\oracle\product\10.2.0\oradata\orcl\rman01.dbf' size 50M
extent management local uniform size 128K;

2、創(chuàng)建用戶
復(fù)制代碼 代碼如下:

SQL>create user rman identified by rman
default tablespace rman
temporary tablespace temp  #臨時(shí)表空間
quota unlimited on rman;

3、授權(quán)
復(fù)制代碼 代碼如下:

SQL>grant connect,resource,recovery_catalog_owner to rman;

4、創(chuàng)建恢復(fù)目錄
復(fù)制代碼 代碼如下:

C:\&;rman catalog rman/rman
RMAN>create catalog;

5、注冊(cè)需要備份的數(shù)據(jù)庫(kù)【注冊(cè)數(shù)據(jù)庫(kù)需要同時(shí)連接到目標(biāo)(target)數(shù)據(jù)庫(kù)和目錄(catalog)數(shù)據(jù)庫(kù)】
復(fù)制代碼 代碼如下:

C:\&;rman catalog rman/rman target sys/orcl
RMAN>register database;

注銷已注冊(cè)的數(shù)據(jù)庫(kù):
復(fù)制代碼 代碼如下:

RMAN>unregister database;

6、使用catalog數(shù)據(jù)庫(kù)對(duì)目標(biāo)數(shù)據(jù)庫(kù)進(jìn)行備份
復(fù)制代碼 代碼如下:

C:\&;rman catalog rman/rman target sys/orcl
RMAN>create script fullbk{      #創(chuàng)建備份腳本
backup full tag 'sys' database
include current controlfile
format 'c:\backup\sysfull_%d_%T_%s'
plus archivelog
format 'c:\backup\sysarch_%d_T_%s'
delete all input;
}
RMAN>run{execute script fullbk;}  #調(diào)用腳本

刪除腳本:
復(fù)制代碼 代碼如下:

RMAN>delete script fullbk;

二、catalog恢復(fù)
1、

復(fù)制代碼 代碼如下:

C:\&;rman catalog rman/rman target sys/orcl

2、接下來(lái)參考本博文“rman恢復(fù)方案和異機(jī)恢復(fù)”

三、catalog和nocatalog區(qū)別
1、nocatalog方式:用control file作為catalog,每一次備份都要往控制文件里面寫好多備份信息,控制文件里面會(huì)有越來(lái)越多的備份信息,即RMAN的備份信息寫在本地控制文件里面。
2、catalog方式:必須要首先要?jiǎng)?chuàng)建目錄備份數(shù)據(jù)庫(kù)(catalog,也稱知識(shí)庫(kù)),建立恢復(fù)目錄,即數(shù)據(jù)庫(kù)的備份信息寫到恢復(fù)目錄里面。
3、當(dāng)通過(guò)rman nocatalog方式備份Oracle數(shù)據(jù)庫(kù),Oracle使用controlfile存放RMAN的備份信息。因此,當(dāng)使用Rman nocatalog方式備份數(shù)據(jù)庫(kù)時(shí),一定要記得備份controlfile。
初始化參數(shù)control_file__record_keep_time設(shè)置備份信息保存時(shí)間,到規(guī)定時(shí)間就自動(dòng)清除以前的備份信息:
SQL> alter sysem set control_file_record_keep_time=7 scope=spfile;

您可能感興趣的文章:
  • rman備份腳本和rman增量備份腳本分享
  • win平臺(tái)oracle rman備份和刪除dg備庫(kù)歸檔日志腳本
  • ORACLE 數(shù)據(jù)庫(kù)RMAN備份恢復(fù)
  • rman配置及rman常用命令操作
  • rman恢復(fù)方案和oracle異機(jī)恢復(fù)
  • .NET性能調(diào)優(yōu)之一:ANTS Performance Profiler的使用介紹
  • High Performance JavaScript(高性能JavaScript)讀書筆記分析
  • Oracle RMAN快速入門指南
  • JDBCTM 指南:入門3 - DriverManager
  • linux自動(dòng)運(yùn)行rman增量備份腳本

標(biāo)簽:銅川 衡水 黃山 仙桃 湖南 崇左 蘭州 湘潭

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《catalog方式的rman備份與恢復(fù)示例》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266
    灵石县| 高青县| 宁海县| 德兴市| 宁阳县| 通山县| 内黄县| 原平市| 弥勒县| 苍山县| 旬阳县| 政和县| 南木林县| 佳木斯市| 永德县| 平顺县| 安溪县| 仁布县| 紫云| 奈曼旗| 上虞市| 慈溪市| 武城县| 华安县| 台南县| 旺苍县| 寻乌县| 集贤县| 静乐县| 房山区| 芦山县| 封丘县| 呼图壁县| 韩城市| 台山市| 微博| 齐齐哈尔市| 苗栗县| 阿瓦提县| 西乌珠穆沁旗| 陇川县|