自定义 RMAN 显示的日期时间格式

      缺省情况下,使用RMAN备份与恢复界面仅仅显示的是日期,而没有具体的时间。有时候需要查看具体的时间,如查看当天多个Incarnation的情形。对于这个问题,主要是设定环境变量参数NLS_DATE_FORMAT即可,如下文所描述。
  
1、RMAN日期及时间的缺省格式
        robin@SZDB:~> rman target /

        Recovery Manager: Release 10.2.0.3.0 - Production on Sat Jun 1 13:54:49 2013

        Copyright (c) 1982, 2005, Oracle.  All rights reserved.

        connected to target database: GOBO1 (DBID=733951103)

        RMAN> list incarnation;

        using target database control file instead of recovery catalog

        List of Database Incarnations
        DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
        ------- ------- -------- ---------------- --- ---------- ----------
        1       1       GOBO1    733951103        PARENT  1          18-FEB-09
        2       2       GOBO1    733951103        PARENT  79915248   20-SEP-12
        3       3       GOBO1    733951103        PARENT  80298787   31-MAY-13
        4       4       GOBO1    733951103        CURRENT 80307144   31-MAY-13

        RMAN> exit

        Recovery Manager complete.

 

2、修改环境变量对RMAN日期及时间格式进行自定义
        robin@SZDB:~> export NLS_DATE_FORMAT='yyyymmdd hh24:mi:ss';
        robin@SZDB:~> rman target /

        Recovery Manager: Release 10.2.0.3.0 - Production on Sat Jun 1 13:55:30 2013

        Copyright (c) 1982, 2005, Oracle.  All rights reserved.

        connected to target database: GOBO1 (DBID=733951103)

        RMAN> list incarnation;

        using target database control file instead of recovery catalog

        List of Database Incarnations
        DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
        ------- ------- -------- ---------------- --- ---------- ----------
        1       1       GOBO1    733951103        PARENT  1          20090218 16:43:43
        2       2       GOBO1    733951103        PARENT  79915248   20120920 15:00:44
        3       3       GOBO1    733951103        PARENT  80298787   20130531 21:03:41
        4       4       GOBO1    733951103        CURRENT 80307144   20130531 22:28:05

        --Author : Robinson
       --Blog   :
http://blog.csdn.net/robinson_0612

 

3、永久修改RMAN日期及时间格式
        最佳的办法是将该参书直接添加到.bash_profile
       
robin@SZDB:~> echo "export NLS_DATE_FORMAT='yyyymmdd hh24:mi:ss'" >> ~/.bash_profile

        补充@20141123:对于windows环境下RMAN下日期时间格式可以在Win命令行提示符下使用 set NLS_DATE_FORMAT=yyyymmdd hh24:mi:ss

 

4、相关参考
    Oracle 冷备份

    Oracle 热备份

    Oracle 备份恢复概念

    Oracle 实例恢复

    Oracle 基于用户管理恢复的处理

    SYSTEM 表空间管理及备份恢复

    SYSAUX表空间管理及恢复

    Oracle 基于备份控制文件的恢复(unsing backup controlfile)

    RMAN 概述及其体系结构

    RMAN 配置、监控与管理

    RMAN 备份详解

    RMAN 还原与恢复

    RMAN catalog 的创建和使用

    基于catalog 创建RMAN存储脚本

    基于catalog 的RMAN 备份与恢复

    RMAN 备份路径困惑

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值