- 最后登录
- 2014-7-8
- 在线时间
- 38 小时
- 威望
- 41
- 金钱
- 420
- 注册时间
- 2011-10-18
- 阅读权限
- 10
- 帖子
- 45
- 精华
- 0
- 积分
- 41
- UID
- 56
|
1#
发表于 2012-7-19 17:14:31
|
查看: 6610 |
回复: 6
hpux 11.23
oracle 9208 rac
情况是这样的:一套RAC,以前无备份无归档,现在要改为归档,定期做全备和增量,现在已经做完了0级备份,需要做1级增量,(很多年前这套系统在归档与不归档,备份与不备份之间折腾过很多次,所以有很多遗留的日志,备份等文件)我想把以前那些过期日志及备份都清除掉,当尝试下面操作时出现了下面的问题:
RMAN> delete obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 15 days
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: sid=73 devtype=SBT_TAPE
channel ORA_SBT_TAPE_1: NMO v4.1.0.0
allocated channel: ORA_SBT_TAPE_2
channel ORA_SBT_TAPE_2: sid=41 devtype=SBT_TAPE
channel ORA_SBT_TAPE_2: NMO v4.1.0.0
using channel ORA_DISK_1
using channel ORA_DISK_2
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 15153 07-11?-06
Backup Piece 15153 07-11?-06 /hddms1_15223_1/
Backup Set 15154 07-11?-06
Backup Piece 15154 07-11?-06 /hddms1_15221_1/
Backup Set 15155 07-11?-06
Backup Piece 15155 07-11?-06 /hddms1_15224_1/
Backup Set 15156 07-11?-06
Backup Piece 15156 07-11?-06 /NMO_c-3649627009-20061107-06/
Backup Set 15162 07-11?-06
Backup Piece 15162 07-11?-06 /NMO_c-3649627009-20061107-07/
Backup Set 15168 07-11?-06
Backup Piece 15168 07-11?-06 /NMO_c-3649627009-20061107-08/
Backup Set 15174 07-11?-06
Backup Piece 15174 07-11?-06 /NMO_c-3649627009-20061107-09/
Backup Set 15180 07-11?-06
......
Backup Set 16091 03-4? -07
Backup Piece 16091 03-4? -07 /hddms1_arch_16195_1/
Backup Set 16092 03-4? -07
Backup Piece 16092 03-4? -07 /hddms1_arch_16197_1/
Backup Set 16094 03-4? -07
Backup Piece 16094 03-4? -07 /NMO_c-3649627009-20070403-05/
Backup Set 16100 10-4? -07
Backup Piece 16100 10-4? -07 /NMO_c-3649627009-20070410-00/
Do you really want to delete the above objects (enter YES or NO)? YES
Killed
等了很长时间也没啥反应,观察alert日志也没有写入任何东西,最后把进程给kill掉了。
执行 RMAN> delete noprompt expired backup;时一样会卡住,如下:
RMAN> delete backupset 16106;
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: sid=156 devtype=SBT_TAPE
channel ORA_SBT_TAPE_1: NMO v4.1.0.0
allocated channel: ORA_SBT_TAPE_2
channel ORA_SBT_TAPE_2: sid=155 devtype=SBT_TAPE
channel ORA_SBT_TAPE_2: NMO v4.1.0.0
using channel ORA_DISK_1
using channel ORA_DISK_2
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
16106 16106 1 1 AVAILABLE SBT_TAPE /NMO_c-3649627009-20070410-01/
Do you really want to delete the above objects (enter YES or NO)? yes
user interrupt received
user interrupt received
user interrupt received
user interrupt received
user interrupt received
Killed
这是为什么呢?
我尝试不管这些东西继续做增量备份,记录如下日志:
Recovery Manager: Release 9.2.0.8.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: HDDMS (DBID=3649627009)
using target database controlfile instead of recovery catalog
RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13>
Starting backup at 18-7M-TM-B -12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=175 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=206 devtype=DISK
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00039 name=/dev/vg01/rbck1_15g_indx.ora
input datafile fno=00006 name=/dev/vg01/rindx01.dbf
input datafile fno=00027 name=/dev/vg03/rpmis_dc.ora
input datafile fno=00030 name=/dev/vg03/rbck3_10g_2.ora
input datafile fno=00041 name=/dev/vg02/rbck2_10g_base.ora
input datafile fno=00044 name=/dev/vg01/rbck1_10g_1.ora
input datafile fno=00046 name=/dev/vg03/rbck3_10g_5.ora
input datafile fno=00002 name=/dev/vg01/rundodbs01.dbf
input datafile fno=00001 name=/dev/vg01/rsystem01.dbf
input datafile fno=00016 name=/dev/vg02/rpmis_log.ora
input datafile fno=00031 name=/dev/vg03/rbck3_5g_1.ora
input datafile fno=00034 name=/dev/vg03/rbck3_5g_3.ora
input datafile fno=00015 name=/dev/vg02/rpmis_web.ora
input datafile fno=00018 name=/dev/vg02/rpmis_gg.ora
input datafile fno=00020 name=/dev/vg02/rpmis_sd.ora
input datafile fno=00022 name=/dev/vg02/rpmis_bh.ora
input datafile fno=00024 name=/dev/vg02/rpmis_tx.ora
input datafile fno=00026 name=/dev/vg02/rpmis_zdh.ora
input datafile fno=00036 name=/dev/vg03/rbck3_1g_2.ora
input datafile fno=00038 name=/dev/vg03/rbck3_1g_4.ora
input datafile fno=00004 name=/dev/vg01/rdrsys01.ora
input datafile fno=00007 name=/dev/vg01/rodm01.ora
input datafile fno=00010 name=/dev/vg01/ruser01.ora
channel ORA_DISK_1: starting piece 1 at 18-7M-TM-B -12
channel ORA_DISK_2: starting incremental level 1 datafile backupset
channel ORA_DISK_2: specifying datafile(s) in backupset
input datafile fno=00042 name=/dev/vg03/rbck3_20g_dc.ora
input datafile fno=00014 name=/dev/vg02/rpmis_allblobs.ora
input datafile fno=00029 name=/dev/vg03/rbck3_10g_1.ora
input datafile fno=00040 name=/dev/vg02/rbck2_10g_allblobs.ora
input datafile fno=00043 name=/dev/vg03/rbck3_10g_4.ora
input datafile fno=00045 name=/dev/vg01/rbck1_10g_2.ora
input datafile fno=00033 name=/dev/vg03/rbck3_10g_3.ora
input datafile fno=00009 name=/dev/vg01/rundodbs02.dbf
input datafile fno=00012 name=/dev/vg02/rpmis_base.ora
input datafile fno=00028 name=/dev/vg01/rbck1_5g_1.ora
input datafile fno=00032 name=/dev/vg03/rbck3_5g_2.ora
input datafile fno=00013 name=/dev/vg02/rpmis_users.ora
input datafile fno=00017 name=/dev/vg02/rpmis_sb.ora
input datafile fno=00019 name=/dev/vg02/rpmis_dd.ora
input datafile fno=00021 name=/dev/vg02/rpmis_yf.ora
input datafile fno=00023 name=/dev/vg02/rpmis_sc.ora
input datafile fno=00025 name=/dev/vg02/rpmis_zh.ora
input datafile fno=00035 name=/dev/vg03/rbck3_1g_1.ora
input datafile fno=00037 name=/dev/vg03/rbck3_1g_3.ora
input datafile fno=00003 name=/dev/vg01/rcwmlite01.ora
input datafile fno=00005 name=/dev/vg01/rexample01.ora
input datafile fno=00008 name=/dev/vg01/rtools01.ora
input datafile fno=00011 name=/dev/vg01/rxdb01.ora
channel ORA_DISK_2: starting piece 1 at 18-7M-TM-B -12
日志输出一直等在这里,没有其它的输出了,等大概20分钟后依然如此,检查相应的增量备份目录依然没有备份产生。请问这会是什么原因?
增量备份的脚本如下:
#!/usr/bin/sh
# user env
export BACK_DATE=`date +%Y%m%d`
export BACKUP_PATH=/backups
export BACKUP_PATH2=/archivelog1
export BACKUP_PATH3=/archivelog2
rman target / nocatalog msglog=$BACKUP_PATH/log/level1_$BACK_DATE.log << EOF
run {
backup incremental level 1 format '$BACKUP_PATH/level1_%s_%p_%t' database;
allocate channel a2 device type disk format '$BACKUP_PATH2/level1_%s_%p_%t' connect hddms1;
allocate channel a3 device type disk format '$BACKUP_PATH3/level1_%s_%p_%t' connect hddms2;
backup archivelog all delete all input;
crosscheck backup;
delete noprompt expired backup;
report obsolete;
delete noprompt obsolete;
release channel a2;
release channel a3;
sql 'alter system switch logfile';
}
exit
EOF
RMAN的设置:
RMAN> show all;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 15 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '/NMO_%F/';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'DISK' TO '/u01/cf_back/cf_%F_%d_%T.bak';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2;
CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/arch/snap_rac.cf'; |
|