Oracle 11g数据库上的Oracle ORA-01805 [英] Oracle ORA-01805 on Oracle 11g database
问题描述
我们的Oracle 10g数据库最近已升级到11g.该数据库正在Windows Server 2003 X64计算机上运行.在来自访问具有TIMESTAMP(6)WITH TIME ZONE数据列的表的.NET应用程序的SQL查询中,出现以下异常.
Our Oracle 10g database was recently upgraded to 11g. The database is running on a Windows Server 2003 X64 machine. In SQL queries from a .NET application that access a table that has a TIMESTAMP (6) WITH TIME ZONE data columns, I am getting the following exception.
System.Data.OracleClient.OracleException:ORA-01805:日期/时间操作中可能存在错误
System.Data.OracleClient.OracleException : ORA-01805: possible error in date/time operation
建议采取的行动唯一的例外是确保客户端和服务器的版本相同:
The suggested action for the exception is to ensure that the client and server are the same version:
ORA-01805:日期/时间操作中可能存在错误 原因:客户端和服务器上的时区文件不匹配.根据本地时区文件,操作可能会导致不正确的结果. 行动:请确保客户端和服务器的时区版本相同.
ORA-01805: possible error in date/time operation Cause: The timezone files on client and server do not match. Operation can potentially result in incorrect results based on local timezone file. Action: Please ensure client and server timezone versions are same.
我已经运行了以下查询来检查相关数据库的时区.我没有找到有关如何为客户端设置时区(或更改时区文件)的信息.
I've ran the following queries to check the timezone on the database in question. I haven't found information on how I set the timezone (or change the timezone file) for the client.
SELECT dbtimezone FROM DUAL;
select * from v$timezone_file;
DBTIMEZONE
----------
+00:00
FILENAME VERSION
-------------------- ----------------------
timezlrg_14.dat 14
我假设客户端引用的是我安装的Instant Client,版本为11_2?我正在通过.NET Framework提供的System.Data.OracleClient.OracleConnection
运行查询.我假设时区版本"是指时区文件版本.我看不到即时客户端在哪里有时区文件.任何建议,不胜感激.
I assume the client is referring to the Instant Client I have installed, which is version 11_2? I'm running the queries through a System.Data.OracleClient.OracleConnection
as provided by the .NET Framework. U I assume by "timezone version" it's referring to the timezone file versions. I don't see where the instant client has a timezone file. Any suggestions are appreicated.
推荐答案
使用"genezi -v"了解时区文件的版本.
Use "genezi -v" to know the timezone file version.
这是我的Linux机器中的一个示例:
Here is a sample in my Linux box:
$ genezi -v
Client Shared Library 32-bit - 11.2.0.2.0
System name: Linux
Release: 2.6.32-34-generic
Version: #77-Ubuntu SMP Tue Sep 13 19:39:17 UTC 2011
Machine: x86_64
Operating in Instant Client mode.
Small timezone file = timezone_14.dat
Large timezone file = timezlrg_14.dat
这篇关于Oracle 11g数据库上的Oracle ORA-01805的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!