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> }
  • 相关阅读:
    分析ARP攻击与欺骗
    IP数据包结构
    OSI 7层模型
    PKI
    求一个字符串所有的子序列:非递归和递归算法
    空当接龙求解:java版广度优先
    mysql 解决奇葩问题续篇。
    mysql 的一个奇葩问题
    symfony 之 admin 征途二 数据库相关
    symfony 之 admin 征途一 试运行
  • 原文地址:https://www.cnblogs.com/polestar/p/6950377.html
Copyright © 2011-2022 走看看