亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

RMAN catalog 的創建和使用

系統 2043 0

--==========================

-- RMAN catalog 的創建和使用

--==========================

?

一、創建恢復目錄

??? 創建恢復目錄一般分為三大步驟

??????? 創建存放恢復目錄的數據庫 ( 或使用已存在的數據庫 )

??????? 創建恢復目錄的的所有者

??????? 創建恢復目錄

???

??? 創建數據庫可以參考: Oralce 10g 使 用DBCA

?

??? 在存儲恢復目錄的數據庫創建表空間用于存儲恢復目錄 schema 及恢復目錄數據 ( 本文使用已經創建好的數據庫 catadb 來存儲恢復目錄 )

?

??????? SQL > create tablespace tbs_rman datafile '/u01/app/oracle/oradata/catadb/tbs_rman01.dbf' -- 創建 rman 恢復目錄表空間

??????? ? 2 ? size 200m autoextend on ; ??

??????? ?

??????? SQL > create user rman identified by rman ???? -- 創建 rman schema

??????? 2 ? temporary tablespace temp

??????? 3 ? default tablespace tbs_rman

??????? 4 ? quota unlimited on tbs_rman ;

?

??????? SQL > grant recovery_catalog_owner to rman ; ?? -- 角色授予

?

??????? SQL > conn rman / rman

???????

??????? SQL > select * from session_privs ;

?

??????? PRIVILEGE

??????? ----------------------------------------

??????? CREATE SESSION

??????? ALTER SESSION

??????? CREATE TABLE

??????? CREATE CLUSTER

??????? CREATE SYNONYM

??????? CREATE VIEW

??????? CREATE SEQUENCE

??????? CREATE DATABASE LINK

??????? CREATE PROCEDURE

??????? CREATE TRIGGER

??????? CREATE TYPE

??????? SQL > select * from session_roles ;

?

??????? ROLE

??????? ------------------------------

??????? RECOVERY_CATALOG_OWNER ?

?

??????? RMAN > connect catalog rman / rman@catadb ??? -- 連接到恢復目錄

?

??????? connected to recovery catalog database

?

??????? RMAN > create catalog tablespace tbs_rman ; ?? -- 創建恢復目錄

?

??????? recovery catalog created

?

??????? [oracle@oradb ~]$ rman target sys / redhat@orcl catalog rman / rman@catadb ?? -- 連接到目標數據庫及恢復目錄

?

??????? connected to target database : ORCL ( DBID = 1260850162 )

??????? connected to recovery catalog database

?

??????? RMAN > register database ; ????????? -- 將目標數據庫注冊到恢復目錄

?

??????? database registered in recovery catalog

??????? starting full resync of recovery catalog

??????? full resync complete

?

二、基于恢復目錄的備份 ?????

?

??? 1. 查看相關信息

??????? RMAN > list incarnation ;

?

??????? List of Database Incarnations

??????? DB Key ? Inc Key DB Name ? DB ID ??????????? STATUS ? Reset SCN ? Reset Time

??????? ------- ------- -------- ---------------- --- ---------- ----------

??????? 1 ?????? 8 ?????? ORCL ???? 1260850162 ?????? PARENT ? 1 ????????? 30 - JUN - 05

??????? 1 ?????? 2 ?????? ORCL ???? 1260850162 ?????? CURRENT 446075 ???? 22 - OCT - 10

?

??? ??? ----------------------------------------------------------------------------------------------------

?

??????? RMAN > crosscheck copy ; ???????? -- 校驗 copy

??????? RMAN > delete expired copy ; ???? -- 刪除過期的 copy

?

??? 2. 全備

??????? RMAN > run{

??????? 2 > allocate channel ch1 device type disk ;

??????? 3 > ? backup as compressed backupset

??????? 4 > database plus archivelog delete input

??????? 5 > format = '/u01/app/oracle/bk/rmbk/Whole_%d_%U'

??????? 6 > ? tag = 'Whole_bak' ;

??????? 7 > release channel ch1 ;}

