backup中的tag的使用

 backup中的tag的使用
1、tag 用来给备份或者镜像做标记 tag + 标识名
 法 1、在后面
   backup as copy datafile 5  tag "datafile5";
 法 2、在前面
   backup tag "datafile5" as copy datafile 5  ;
  
2、用作筛选标识  from tag + 标识名
  backup  copy of datafile 5 from tag "datafile5";

 测试环境:
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

下面是试验证明,试验过程如下:
测试过程:
RMAN>  backup  copy of datafile 5 from tag"datafile5";
Starting backup at 22-NOV-08
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 11/22/2008 16:20:36
RMAN-06587: one or more datafilecopies were not found
RMAN-06586: no copy of datafile 5 with tag DATAFILE5 found

 

RMAN> backup as copy datafile 5  tag "datafile5";
Starting backup at 22-NOV-08
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile fno=00005 name=/opt/oracle/oradata/ge02/users01.dbf
output filename=/opt/backup1/data_D-GE02_I-1566649158_TS-USERS_FNO-5_50k0bnj1 tag=DATAFILE5 recid=70 stamp=671473512
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:25
Finished backup at 22-NOV-08
Starting Control File and SPFILE Autobackup at 22-NOV-08
piece handle=/opt/oracle/flash_recovery_area/GE02/autobackup/2008_11_22/o1_mf_s_671473514_4lhjhhgn_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 22-NOV-08


RMAN> backup tag "datafile5" as copy datafile 5 ;
Starting backup at 22-NOV-08
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile fno=00005 name=/opt/oracle/oradata/ge02/users01.dbf
output filename=/opt/backup1/data_D-GE02_I-1566649158_TS-USERS_FNO-5_54k0bopq tag=DATAFILE5 recid=71 stamp=671474757
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:35
Finished backup at 22-NOV-08
Starting Control File and SPFILE Autobackup at 22-NOV-08
piece handle=/opt/oracle/flash_recovery_area/GE02/autobackup/2008_11_22/o1_mf_s_671474766_4lhkpm12_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 22-NOV-08

 

RMAN>  backup  copy of datafile 5 from tag"datafile5";
Starting backup at 22-NOV-08
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: including datafile copy of datafile 00005 in backupset
input filename=/opt/backup1/data_D-GE02_I-1566649158_TS-USERS_FNO-5_50k0bnj1
channel ORA_DISK_1: starting piece 1 at 22-NOV-08
channel ORA_DISK_1: finished piece 1 at 22-NOV-08
piece handle=/opt/backup1/52k0bob1_1_1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:04:25
Finished backup at 22-NOV-08
Starting Control File and SPFILE Autobackup at 22-NOV-08
piece handle=/opt/oracle/flash_recovery_area/GE02/autobackup/2008_11_22/o1_mf_s_671474283_4lhk7hhb_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 22-NOV-08

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值