Oracle 客户端链接时报ORA-01019错误总结

在.net+oracle开发中,发布web程序的时候,有是会遇到该错误 ora-01019html

ORA-01019 unable to allocate memory in the user side
Cause: The user side memory allocator returned an error.web

Action: Increase the size of the process heap or switch to the old set of calls.sql

或者 错误,不能从进程得到上下文.安全


此错误是因为oracle或者microsoft的bug引发.(实际上是,iis的访问权限的控制过高).服务器

解决方法: oracle

一:为ORACLE_HOME目录,添加network services 用户组的访问权限,并将权限继承到子目录.重启机器.app

二:提升虚拟路径对应的应用程序池,执行用户的权限.(该方法本人认为对带来不安全因素)ide


令,本错误有时候提示是,须要安装oracle7.13版本客户端以上.解决方法同上.工具

 

问题二this


在Win8企业版64位环境下,链接Oracle11g 服务端,搞了整整两天,特将过程分享出来,供有须要的同窗参考。

本机环境:

一、服务端:Oracle 11g R2 64位,安装路径E:/Org12

官方下载:http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

二、客户端:

(1)Instant Client ,轻量级,安装路径E:/Oracle11/client
http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html

(2)32-bit Oracle Data Access Components (ODAC) with Oracle Developer Tools for Visual Studio,安装路径E:/Org12/Product/11.2.0/client_1

http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html?ssSourceSiteId=otncn

用客户端三种工具去连Oracle服务端,结果:

第一种:Oracle自带的SQL Deveploer工具,基本没问题!也不须要什么客户端配置。

http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html

第二种,用PL/SQL 9.0去连,须要copy服务端的XXapporacleproduct11.2.0servernetworkADMINtnsnames.ORA文件到客户端(1)的networkADMIN下,并删除不须要的部分,保留内容大体以下:

 

代码以下 复制代码
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SID =ORCL)
)
)

并用以下方式启动PL/SQL

代码以下 复制代码

set Path=E:/Oracle11/client
rem 服务端路径: E:Org12product11.2.0dbhome_1BIN
set ORACLE_HOME=E:/Oracle11/client
set TNS_ADMIN=E:/Oracle11/client
set NLS_LANG=AMERICAN_AMERICA.AL32UTF8
start E:/Oracle11/PL_SQL/plsqldev.exe此时OK。

(www.111cn.net)

这个问题网上查找好久,尝试的解决方法不少,但最终个人方案是:

一、删除Oracle服务端;方法能够在网上搜,要删干净;

二、删除ODAC及全部组件;

三、保留Instant Client及其安装目录,主要是networkADMINtnsnames.ORA

四、从新安装Oracle服务端;

此时接全部客户端链接彻底正常!

小结:

一、刚开始怀疑是64位Oracle驱动路径(x86)引发的bug,最后得出的结论是同一台机器,最好不要装两个Oracle客户端 ,服务端+客户端也不推荐,会引发一些潜在的问题,缘由不明。

二、64位的Oracle服务端+32位的Oracle客户端,会有一些潜在的问题,最好32位对32位。

三、安装Oracle 11g R2 EX时,会在环境变量Path前面加上“e:Org12apporacleproduct11.2.0serverbin;;”,注意是两个分号,须删除一个;这个不知道是安装程序的BUG?


问题三


今天开发的同事碰到了这个ORA-1019错误。

详细的错误信息为:

Microsoft OLE DB Provider for ODBC Drivers错误'80004005'
[Microsoft][ODBC driver for Oracle][Oracle]Error while trying to retrieve text for error ORA-01019
/includes/data_func.asp,行12

而Oracle文档上对这个错误的描述为:

ORA-01019: unable to allocate memory in the user
Cause: The user side memory allocator returned error.

Action: Increase the processes heap size or switch to the old set of calls.

从错误描述上看,彷佛是内存分配的问题,可是客户端服务器上的内存有2G,并且并无启动什么程序,显然不是简单的内存不足的问题。

不过问题多半是出在客户端程序上,检查了一下metalink,发现文档ID 91906.1中提到的问题可能和当前相似。致使这个问题的缘由彷佛是ODBC没有使用Oracle提供的驱动程序,而是使用了ORACLE_HOME以外系统提供的驱动。
又经过GOOGLE搜索了一下,找到了一篇文章,其中包含下面的描述:
You must set the following environment variables:
ORACLE_HOME
Specifies the top-level directory in which Oracle is installed.

TNS_ADMIN
Specifies the location of configuration files, for example, $ORACLE_HOME/network/admin. After installation Oracle creates the configuration files under /var/opt/oracle. If listener.ora and tnsnames.ora are in this directory, you might not need to set TNS_ADMIN, because by default Oracle uses /var/opt/oracle.

If you do not set these environment variables properly, Oracle returns the ORA-1019 error code the first time you attempt to connect. For information on error handling,


看来问题极可能是因为没有正确设置ORACLE_HOME环境变量形成的,

解决办法

在WINDOWS中设置系统环境变量,重启系统后,问题消失
from:http://www.111cn.net/database/Oracle/43838.htm

相关文章
相关标签/搜索