?

??? 3. 增量備份 ( 0 )

??????? RMAN > run{

??????? 2 > allocate channel ch1 device type disk ;

??????? 3 > allocate channel ch2 device type disk ;

??????? 4 > backup as compressed backupset

??????? 5 > incremental level 0

??????? 6 > database plus archivelog delete input

??????? 7 > format = '/u01/app/oracle/bk/rmbk/Inc_0_%d_%U'

??????? 8 > tag = 'Inc_0' ;

??????? 9 > release channel ch1 ;

??????? 10 > release channel ch2 ;} ??

?

??????? RMAN > list backup summary ;

?

??? 4. 增量備份 ( 1 )

??????? RMAN > run{ ?????????????????????????????????

??????? 2 > allocate channel ch1 device type disk ;

??????? 3 > allocate channel ch2 device type disk ;

??????? 4 > backup as compressed backupset

??????? 5 > incremental level 1 database

??????? 6 > format = '/u01/app/oracle/bk/rmbk/Inc_1_%d_%U'

??????? 7 > tag = 'Inc_1' ;

??????? 8 > release channel ch1 ;

??????? 9 > release channel ch2 ;}

?

??????? RMAN > list backup by file ;

?

??? 5. 累計增量備份 ( 1 )

??????? RMAN > run{

??????? 2 > allocate channel ch1 device type disk ;

??????? 3 > backup as compressed backupset

??????? 4 > incremental level 1 cumulative database

??????? 5 > format '/u01/app/oracle/bk/rmbk/Cum_1_%d_%U'

??????? 6 > tag = 'Cum_1' ;

??????? 7 > release channel ch1 ;}

?

??? 6. 備份表空間

