zoukankan      html  css  js  c++  java
  • rman 中遇到 ORA-01861

    RMAN> run{
    2>      sql 'alter session set nls_date_format="yyyy-mm-dd hh24:mi:ss"';
    3>      recover tablespace CLINICS_DATA until time '2017-06-05 14:44:51' auxiliary destination '/home/oracle/auxiliary';
    4> }
    
    sql statement: alter session set nls_date_format="yyyy-mm-dd hh24:mi:ss"
    
    Starting recover at 05-JUN-17
    using channel ORA_DISK_1
    RMAN-05026: WARNING: presuming following set of tablespaces applies to specified point-in-time
    
    List of tablespaces expected to have UNDO segments
    Tablespace SYSTEM
    Tablespace UNDOTBS1
    
    Creating automatic instance, with SID='sbzi'
    
    initialization parameters used for automatic instance:
    db_name=ORCL
    db_unique_name=sbzi_tspitr_ORCL
    compatible=11.2.0.0.0
    db_block_size=8192
    db_files=200
    sga_target=280M
    processes=50
    db_create_file_dest=/home/oracle/auxiliary
    log_archive_dest_1='location=/home/oracle/auxiliary'
    #No auxiliary parameter file used
    
    
    starting up automatic instance ORCL
    
    Oracle instance started
    
    Total System Global Area     292278272 bytes
    
    Fixed Size                     2212736 bytes
    Variable Size                100666496 bytes
    Database Buffers             184549376 bytes
    Redo Buffers                   4849664 bytes
    Automatic instance created
    
    Removing automatic instance
    shutting down automatic instance 
    Oracle instance shut down
    Automatic instance removed
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 06/05/2017 15:21:53
    RMAN-06136: ORACLE error from auxiliary database: ORA-01861: literal does not match format string

    解决方案:

    将 recover tablespace CLINICS_DATA until time '2017-06-05 14:44:51' auxiliary destination '/home/oracle/auxiliary'; 中的日期格式化
    
    RMAN> run{
    2>      sql 'alter session set nls_date_format="yyyy-mm-dd hh24:mi:ss"';
    3>      recover tablespace CLINICS_DATA  until time "to_date('2017-06-05 14:44:51','yyyy-mm-dd hh24:mi:ss')" auxiliary destination '/home/oracle/auxiliary';
    4> }
  • 相关阅读:
    监控系统
    RocketMQ入门介绍
    Linux的虚拟内存详解(MMU、页表结构) 转
    快速排序
    如何选择分布式事务解决方案? 转
    java 基本数据类型相关思考
    互联网项目中mysql应该选什么事务隔离级别 转
    线上服务的FGC问题排查,看这篇就够了! 转
    什么是Base64? 转
    业界难题-“跨库分页”的四种方案 转
  • 原文地址:https://www.cnblogs.com/polestar/p/6950377.html
Copyright © 2011-2022 走看看