修改RMAN list命令输出的时间格式

本文介绍如何通过设置NLS_DATE_FORMAT参数来修改RMAN命令输出结果中的时间显示格式,以便于更好地阅读和理解备份任务的完成时间。

根据需要,修改rman list命令输出结果的时间显示

$ rman target / 

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Jul 1 14:40:26 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: YB1 (DBID=1592461412)

RMAN> list backup;

using target database control file instead of recovery catalog

List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time     
------- ---- -- ---------- ----------- ------------ --------------------
23      Full    2.25M      DISK        00:00:03     01-JUL-2015 14:12:20
        BP Key: 23   Status: AVAILABLE  Compressed: NO  Tag: TAG20150701T141217
        Piece Name: /u01/app/oracle/fast_recovery_area/YB1/backupset/2015_07_01/o1_mf_nnndf_TAG20150701T141217_bs7161sd_.bkp
  List of Datafiles in backup set 23
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  3       Full 1062085    01-JUL-2015 14:12:17 /u01/app/oracle/oradata/yb1/undotbs01.dbf

RMAN> 

 

通过设置参数NLS_DATE_FORMAT的来设置时间格式:

$ export NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'
$ rman target / 

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Jul 1 14:40:45 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: YB1 (DBID=1592461412)

RMAN> list backup;

using target database control file instead of recovery catalog

List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
23      Full    2.25M      DISK        00:00:03     2015-07-01 14:12:20
        BP Key: 23   Status: AVAILABLE  Compressed: NO  Tag: TAG20150701T141217
        Piece Name: /u01/app/oracle/fast_recovery_area/YB1/backupset/2015_07_01/o1_mf_nnndf_TAG20150701T141217_bs7161sd_.bkp
  List of Datafiles in backup set 23
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  3       Full 1062085    2015-07-01 14:12:17 /u01/app/oracle/oradata/yb1/undotbs01.dbf

RMAN> 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值