【故障处理】ORA-01882: 未找到时区区域 %s

简介: 和许多网友一样,今天遇到了ora-01882问题,查了matelink解决了! 环境:Oracle server端版本: SQL> select * from v$version; BANNER ----------------...

和许多网友一样,今天遇到了ora-01882问题,查了matelink解决了!


环境:
Oracle server端版本:
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production

TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production

Oracle client端版本:
OS:windows XP 32bit
DB client:Oracle 10.2.0.1

 

现象:
--客户端查询报错:
SQL> select * from dba_scheduler_jobs;
ERROR:
ORA-01882: 未找到时区区域 %s

未选定行

SQL> select * from v$timezone_file;

FILENAME        VERSION
------------ ----------
timezlrg.dat          4


--登录server端查询正常
SQL> Select job_name,LAST_START_DATE From Dba_Scheduler_Jobs Where job_name='GATHER_STATS_JOB';

JOB_NAME             LAST_START_DATE
-------------------- ----------------------------------------
GATHER_STATS_JOB     15-1月 -13 10.00.01.937819 下午 +08:00

 

分析:
通过查找资料,参考这个网友的分析的文章
http://blog.chinaunix.net/uid-20274021-id-1969654.html
--根据我的具体问题,重点参考文章中蓝色部分,如下:
Please make sure you have the error using the sqlplus found in the oracle_home on the server (!!! this is important !!!). IF and ONLY IF that is the case run the fix script found below directly on the server.
If you do NOT have a ORA-01882 when using the sqlplus found in the oracle_home on the server but you DO have it when connecting from a remote client then it means the remote client has not been updated to V3 or higher. In that case running the script will NOT solve the issue, you then need to update the client's DST version.
For windows clients see Note 417893.1 How To Apply The V4 DST Patches To Windows Clients or Servers

--问题原因应该是oracle客户端版本太旧,存在bug所致。

--通过matelink找到Note 417893.1,使用红色部分的解决方案
How To Apply The V4 DST Patches To Windows Clients or Servers [ID 417893.1]

If you need to patch windows clients or servers then can download the patch for
Windows for each version you have and simply copy the 3 needed files.

Note that there are different patches for 32bit / 64 bit x86 and 64 bit Itanium

To see on what platform you are you can use

select platform_id, platform_name from v$database;

-> Windows 32 bit is platform 7 (Microsoft Windows IA (32-bit))
-> Windows x86 64 bit is platform 233 (Microsoft Windows Server 2003 (64-bit AMD64 and Intel EM64T))
-> Windows Itanium is platform 206 (Microsoft Windows XP (64-bit Itanium)) or
    208 (Microsoft Windows Server 2003 (64-bit Itanium))

or you can start "winver" 
a x86 64 bit AMD64/EMT64 will mention "x64 edition"

to see if it's a Itanium system:

Click Start, right-click My Computer, and then click Properties.
In the System Properties window, click the General tab.
Note the first line under Computer:
Itanium or Itanium 2 appears on this line if it's a Itanium system.

Above information is provided as-is. Please contact Microsoft if you have 
any questions regarding this

A) Windows 32 bit ( NT4/2000/XP/Vista)
--------------------------------------

1) Download the Windows 32 bit  server patch for your version.

For a 9.2.0.X client or server (9.2.0.1 to 9.2.0.8) download the 9.2.0.8 patch
 containing the DST V4 files: 
https://updates.oracle.com/download/5845928.html
For a 10.1.0.X client or server (10.1.0.1 to 10.1.0.5) download the 10.1.0.5 patch
 containing the DST V4 files: 
https://updates.oracle.com/download/5728221.html
For a 10.2.0.X client or server ( 10.2.0.1 to 10.2.0.3) download the 10.2.0.3 patch
 containing the DST V4 files:  
https://updates.oracle.com/download/5731535.html

2) Unzip the patch, and locate the 3 files readme.txt, timezone.dat and timezlrg.dat
in the patch, for 9.2 and 10.2 they are in the "files\oracore\zoneinfo" 
directory of the uncompressed patch.

3) For a server install we recommend to backup the %ORACLE_HOME%\oracore\zoneinfo directory .

