Oracle dbca时报错:ORA-12547: TNS:lost contact

295 篇文章 0 订阅

====>>>注意,注意:本文的OS是rhel6.x,不是rhel 7.x ========================

====>>>注意,注意:rhel6.x的资源限制文件 和rhel7.x的资源限制文件不是同一个文件========

====>>>注意,注意:修改完资源限制文件之后请重启该应用程序才能生效(比如重启dbca,比如重启数据库实例,最彻底的是重启OS)

======================================================== 

" By default, the rules are read from the/etc/security/limits.conf file. 
For a complete description of the format of these rules, 
see the limits.conf(5) manual page. 
Additionally, you can create individual configuration files in the /etc/security/limits.d directory specifically for certain applications or services. 
By default, the pam_limits module is included in a number of files in the/etc/pam.d/ directory.
A default limit of user processes is defined in the file /etc/security/limits.d/90-nproc.conf (RHEL5, RHEL6), 
/etc/security/limits.d/20-nproc.conf (RHEL7), to prevent malicious denial of service attacks, such as fork bombs. 
To change the default limit of user processes to 50, change the value in this file"
Source: RHEL6 Security Guide, ⁠Chapter 2. Securing Your Network
来自:https://access.redhat.com/solutions/406663

======================================================== 

RHEL7的请参考:https://blog.csdn.net/msdnchina/article/details/77623330

 

今天遇到一个问题,Oracle dbca时报错:ORA-12547: TNS:lost contact

 

环境:
OS:RHEL6.5 x86-64bit
DB:11.2.0.4 for Linux 86-64bit

思路:
DBCA报错,首先看DBCA的日志,日志中也是报ORA-12547: TNS:lost contact
于是再sqlplus / as sysdba敲回车,也是报ORA-12547: TNS:lost contact,
基于之前的工程经验,先到bdump下找trc文件,不过在bdump下是没有任何trc生成的。
再到/u01/app/oracle/product/11.2.0/db_1/rdbms/log下找trc文件,果然找到了:

[oracle@dg1 log]$ pwd
/u01/app/oracle/product/11.2.0/db_1/rdbms/log
[oracle@dg1 log]$ ls -lrt
total 9808
-rw-r-----. 1 oracle oinstall 401207 Feb  1 16:16 dbua1557284_ora_8053.trc
-rw-r-----. 1 oracle oinstall 401207 Feb  1 16:16 dbua1557284_ora_8062.trc
-rw-r-----. 1 oracle oinstall 401207 Feb  1 16:16 dbua1557284_ora_8065.trc
-rw-r-----. 1 oracle oinstall 401373 Feb  1 16:18 dg1_ora_8227.trc
-rw-r-----. 1 oracle oinstall 401228 Feb  1 16:26 dg1_ora_2701.trc
-rw-r-----. 1 oracle oinstall 401228 Feb  1 16:26 dg1_ora_2706.trc
-rw-r-----. 1 oracle oinstall 401410 Feb  1 16:27 dg1_ora_2715.trc
-rw-r-----. 1 oracle oinstall 401228 Feb  1 16:27 dg1_ora_2722.trc
-rw-r-----. 1 oracle oinstall 401244 Feb  1 16:31 dbua3144297_ora_2792.trc
-rw-r-----. 1 oracle oinstall 401244 Feb  1 16:31 dbua3144297_ora_2801.trc
-rw-r-----. 1 oracle oinstall 401244 Feb  1 16:31 dbua3144297_ora_2804.trc
-rw-r-----. 1 oracle oinstall 401410 Feb  1 16:34 dg1_ora_2930.trc
-rw-r-----. 1 oracle oinstall 401341 Feb  1 17:27 dg1_ora_3181.trc
-rw-r-----. 1 oracle oinstall 401090 Feb  1 17:27 dg1_ora_3187.trc
-rw-r-----. 1 oracle oinstall 401341 Feb  1 17:27 dg1_ora_3190.trc
-rw-r-----. 1 oracle oinstall 401090 Feb  1 17:28 dg1_ora_3205.trc
-rw-r-----. 1 oracle oinstall 401341 Feb  1 17:28 dg1_ora_3210.trc
-rw-r-----. 1 oracle oinstall 401090 Feb  1 17:28 dg1_ora_3214.trc
-rw-r-----. 1 oracle oinstall 401090 Feb  1 17:36 dg1_ora_3313.trc
-rw-r-----. 1 oracle oinstall 401341 Feb  1 17:37 dg1_ora_3329.trc
-rw-r-----. 1 oracle oinstall 401090 Feb  1 17:37 dg1_ora_3341.trc
-rw-r-----. 1 oracle oinstall 401090 Feb  1 17:37 dg1_ora_3344.trc
-rw-r-----. 1 oracle oinstall 401341 Feb  1 17:40 dg1_ora_3369.trc
-rw-r-----. 1 oracle oinstall 401341 Feb  1 17:40 dg1_ora_3375.trc
-rw-r-----. 1 oracle oinstall 401090 Feb  1 17:40 dg1_ora_3378.trc
[oracle@dg1 log]$ 
[oracle@dg1 log]$ vi dg1_ora_3369.trc