??????? RMAN > run{

??????? 2 > allocate channel ch1 device type disk ;

??????? 3 > backup as compressed backupset

??????? 4 > tablespace users , example

??????? 5 > format = '/u01/app/oracle/bk/rmbk/tbs_%d_%U'

??????? 6 > tag = 'tbs' ;

?

??????? RMAN > list backupset tag = tbs ;

?

??? 7. 備份數據文件

??????? RMAN > run{

??????? 2 > allocate channel ch1 device type disk ;

??????? 3 > backup as compressed backupset

??????? 4 > datafile 3

??????? 5 > format = '/u01/app/oracle/bk/rmbk/df_%d_%U'

??????? 6 > tag = 'df' ;

??????? 7 > release channel ch1 ;}

?

??? 8. 備份歸檔日志

??????? 備份歸檔日志前,建議先使用 crosscheck 校驗一下

??????? crosscheck 通常用于檢查備份是否被刪除,如果刪除將會打上刪除標簽

??????? RMAN > crosscheck archivelog all;

?

??????? allocated channel: ORA_DISK_1

??????? channel ORA_DISK_1: sid=148 devtype=DISK

??????? validation succeeded for archived log

??????? archive log filename=/u01/app/oracle/oradata/orcl/arch/log_1_117_733069427.arc recid=111 stamp=733171369

??????? Crosschecked 1 objects

?

??????? RMAN > sql 'alter system switch logfile' ;

?

??????? sql statement : alter system switch logfile

?

??????? RMAN > sql 'alter system switch logfile' ;

?

??????? sql statement : alter system switch logfile

?

??????? RMAN > list archivelog all;

?

??????? List of Archived Log Copies

??????? Key ???? Thrd Seq ???? S Low Time ? Name

??????? ------- ---- ------- - --------- ----

??????? 465 ???? 1 ??? 117 ???? A 22 - OCT - 10 / u01 / app / oracle / oradata / orcl / arch / log_1_117_733069427 . arc

??????? 553 ???? 1 ??? 118 ???? A 23 - OCT - 10 / u01 / app / oracle / oradata / orcl / arch / log_1_118_733069427 . arc

??????? 569 ???? 1 ??? 119 ???? A 23 - OCT - 10 / u01 / app / oracle / oradata / orcl / arch / log_1_119_733069427 . arc

???????????????????????????????????????????????????????????????????????????????????????????????????????????????

??? 9. 基于 SCN 來備份歸檔日志

??????? RMAN > run{

??????? 2 > allocate channel ch1 device type disk ;

??????? 3 > backup as compressed backupset

??????? 4 > archivelog from scn 848043

??????? 5 > format = '/u01/app/oracle/bk/rmbk/arc_%d_%U'

??????? 6 > tag = 'arc' ;

??????? 7 > release channel ch1 ;

??????? 8 > }

?

??? 10. 鏡像備份

??????? RMAN > run{

??????? 2 > allocate channel ch1 device type disk ;

??????? 3 > backup as copy datafile 1 , 4

??????? 4 > format '/u01/app/oracle/bk/rmbk/df_%d_%U'

??????? 5 > tag 'copybak' ;

??????? 6 > release channel ch1 ;}

???

??? 11. 其它

??????? RMAN > crosscheck backupset ;

?

??????? RMAN > change backupset 1

?

??????? RMAN > validate backupset

?

??????? RMAN > validate backupset 635 ;

???

??? 12. 基于 catalog 的數據庫恢復請參考:基于 catalog RMAN 備份與恢復

???

三、更多參考

有關基于用戶管理的備份和備份恢復的概念請參考:

??????? Oracle 冷備份

??????? Oracle 熱備份

??????? Oracle 備份恢復概念

??????? Oracle 實例恢復

??????? Oracle 基于用戶管理恢復的處理 ( 詳細描述了介質恢復及其處理 )

???????

??? 有關 RMAN 的恢復與管理請參考:

??????? RMAN 概述及其體系結構

??????? RMAN 配置、監控與管理

??????? RMAN 備份詳解

??????? RMAN 還原與恢復

???????

??? 有關 Oracle 體系結構請參考:

??????? Oracle 實例和Oracle 數據庫(Oracle 體系結構)

??????? Oracle 表空間與數據文件

??????? Oracle 密碼文件

??????? Oracle 參數文件

Oracle 數據庫實例啟動關閉過程

??????? Oracle 聯機重做日志文件(ONLINE LOG FILE)

??????? Oracle 控制文件(CONTROLFILE)

??????? Oracle 歸檔日志

?

RMAN catalog 的創建和使用


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 欧美破处在线 | 日本香蕉视频在线观看 | 国产精品入口麻豆 | 日本高清影院 | 国产免费播放 | 欧美成人综合视频 | 久久久窝窝午夜精品 | 欧美成人香蕉在线观看 | 国产免费成人在线视频 | 精品99视频| 色老头xxxwww作爱视频 | 操亚洲 | 婷婷综合色 | 伊人天天躁夜夜躁狠狠 | 国产成人亚洲精品乱码在线观看 | 亚洲精品另类 | 国产精品久久久久久久久久免费 | 久久久久久综合一区中文字幕 | 美女一级毛片免费不卡视频 | 香蕉久久精品 | 国产日韩欧美精品一区 | 免费观看一级特黄三大片视频 | 天天干天天舔天天射 | 久久精品国产精品亚洲精品 | 日日干日日摸 | 99久久精品免费精品国产 | 欧美精品一区二区三区观 | 欧美一级毛片免费大全 | 久久综合中文字幕一区二区三区 | 欧美人成一本免费观看视频 | 精品一区精品二区 | 在线婷婷 | 国产波波社区精品视频 | 天天干天天射天天爽 | 免费福利视频在线观看 | 亚洲最新视频在线观看 | 国内夫妇精品对白在线播放 | 99爱在线精品视频网站 | 美女洗澡一级毛片 | 一级欧美一级日韩毛片99 | 日本高清免费不卡视频 |