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

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值