查看: 3099|回复: 0

[Oracle数据库] Oracle dbca时报:ORA-12547: TNS:lost contact错误的解决

发表于 2018-3-28 08:00:06

前言

最近在工作中遇到了一个问题,错误是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文件,果然找到了:

  1. [oracle@dg1 log]$ pwd
  2. /u01/app/oracle/product/11.2.0/db_1/rdbms/log
  3. [oracle@dg1 log]$ ls -lrt
  4. total 9808
  5. -rw-r-----. 1 oracle oinstall 401207 Feb 1 16:16 dbua1557284_ora_8053.trc
  6. -rw-r-----. 1 oracle oinstall 401207 Feb 1 16:16 dbua1557284_ora_8062.trc
  7. -rw-r-----. 1 oracle oinstall 401207 Feb 1 16:16 dbua1557284_ora_8065.trc
  8. -rw-r-----. 1 oracle oinstall 401373 Feb 1 16:18 dg1_ora_8227.trc
  9. -rw-r-----. 1 oracle oinstall 401228 Feb 1 16:26 dg1_ora_2701.trc
  10. -rw-r-----. 1 oracle oinstall 401228 Feb 1 16:26 dg1_ora_2706.trc
  11. -rw-r-----. 1 oracle oinstall 401410 Feb 1 16:27 dg1_ora_2715.trc
  12. -rw-r-----. 1 oracle oinstall 401228 Feb 1 16:27 dg1_ora_2722.trc
  13. -rw-r-----. 1 oracle oinstall 401244 Feb 1 16:31 dbua3144297_ora_2792.trc
  14. -rw-r-----. 1 oracle oinstall 401244 Feb 1 16:31 dbua3144297_ora_2801.trc
  15. -rw-r-----. 1 oracle oinstall 401244 Feb 1 16:31 dbua3144297_ora_2804.trc
  16. -rw-r-----. 1 oracle oinstall 401410 Feb 1 16:34 dg1_ora_2930.trc
  17. -rw-r-----. 1 oracle oinstall 401341 Feb 1 17:27 dg1_ora_3181.trc
  18. -rw-r-----. 1 oracle oinstall 401090 Feb 1 17:27 dg1_ora_3187.trc
  19. -rw-r-----. 1 oracle oinstall 401341 Feb 1 17:27 dg1_ora_3190.trc
  20. -rw-r-----. 1 oracle oinstall 401090 Feb 1 17:28 dg1_ora_3205.trc
  21. -rw-r-----. 1 oracle oinstall 401341 Feb 1 17:28 dg1_ora_3210.trc
  22. -rw-r-----. 1 oracle oinstall 401090 Feb 1 17:28 dg1_ora_3214.trc
  23. -rw-r-----. 1 oracle oinstall 401090 Feb 1 17:36 dg1_ora_3313.trc
  24. -rw-r-----. 1 oracle oinstall 401341 Feb 1 17:37 dg1_ora_3329.trc
  25. -rw-r-----. 1 oracle oinstall 401090 Feb 1 17:37 dg1_ora_3341.trc
  26. -rw-r-----. 1 oracle oinstall 401090 Feb 1 17:37 dg1_ora_3344.trc
  27. -rw-r-----. 1 oracle oinstall 401341 Feb 1 17:40 dg1_ora_3369.trc
  28. -rw-r-----. 1 oracle oinstall 401341 Feb 1 17:40 dg1_ora_3375.trc
  29. -rw-r-----. 1 oracle oinstall 401090 Feb 1 17:40 dg1_ora_3378.trc
  30. [oracle@dg1 log]$
  31. [oracle@dg1 log]$ vi dg1_ora_3369.trc
  32. Dump file /u01/app/oracle/product/11.2.0/db_1/rdbms/log/dg1_ora_3369.trc
  33. *** 2016-02-01 17:40:23.652
  34. Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
  35. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  36. ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1
  37. System name: Linux
  38. Node name: dg1
  39. Release: 2.6.32-431.el6.x86_64
  40. Version: #1 SMP Sun Nov 10 22:19:54 EST 2013
  41. Machine: x86_64
  42. Instance name: dg1
  43. Redo thread mounted by this instance: 0 <none>
  44. Oracle process number: 0
  45. Unix process pid: 3369, image: oracle@dg1
  46. *** 2016-02-01 17:40:23.652
  47. skgm error 27135: errno = 0, info = 0, 0, 0, 0, 1048576, 2097152, 0
  48. skgm error 27135: errno = 0, info = 0, 0, 0, 0, 1048576, 2097152, 0
  49. *** 2016-02-01 17:40:23.654
  50. Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x3D8] [PC:0x95BE6EB, opiodr()+11347] [flags: 0x0, count: 1]
  51. Registers:
  52. %rax: 0x000000000c0ea630 %rbx: 0x000000000c0ea638 %rcx: 0x0000000000000000
  53. %rdx: 0x0000000000000000 %rdi: 0x000000000c0ccba0 %rsi: 0x00007fffa308e250
  54. %rsp: 0x00007fffa308d970 %rbp: 0x00007fffa308e440 %r8: 0x00007fffa308d970
  55. %r9: 0x00007fffa308e440 %r10: 0x00007fffa308c600 %r11: 0x00007fab40ec1538
  56. %r12: 0x000000000000003c %r13: 0x0000000000000004 %r14: 0x00007fffa308e6f8
  57. %r15: 0x0000000000000002 %rip: 0x00000000095be6eb %efl: 0x0000000000010246
  58. opiodr()+11325 (0x95be6d5) lea (%rax,%rbx),%rdx
  59. opiodr()+11329 (0x95be6d9) mov %rdx,(%rcx,%rbx)
  60. opiodr()+11333 (0x95be6dd) mov 0x2b34a84(%rip),%rax
  61. opiodr()+11340 (0x95be6e4) mov 0x178(%rax),%rdx
  62. > opiodr()+11347 (0x95be6eb) movzwl 0x3d8(%rdx),%ecx
  63. opiodr()+11354 (0x95be6f2) test $0x100,%ecx
  64. opiodr()+11360 (0x95be6f8) jz 0x95bc8c7
  65. opiodr()+11366 (0x95be6fe) mov -0x18(%rbp),%eax
  66. opiodr()+11369 (0x95be701) cmp $60,%eax
  67. *** 2016-02-01 17:40:23.660
  68. dbkedDefDump(): Starting a non-incident diagnostic dump (flags=0x1, level=3, mask=0x0)
  69. ----- Error Stack Dump -----
  70. ORA-07445: exception encountered: core dump [opiodr()+11347] [SIGSEGV] [ADDR:0x3D8] [PC:0x95BE6EB] [Address not mapped to object] []
  71. ORA-27135: Operating System hard stack limit is set too low ----------->>>>>>>注意此处
  72. Additional information: 1048576
  73. Additional information: 2097152
  74. ----- SQL Statement (None) -----
  75. Current SQL information unavailable - no SGA.
  76. 以下省略。。。
复制代码

解决方法

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

  1. oracle soft nproc 2047
  2. oracle hard nproc 16384
  3. oracle soft nofile 1024
  4. oracle hard nofile 65536
  5. 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即可。

总结

以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,如果有疑问大家可以留言交流,谢谢大家对程序员之家的支持。



回复

使用道具 举报