ORA-01861: literal does not match format string
系統(tǒng):AnolisOS7.9
數(shù)據(jù)庫:Oracle11.2.0.4
問題描述:執(zhí)行TSPITR時,報錯ORA-01861,如下所示:
[oracle@liujun~]$ export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss'
[oracle@liujun~]$ export NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252
[oracle@liujun~]$ rman target /
RecoveryManager: Release 11.2.0.4.0 - Production on Fri Sep 9 14:53:13 2022
Copyright(c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connectedto target database: ORCL (DBID=1642676218)
RMAN>recover tablespace dptest until time '2022-09-09 14:16:50' auxiliarydestination '/home/oracle/backup';
Startingrecover at 2022-09-09 14:53:19
usingtarget database control file instead of recovery catalog
allocatedchannel: ORA_DISK_1
channelORA_DISK_1: SID=201 device type=DISK
RMAN-00571:===========================================================
RMAN-00569:=============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571:===========================================================
RMAN-03002:failure of recover command at 09/09/2022 14:53:19
ORA-01861:literal does not match format string
異常原因為數(shù)據(jù)庫時間和設置的數(shù)據(jù)格式不一致導致.
按如下進行修改:
recovertablespace dptt until time "to_date('2022-09-09 21:00:11','yyyy-mm-ddhh24:mi:ss')" auxiliary destination '/home/oracle/backup';
