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> }

 

posted @ 2017-06-06 10:56  PoleStar  阅读(1165)  评论(0编辑  收藏  举报