Dump file /u01/app/oracle/product/11.2.0/db_1/rdbms/log/dg1_ora_3369.trc

*** 2016-02-01 17:40:23.652
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1
System name:    Linux
Node name:      dg1
Release:        2.6.32-431.el6.x86_64
Version:        #1 SMP Sun Nov 10 22:19:54 EST 2013
Machine:        x86_64
Instance name: dg1
Redo thread mounted by this instance: 0 <none>
Oracle process number: 0
Unix process pid: 3369, image: oracle@dg1


*** 2016-02-01 17:40:23.652
skgm error 27135: errno = 0, info = 0, 0, 0, 0, 1048576, 2097152, 0
skgm error 27135: errno = 0, info = 0, 0, 0, 0, 1048576, 2097152, 0

*** 2016-02-01 17:40:23.654
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x3D8] [PC:0x95BE6EB, opiodr()+11347] [flags: 0x0, count: 1]
Registers:
%rax: 0x000000000c0ea630 %rbx: 0x000000000c0ea638 %rcx: 0x0000000000000000
%rdx: 0x0000000000000000 %rdi: 0x000000000c0ccba0 %rsi: 0x00007fffa308e250
%rsp: 0x00007fffa308d970 %rbp: 0x00007fffa308e440  %r8: 0x00007fffa308d970
 %r9: 0x00007fffa308e440 %r10: 0x00007fffa308c600 %r11: 0x00007fab40ec1538
%r12: 0x000000000000003c %r13: 0x0000000000000004 %r14: 0x00007fffa308e6f8
%r15: 0x0000000000000002 %rip: 0x00000000095be6eb %efl: 0x0000000000010246
  opiodr()+11325 (0x95be6d5) lea (%rax,%rbx),%rdx
  opiodr()+11329 (0x95be6d9) mov %rdx,(%rcx,%rbx)
  opiodr()+11333 (0x95be6dd) mov 0x2b34a84(%rip),%rax
  opiodr()+11340 (0x95be6e4) mov 0x178(%rax),%rdx
> opiodr()+11347 (0x95be6eb) movzwl 0x3d8(%rdx),%ecx
  opiodr()+11354 (0x95be6f2) test $0x100,%ecx
  opiodr()+11360 (0x95be6f8) jz 0x95bc8c7
  opiodr()+11366 (0x95be6fe) mov -0x18(%rbp),%eax
  opiodr()+11369 (0x95be701) cmp $60,%eax

*** 2016-02-01 17:40:23.660
dbkedDefDump(): Starting a non-incident diagnostic dump (flags=0x1, level=3, mask=0x0)
----- Error Stack Dump -----
ORA-07445: exception encountered: core dump [opiodr()+11347] [SIGSEGV] [ADDR:0x3D8] [PC:0x95BE6EB] [Address not mapped to object] []
ORA-27135: Operating System hard stack limit is set too low ----------->>>>>>>注意此处
Additional information: 1048576
Additional information: 2097152
----- SQL Statement (None) -----
Current SQL information unavailable - no SGA.
以下省略。。。

最后确认,是/etc/security/limits.conf文件的问题:

oracle soft nproc 2047 
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536 
oracle soft stack 1024--->此处应该是10240,依据:Requirements for Installing Oracle 11gR2 RDBMS on RHEL6 or OL6 64-bit (x86-64) (文档 ID 1441282.1)

修改完之后,关闭dbca界面,exit退出oracle用户,su - oracle用户,再重新发起dbca即可。

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
ORA-2547误是Oracle数据库中的一个常见误,它表示数据库连接丢失。这个误通常是由于网络连接问题或数据库服务器出现问题引起的。 当客户端应用程序尝试与数据库建立连接时,它会发送一个请求到数据库服务器。如果数据库服务器在接收请求时出现问题,或者在处理请求时遇到误,就会产生ORA-2547误,表示连接丢失。 要解决ORA-2547误,我们可以采取以下几个步骤: 1. 检查网络连接:首先,我们需要确保客户端和数据库服务器之间的网络连接是正常的。检查网络连接的状态,包括网络带宽、网络延迟等。 2. 检查数据库服务器状态:确认数据库服务器是否正常运行,检查数据库是否处于启动状态。可以通过运行一些简单的SQL语句,如SELECT * FROM DUAL等来测试数据库服务器是否可用。 3. 检查防火墙配置:如果在客户端或数据库服务器上启用了防火墙,可能会阻止数据库连接。确保防火墙配置允许数据库服务器和客户端之间的通信。 4. 检查监听器配置:Oracle数据库使用监听器来接受连接请求。检查监听器的配置文件(listener.ora)是否正确设置,在其中添加或修复有关数据库实例的配置。 5. 重启数据库服务:如果以上步骤都没有解决问题,可以尝试重启数据库服务。这可能会帮助清除一些临时问题或误状态。 总之,ORA-2547误表示数据库连接丢失,可能是由于网络连接问题或数据库服务器出现问题引起的。通过排查网络连接、数据库服务器状态、防火墙配置、监听器配置等因素,我们可以解决这个误并恢复数据库连接。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值