重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1781|回复: 2
打印 上一主题 下一主题

[Oracle] lsnrctl status /service/卡起,监听日志报:TNS-12531错误

[复制链接]
跳转到指定楼层
楼主
发表于 2021-8-30 17:06:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
lsnrctl status /service/卡起,监听日志报:TNS-12531错误


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

沙发
 楼主| 发表于 2021-8-30 17:12:15 | 只看该作者
MOS上有一篇文档,暂时按这个修改为1024
但要重启生效.


Windows: Oracle Net or Connections Via the Listener Fail with TNS-12531 On Windows 64-bit Platform (Doc ID 1384337.1)

In this Document
        Symptoms
        Changes
        Cause
        Solution
        References


Applies to:
Oracle Net Services - Version 11.2.0.1 to 12.2.0.1 [Release 11.2 to 12.2]
Microsoft Windows x64 (64-bit)
Microsoft Windows x64 (64-bit) - Version: 2008 R2
TNS-12531 TNS: Failed to allocate memory
Symptoms

Attempting to connect via the listener or remotely to a database running on Windows.
The following error is thrown:Getting the error 'TNS-12531: TNS:cannot allocate memory'
It is possible that no other memory related errors are being thrown at the same time.
It is also possible that the error is fleeting or seems to correct itself.
Changes

There are no significant changes in the environment.  It is possible that incoming traffic to the listener has increased and caused this error to occur.
Cause

This can be caused by an inadequate setting for Desktop Heap Size. Even if this is a 64-bit OS with high amount of memory, there is still a limitation that generates this error.
Of course, it can also be caused when the memory is actually low.  Check the resource consumption at the time of this problem.  If there is no apparent memory shortage,
the solution documented here may resolve the issue.
Solution

Check and edit the Desktop Heap size located here in the registry:

Launch regedt32 and go to:

\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems\

In the right pane, click on Windows and pull down Edit then select Modify.

You should see a string that resembles this in its entirety:

%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,20480,768 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ServerDll=sxssrv,4 ProfileControl=Off MaxRequestThreads=16

Focus on this section:

Windows SharedSection=1024,20480,768

The third argument is the maximum amount of heap memory allocated to non interactive desktops.
Increase this third value and check when the TNS error disappears. There is no optimum value. It
varies on each MS Windows server.

This change in the registry will require a restart of the Windows server in order for the change to take effect.

回复 支持 反对

使用道具 举报

板凳
 楼主| 发表于 2021-8-30 17:16:06 | 只看该作者
注册表项的第二个值是每个与交互式窗口站关联的桌面堆 SharedSection 的大小。 在 WinSta0 应用程序交互窗口站中创建的每个桌面都需要 (堆) 。 该值以千字节 (KB) 为单位。
第三个值是与非交互窗口站关联的每个桌面的 SharedSection 桌面 堆大小。 该值以千字节 (KB) 为单位。
建议不要为第二个值设置超过 20480 KB SharedSection 的值。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-26 10:34 , Processed in 0.101312 second(s), 23 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表