Oracle异常ORA-01861: literal does not match format string。
来源:互联网 发布:mac kindle 软件下载 编辑:程序博客网 时间:2024/04/30 17:07
〖现象(Symptom) 〗
执行下面的脚本,提示日期格式不匹配。
RMAN> run
2> {
3> allocate channel c1 type disk;
4> SET UNTIL TIME '2006-11-2 14:20:00';
5> release channel c1;
6> }
allocated channel:c1
channel c1:sid=158 devtype=DISK
executing command:SET until clause
。。。
RMAN-03002:failure of set command at 11/02/2006 14:33:52
ORA-01861:literal does not match format string
〖原理(Cause) 〗
备份脚本中指定的日期格式不匹配。
〖方法(Action) 〗
u 方法一:使用TO_DATE()函数。
把上面的脚本改成:
run
{
allocate channel c1 type disk;
SET UNTIL TIME "TO_DATE('2006-11-2 14:20:00', 'YYYY-MM-DD HH24:MI:SS')";
release channel c1;
}
u 方法二:设置会话(session)的日期格式。
把上面的脚本改成:
run
{
allocate channel c1 type disk;
sql 'alter session set nls_date_format="yyyy-mm-dd:hh24:mi:ss"';
SET UNTIL TIME '2006-11-2 14:20:00';
release channel c1;
}
在执行SET UNTIL TIME以前,首先使用alter session set nls_date_format命令设置日期的格式。SET UNTIL TIME指定的日期格式必须与nls_date_format指定的格式相匹配。
- Oracle异常ORA-01861: literal does not match format string。
- Oracle 异常 ORA-01861: literal does not match format string
- Oracle 异常 ORA-01861: literal does not match format string(字符串格式不匹配)
- Oracle 异常 ORA-01861: literal does not match format string(字符串格式不匹配)
- 解决:Oracle 异常 ORA-01861: literal does not match format string(字符串格式不匹配)
- 解决Oracle异常ORA-01861:literal does not match format string(字符串格式不匹配)
- Oracle异常ORA-01861:literal does not match format string(字符串格式不匹配)
- ORA-01861: literal does not match FORMat string 错误原因
- ORA-01861: literal does not match format string 错误!
- ORA-01861: literal does not match format string
- 关于ORA-01861: literal does not match format string
- oracle学习笔记【 ORA-01861: literal does not match format string(字符串格式不匹配)】
- Oracle 异常 ORA-01861: literal does not match form
- 关于时间比较,ORA-01861: literal does not match format string
- literal does not match format string 解决办法
- literal does not match format string
- format not a string literal and no format arguments
- format not a string literal and no format arguments
- 北漂的日子(二)
- SWT 和 JFace, 第 1 部分:如何创建简单的 SWT 应用程序
- SWT 和 JFace, 第 2 部分: 简介 了解菜单、列表、组合框、表和树
- 北漂的日子(三)
- 一位软件工程师的6年总结
- Oracle异常ORA-01861: literal does not match format string。
- 在 Eclipse Workbench 之外使用 Eclipse GUI,第 1 部分: 单独使用 JFace 和 SWT构建一个简单的文件资源管理器应用程序
- JAVA代码混淆器大全
- 专注于系统开发
- 在 Eclipse Workbench 之外使用 Eclipse GUI,第 2 部分: 使用 JFace 图像注册表
- 在 Eclipse Workbench 之外使用 Eclipse GUI,第 3 部分: 添加操作、菜单和工具栏完成简单的文件资源管理器应用程序
- CSDN新导航的体验
- CSDN新导航的体验
- 了解 Eclipse 中的 JFace 数据绑定,第 1 部分: 数据绑定的优缺点