3) Copy the 2 .dat files and the readme.txt file that were found in step 2
  into the %ORACLE_HOME%\oracore\zoneinfo directory on your clients or server.
  Please make sure you copy the correct version.
  The files from the 9.2 patch for a 9.2.0.X client or server.
  The files from the 10.1 patch for a 10.1.0.X client or server.
  The files from the 10.2 patch for a 10.2.0.x client or server.

4) Restart the client applications (in case of client install)
   or database (in case of a server install).

B) Windows 64 bit x86 (AMD64 and EMT64)
---------------------------------------

1) Download the Windows 64 bit x86 (AMD64 and EMT64) (XP/2003) server patch for your version.

For a 10.2.0.X client or server ( 10.2.0.1 to 10.2.0.3) download the 10.2.0.3 patch
 containing the DST V4 files:  https://updates.oracle.com/download/5731537.html

2) Unzip the patch, and locate the 3 files readme.txt, timezone.dat and timezlrg.dat
   in the patch, for 10.2 they are in the "files\oracore\zoneinfo" directory of 
   the uncompressed patch.

3) For a server install we recommend to backup the %ORACLE_HOME%\oracore\zoneinfo directory .

3) Copy the 2 .dat files and the readme.txt file that were found in step 2 
   into the %ORACLE_HOME%\oracore\zoneinfo directory on your clients or server.
   Please make sure you copy the correct version.
   The files from the 10.2 patch for a 10.2.0.x client or server.

4) restart the client applications (in case of client install) 
   or database (in case of a server install).

C) Windows 64 bit Itanium
-------------------------

1) Download the Windows 64 bit Itanium server patch for your version.

For a 9.2.0.X client or server (9.2.0.1 to 9.2.0.8) download the 9.2.0.8 patch
 containing the DST V4 files: https://updates.oracle.com/download/5845932.html
For a 10.1.0.X client or server (10.1.0.1 to 10.1.0.5) download the 10.1.0.5 patch
 containing the DST V4 files: https://updates.oracle.com/download/5731205.html
 -> this is not out yet.

For a 10.2.0.X client or server ( 10.2.0.1 to 10.2.0.3) download the 10.2.0.3 patch
 containing the DST V4 files: https://updates.oracle.com/download/5731536.html

2) Unzip the patch, and locate the 3 files readme.txt, timezone.dat and timezlrg.dat
in the patch, for 9.2, 10.1 and 10.2 they are in the "files\oracore\zoneinfo" 
directory of the uncompressed patch.

3) For a server install we recommend to backup the %ORACLE_HOME%\oracore\zoneinfo directory .

3) Copy the 2 .dat files and the readme.txt file that were found in step 2 
  into the %ORACLE_HOME%\oracore\zoneinfo directory on your clients or server.
  Please make sure you copy the correct version.
  The files from the 9.2 patch for a 9.2.0.X client or server.
  The files from the 10.1 patch for a 10.1.0.X client or server.
  The files from the 10.2 patch for a 10.2.0.x client or server.

4) restart the client applications (in case of client install) 
   or database (in case of a server install).

Remarks: 
--------

* there is no easy way to identify a client's version.

the Oracle_Home can be read from the registry under

HKEY_LOCAL_MACHINE\SOFTWARE\Oracle

if you have there HOMEx (HOME0, HOME1,HOME2 ) you know this is 8,8i or 9i
the actual directory is in the ORACLE_HOME key.
    
if you have KEY_ then this is 10.1 or 10.2,
again the the actual directory is in the ORACLE_HOME key.

once you have the directory you can check for
%oracle_home%\inventory\Components21\oracle.rsf\9.2.0.1.0 -> 9i
%oracle_home%\inventory\Components21\oracle.rsf\10.1.0.2.0 -> 10.1
%oracle_home%\inventory\Components21\oracle.rsf\10.2.0.1.0 -> 10.2


* For Instant Clients on Windows you need to download a NEW version from OTN.
You CANNOT patch a Instant Client with above method.
Setting ORA_TZFILE will not help - ORA_TZFILE is ignored by the Instant Client.

On Unix it is possible to generate yourself a new instant client from a patched env,
but not on windows.


解决方法:
Windows 32 bit ( NT4/2000/XP/Vista) 平台 
1.下载相应版本的DST V4补丁文件,如下:
For a 10.2.0.X client or server ( 10.2.0.1 to 10.2.0.3) download the 10.2.0.3 patch
 containing the DST V4 files:  https://updates.oracle.com/download/5731535.html

