暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

ORA-01861: literal does not match format string

原创 Leo 2022-09-11
1900

系统:AnolisOS 7.9
数据库:Oracle 11.2.0.4
问题描述:执行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 /

Recovery Manager: 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.

connected to target database: ORCL (DBID=1642676218)

RMAN> recover tablespace dptest until time '2022-09-09 14:16:50' auxiliary destination '/home/oracle/backup';

Starting recover at 2022-09-09 14:53:19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_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

异常原因为数据库时间和设置的数据格式不一致导致.
恢复语句按如下进行修改:
recover tablespace dptt until time "to_date('2022-09-09 21:00:11','yyyy-mm-dd hh24:mi:ss')" auxiliary destination '/home/oracle/backup';

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论