登录  
 加关注
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

飞哥的技术博客

世上无难事,只怕有心人!

 
 
 

日志

 
 
 
 

backup中的tag的使用   

2009-06-23 20:17:33|  分类: Oracle |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

  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 >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 >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

  评论这张
 
阅读(342)| 评论(0)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018