zoukankan      html  css  js  c++  java
  • 修改RMAN list命令输出的时间格式

    根据需要,修改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> 
  • 相关阅读:
    centos7: 将nginx,php-fpm加入开机启动
    centos7: php7.2.9安装配置
    centos7: nginx安装配置
    linux编译安装mysql5.1.x
    docker删除镜像的时候报错--image has dependent child images
    数据库sql优化总结之2-百万级数据库优化方案+案例分析
    数据库sql优化总结之1-百万级数据库优化方案+案例分析
    MongoDB语法与现有关系型数据库SQL语法比较
    Redis和MongoDB的区别以及应用场景
    浏览器渲染基本原理(五):优化渲染性能
  • 原文地址:https://www.cnblogs.com/abclife/p/4613218.html
Copyright © 2011-2022 走看看