欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

rmanconfigure命令

程序员文章站 2024-01-03 17:03:04
...

记录rman的命令,备忘 连接到目标数据库: BACK (DBID=4048592102) 连接到恢复目录数据库 RMAN 2 show all; --查看参数 RMAN 配置参数为: CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS; CONFIGURE BACKUP OPTIMIZATION ON; CONFIGURE DEFAULT DE

记录rman的命令,备忘

连接到目标数据库: BACK (DBID=4048592102)
连接到恢复目录数据库

RMAN> 2> show all; --查看参数
RMAN 配置参数为:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'd:\backup\control_%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT 'D:\BACKUP\BACKUP_%U';
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT 'D:\BACKUP\BACKUP_%U';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\SNCFBACK.ORA'; # default

介绍一下参数
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS; --备份策略,保留3天的备份
CONFIGURE RETENTION POLICY TO REDUNDANCY 7; --备份策略,保留7个备份
这两个备份策略只能两个取一,不能共存。

CONFIGURE BACKUP OPTIMIZATION ON; --备份优化打开,不知道oracle为什么不默认打开
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default --备份设备设备disk为磁盘,sbt为磁带
CONFIGURE CONTROLFILE AUTOBACKUP ON; --控制文件备份是否自动备份,意思是说备份数据库的同时是否自动备份控制文件
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'd:\backup\control_%F'; --控制文件备份的目录和格式
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET; --备份的并行度和备份压缩
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; --备份的数据文件 有几个副本
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; --备份的归档日志 有几个副本
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT 'D:\BACKUP\BACKUP_%U';
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT 'D:\BACKUP\BACKUP_%U'; --分配通道,通道的备份目录
CONFIGURE MAXSETSIZE TO UNLIMITED; # default --备份集的大小,这个还是UNLIMITED为好,因为我们总是无法估计备份集的大小
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\SNCFBACK.ORA'; # default --备份文件的镜像

上一篇:

下一篇: