专家们,我有 Oracle 数据库 11g 版本 11.2.0.3.0 - 具有真正应用集群和自动存储管理的 64 位生产。
操作系统是 Linux Red Hat 2.6.18-348.12.1.el5。
数据库名称:dbname
数据库大小约为 92 GB。
使用 RMAN 执行备份大约需要 4 小时 45 分钟才能完成任务,并损坏与数据库交互的其他进程的正确执行。
这些表每天每时每刻都有很多 DML(udpate/insert/delete)。
我在 rman 日志中看到了两个批评时刻:
Starting backup at 04-04-2017 04:33:59
channel dbname_backup_disk1: starting incremental level 1 datafile backup set
channel dbname_backup_disk1: specifying datafile(s) in backup set
input datafile file number=00017 name=file_name ....
... "here all files"
channel dbname_backup_disk1: starting piece 1 at 04-04-2017 04:34:00
channel dbname_backup_disk1: finished piece 1 at 04-04-2017 07:22:47
piece handle=+RECOVERY/dbname/backupset/2017_04_04/nnndn1_dbname_level_0_0.2614.940394043 tag=DBNAME_LEVEL_0 comment=NONE
channel dbname_backup_disk1: backup set complete, ***elapsed time: 02:48:48***
和:
Starting backup at 04-04-2017 07:46:20
backup will be obsolete on date 04-07-2017 07:46:20
archived logs required to recover from this backup will expire when this
backup expires
channel dev1: starting compressed full datafile backup set
channel dev1: starting piece 1 at 04-04-2017 07:46:21
channel dev1: finished piece 1 at 04-04-2017 09:22:07
piece handle=/backup/oracle/backup/DBNAME_940405581_6656_1 tag=TAG20170404T074620 comment=NONE
channel dev1: backup set complete, ***elapsed time: 01:35:46***
Finished backup at 04-04-2017 09:22:07
请帮助我找到减少所用时间的关键。谢谢
下面的行是主脚本的一部分,称为 backup.pl。每天凌晨 2:30(UTC -3)从 crontab 执行。
RMAN> run {
show all;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
configure controlfile autobackup on;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '+RECOVERY/DBTARGET/%F';
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '+RECOVERY/DBTARGET/%d_%t_%s_%p';
allocate channel dbname_backup_disk1 device type disk;
REPORT OBSOLETE;
DELETE OBSOLETE;
recover copy of database with tag 'dbname_LEVEL_0' until time 'sysdate-1';
backup incremental level 1 cumulative copies=1 for recover of copy with tag 'dbname_LEVEL_0' database include current controlfile;
backup archivelog all not backed up format '+RECOVERY/DBTARGET/%d_%t_s%s_s%p';
backup current controlfile for standby;
delete archivelog until time='sysdate-3';
release channel dbtarget_backup_disk1;
sql "create pfile=''/backup/oracle/backup/ros1or01-initdbtarget1-20170404.ora'' from spfile";
}
allocate channel for maintenance type disk;
delete noprompt obsolete device type disk;
CROSSCHECK BACKUP;
CROSSCHECK DATAFILECOPY ALL;
CHANGE ARCHIVELOG ALL CROSSCHECK;
DELETE EXPIRED ARCHIVELOG ALL;
REPORT OBSOLETE;
DELETE OBSOLETE;
release channel;
run
{
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backup/oracle/backup/%F';
allocate channel dev1 device type disk format '/backup/oracle/backup/%d_%t_%s_%p';
backup backupset completed after 'sysdate-3/24';
backup as compressed backupset datafilecopy all noduplicates KEEP UNTIL TIME 'SYSDATE+3' logs;
release channel dev1;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '+RECOVERY/DBTARGET/%F';
}
quit
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name DBTARGET are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 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 '+RECOVERY/DBTARGET/%F';
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 CHANNEL DEVICE TYPE DISK FORMAT '+RECOVERY/DBTARGET/%d_%t_%s_%p';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/cots/oracle/11.2.0/dbhome_1/dbs/snapcf_dbtarget1.f'; # default
先谢谢了