亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

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

 更新時(shí)間:2014年03月14日 16:11:57   作者:  
這篇文章主要介紹了catalog方式的rman備份與恢復(fù),需要的朋友可以參考下

注: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;

相關(guān)文章

最新評(píng)論