2.解压缩补丁包 p5731535_10203_WINNT.zip
在files\oracore\zoneinfo目录下找到这三个文件:readme.txt, timezone.dat and timezlrg.dat

3.copy上面三个文件到你的客户端oracle的%ORACLE_HOME%\oracore\zoneinfo目录,把原来文件替换掉。

4.重新启动你oracle客户端连程序或database,是直接重启了我的电脑。
因为我是pl/sql developer连接的,重启连接程序后再连报错,所以直接重启了下我的电脑,再次连接后查询正常

 

目录
相关文章
|
7月前
|
Go
如何在Go语言的HTTP请求中设置使用代理服务器
当使用特定的代理时,在某些情况下可能需要认证信息,认证信息可以在代理URL中提供,格式通常是:
540 0
|
9月前
|
Linux 编译器 开发工具
提升CentOS 7中的gcc/G++版本
至此,你已经成功在CentOS 7中升级了gcc/G++版本。从现在开始,在终端中运行 `gcc`或 `g++`时,将会使用新版本的编译器。
1117 21
|
关系型数据库 TensorFlow 算法框架/工具
Docker技术概论(4):Docker CLI 基本用法解析
Docker技术概论(4):Docker CLI 基本用法解析
1133 1
|
存储 Ubuntu Docker
Docker从入门到精通:Docker pull命令学习
了解Docker镜像下载方法!使用`docker pull`命令从[Docker Hub](https://hub.docker.com/)获取镜像。基本语法是`docker pull NAME[:TAG]`。例如,拉取Python最新镜像的命令是`docker pull python`或`docker pull python:latest`。可选参数包括`-a`(拉取所有标签)和`--quiet`(只显示进度条)。拉取后,用`docker images`检查镜像是否成功存储。开始你的容器化之旅吧!
|
NoSQL 关系型数据库 分布式数据库
【赵渝强老师】HBase的表结构
本文介绍了Google的BigTable思想及其对HBase的影响。BigTable将所有数据存入一张表中以提高查询性能,而HBase作为其具体实现,采用列式存储,适合数据分析和处理。文章通过示例说明了HBase的表结构和数据插入方法,并提供了相关代码和图示。
568 0
|
存储 Oracle 关系型数据库
oracle服务器存储过程中调用http
通过配置权限、创建和调用存储过程,您可以在Oracle数据库中使用UTL_HTTP包发起HTTP请求。这使得Oracle存储过程可以与外部HTTP服务进行交互,从而实现更复杂的数据处理和集成。在实际应用中,根据具体需求调整请求类型和错误处理逻辑,以确保系统的稳定性和可靠性。
801 0
|
编解码 数据可视化 Java
Java如何进行Base64的编码(Encode)与解码(Decode)?
Java如何进行Base64的编码(Encode)与解码(Decode)?
1093 1
|
UED 开发工具 iOS开发
Uno Platform大揭秘:如何在你的跨平台应用中,巧妙融入第三方库与服务,一键解锁无限可能,让应用功能飙升,用户体验爆棚!
【8月更文挑战第31天】Uno Platform 让开发者能用同一代码库打造 Windows、iOS、Android、macOS 甚至 Web 的多彩应用。本文介绍如何在 Uno Platform 中集成第三方库和服务,如 Mapbox 或 Google Maps 的 .NET SDK,以增强应用功能并提升用户体验。通过 NuGet 安装所需库,并在 XAML 页面中添加相应控件,即可实现地图等功能。尽管 Uno 平台减少了平台差异,但仍需关注版本兼容性和性能问题,确保应用在多平台上表现一致。掌握正确方法,让跨平台应用更出色。
299 0
|
SQL Java 大数据
5款开源BI工具优缺点及介绍
【4月更文挑战第15天】对比了几款开源BI报表工具:Superset以其高性能和高度可定制化受青睐,适合复杂分析;Metabase以其简洁易用和广泛兼容性脱颖而出,适合快速构建报表;DataEase以其轻量级和易部署特点吸引中小型企业;JasperReports擅长复杂报表生成,适合Java环境;Pentaho CE则是一体化平台,适合需要全面企业级功能的用户。选择时应结合公司需求、技术背景和数据规模来决定。
5762 6
|
网络安全
关闭mgmtdb 库并disable
关闭mgmtdb 库并disable
447 1

热门文章

最新文章