oracle环境变量配置教程,Oracle认证专家视频教程-OCP全套教程之学习笔记-RMAN环境变量配置...

知识要点

显示环境变量

保留策略

并行设置

冗余备份

优化

压缩

RUN语句使用

显示环境变量

RMAN> show all;

RMAN configuration parameters for database with db_unique_name SKY2 are:

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 10 DAYS;

CONFIGURE BACKUP OPTIMIZATION OFF; # default

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

CONFIGURE CONTROLFILE AUTOBACKUP ON;

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE MAXSETSIZE TO UNLIMITED; # default

roduct/11.2.0/dbhome_1/dbs/snapcf_

基础配置

保留策略

–备份文件保留10天

configure retention policy to recovery window of 10 days;

–冗余度是2

CONFIGURE RETENTION POLICY TO redundancy 2;

自动备份控制文件

-控制文件在数据库结构发生变化的时候会改变

–可以在RMAN中定义控制文件自动备份

configure controlfile autobackup on;

create tablespace u02 datafile ‘/u01/app/oracle/oradata/sky2/u02’ size 50m;

drop tablespace u2 including contents and datafiles;

list backup of controlfile;

并行设置

CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;

基于冗余的备份

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 2; # default

–定义通道

configure channel 1 device type disk format ‘/u01/%U’,’/u01/app/%U’;

–把OMF定义的db_recovery_file_dest置为空

alter system set db_recovery_file_dest=”;

优化

CONFIGURE BACKUP OPTIMIZATION ON;

压缩

CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;

加密备份

CONFIGURE ENCRYPTION FOR DATABASE ON;

RUN语句的使用

定义两个通道

run

{

allocate channel a1 type disk;

allocate channel a2 type disk;

backup database;

release channel a1;

release channel a2;

}

可以放在文件中,如a.bak

rman target / @a.bak

定义单个备份片的最大大小

run

{

allocate channel a1 type disk maxpiecesize 1g;

allocate channel a2 type disk maxpiecesize 1g;

backup database;

release channel a1;

release channel a2;

}

定义一个备份集包含的文件数

run

{

allocate channel a1 type;

allocate channel a2 type;

backup database filesperset 3;

release channel a1;

release channel a2;

}

检查备份

crosscheck backup;

删除到期

delete expired backup;

delete noprompt expired backup;

删除无效和retention有关

delete obsolete;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值