sqlplus scott/system@ora10g報錯ORA-12537: TNS:connection closed
結論
1,ORA-12537: TNS:connection closed此報錯因為$ORACLE_HOME/bin/oracle許可權不對2,根據正常的許可權調整上述檔案的許可權
3,調整過程如下:
11.2.0.1
[oracle@seconary admin]$ ll -l $ORACLE_HOME/bin/oracle*
-rwsr-s--x 1 oracle oinstall 210824714 Aug 26 2013 /oracle/product/11.2.0/db_1/bin/oracle
-rwxr-x--- 1 oracle oinstall 0 Aug 15 2009 /oracle/product/11.2.0/db_1/bin/oracleO
10.2.0.5
[ora10g@seconary admin]$ ll -l $ORACLE_HOME/bin/oracle*
-rwxr-x--x 1 ora10g oinstall 125153402 Apr 18 2014 /home/ora10g/product/10.2.0/db_1/bin/oracle
-rwxr-x--- 1 ora10g oinstall 0 Apr 20 2010 /home/ora10g/product/10.2.0/db_1/bin/oracleO
[root@seconary ~]# chmod --reference /oracle/product/11.2.0/db_1/bin/oracle /home/ora10g/product/10.2.0/db_1/bin/oracle
[root@seconary ~]#
10.2.0.5
[ora10g@seconary admin]$ ll -l $ORACLE_HOME/bin/oracle*
-rwsr-s--x 1 ora10g oinstall 125153402 Apr 18 2014 /home/ora10g/product/10.2.0/db_1/bin/oracle
-rwxr-x--- 1 ora10g oinstall 0 Apr 20 2010 /home/ora10g/product/10.2.0/db_1/bin/oracleO
連線正常
[oracle@seconary ~]$ sqlplus scott/system@ora10g
SQL*Plus: Release 11.2.0.1.0 Production on Fri Nov 6 05:50:50 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
問題:
透過監聽連線報錯
[oracle@seconary help]$ sqlplus scott/system@ora10g
SQL*Plus: Release 11.2.0.1.0 Production on Fri Nov 6 04:59:16 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
ERROR:
ORA-12537: TNS:connection closed
STRACE跟蹤分析
[oracle@seconary help]$ strace sqlplus scott/system@ora10g
lstat("/home/oracle/oradiag_oracle/diag/clients/user_oracle/host_1191907454_76/trace/sqlnet.log", {st_mode=S_IFREG|0640, st_size=298601, ...}) = 0
open("/home/oracle/oradiag_oracle/diag/clients/user_oracle/host_1191907454_76/trace/sqlnet.log", O_WRONLY|O_CREAT|O_APPEND, 0660) = 10
write(10, " nt OS err code: 0\n", 22) = 22
close(10) = 0
munmap(0x2b4766bda000, 528384) = 0
open("/oracle/product/11.2.0/db_1/rdbms/mesg/oraus.msb", O_RDONLY) = 10
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
lseek(10, 0, SEEK_SET) = 0
read(10, "\25\23\"\1\23\3\t\t\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 256) = 256
lseek(10, 512, SEEK_SET) = 512
read(10, "v\31\3533\351J\370h7~\262\211\336\230\301\3303\373\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
lseek(10, 1536, SEEK_SET) = 1536
read(10, "\203\31\217\31\231\31\241\31\253\31\264\31\310\31\323\31,\0328\32Q\32`\32m\32{\32\222\32\232\32"..., 512) = 512
lseek(10, 242688, SEEK_SET) = 242688
read(10, "\r\0\3600\0\0V\0\3610\0\0\232\0\3630\0\0\327\0\3640\0\0\361\0\3650\0\0\5\1"..., 512) = 512
close(10) = 0
lseek(4, 5120, SEEK_SET) = 5120
read(4, "\r\0\351\0\0\0V\0\352\0\0\0\220\0\353\0\0\0\240\0\356\0\0\0\320\0\357\0\0\0\344\0"..., 512) = 512
write(1, "ERROR:\n", 7ERROR:
) = 7
write(1, "ORA-12537: TNS:connection closed"..., 33ORA-12537: TNS:connection closed
Fri Nov 06 04:59:16 2015
Directory does not exist for read/write [/oracle/product/11.2.0/db_1/log] [/oracle/product/11.2.0/db_1/log/diag/clients]
***********************************************************************
Fatal NI connect error 12537, connecting to:
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.0.3)(PORT=1981)))(CONNECT_DATA=(SERVICE_NAME=ora10g)(CID=(PROGRAM=sqlplus)(HOST=seconary)(USER=oracle))))
VERSION INFORMATION:
TNS for Linux: Version 11.2.0.1.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
Time: 06-NOV-2015 04:59:17
Tracing not turned on.
Tns error struct:
ns main err code: 12537
TNS-12537: TNS:connection closed
ns secondary err code: 12560
nt main err code: 507
TNS-00507: Connection closed
nt secondary err code: 0
nt OS err code: 0
手工建立上述沒有的目錄
[oracle@seconary rdbms]$ ll -l /oracle/product/11.2.0/db_1/log/diag/clients
ls: /oracle/product/11.2.0/db_1/log/diag/clients: No such file or directory
[oracle@seconary rdbms]$ mkdir -p /oracle/product/11.2.0/db_1/log/diag/clients
[oracle@seconary rdbms]$
還是不成
[oracle@seconary rdbms]$ sqlplus scott/system@ora10g
SQL*Plus: Release 11.2.0.1.0 Production on Fri Nov 6 05:06:20 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
ERROR:
ORA-12537: TNS:connection closed
Enter user-name:
11.2.0.1
[oracle@seconary admin]$ ll -l $ORACLE_HOME/bin/oracle*
-rwsr-s--x 1 oracle oinstall 210824714 Aug 26 2013 /oracle/product/11.2.0/db_1/bin/oracle
-rwxr-x--- 1 oracle oinstall 0 Aug 15 2009 /oracle/product/11.2.0/db_1/bin/oracleO
10.2.0.5
[ora10g@seconary admin]$ ll -l $ORACLE_HOME/bin/oracle*
-rwxr-x--x 1 ora10g oinstall 125153402 Apr 18 2014 /home/ora10g/product/10.2.0/db_1/bin/oracle
-rwxr-x--- 1 ora10g oinstall 0 Apr 20 2010 /home/ora10g/product/10.2.0/db_1/bin/oracleO
[root@seconary ~]# chmod --reference /oracle/product/11.2.0/db_1/bin/oracle /home/ora10g/product/10.2.0/db_1/bin/oracle
[root@seconary ~]#
10.2.0.5
[ora10g@seconary admin]$ ll -l $ORACLE_HOME/bin/oracle*
-rwsr-s--x 1 ora10g oinstall 125153402 Apr 18 2014 /home/ora10g/product/10.2.0/db_1/bin/oracle
-rwxr-x--- 1 ora10g oinstall 0 Apr 20 2010 /home/ora10g/product/10.2.0/db_1/bin/oracleO
連線正常
[oracle@seconary ~]$ sqlplus scott/system@ora10g
SQL*Plus: Release 11.2.0.1.0 Production on Fri Nov 6 05:50:50 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-1824979/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORA-12537: TNS:connection closed問題解決
- 【Oracle】ORA-12537: TNS:connection closed 問題處理Oracle
- ora-12537 TNS:connection closed的問題處理
- 解決11gR2 Rac ORA-12537: TNS:connection closed 一例
- Strace sqlplus scott/tiger@yws 很好處理tns問題SQL
- ORA-12537 TNS:資料庫連線錯誤資料庫
- Oracle TNS報錯大全Oracle
- 求助:移動端登入測試,報錯 RemoteDisconnected Remote end closed connection without response。REM
- ORA-12537 TNS:連線關閉
- sqlplus登入資料庫報錯ORA-12547: TNS:lost contactSQL資料庫
- 本機SQLPLUS 的時候報錯 ORA-12547: TNS: lost contactSQL
- sqlplus 啟動報錯SQL
- IgniteFAQ-10-使用hikariDataSource資料來源偶現日誌報錯load資料包connection is closed
- OGG Director報錯 Connection FAILEDAI
- MongoDB mongoimport 報錯:lost connection to serverMongoDBImportServer
- 客戶端連線EBS 11i VIS報ORA-12537: TNS: 連線已關閉 錯誤的解決客戶端
- TNS-12518: TNS:listener could not hand off client connectionclient
- TNS-12518 TNS listener could not hand off client connectionclient
- 32位系統報錯TNS-12547: TNS:lost contact
- Idea啟動專案報{dataSource-1} closed錯誤Idea
- Unable to unwrap data, invalid status [CLOSED]-服務端webSocket報錯服務端Web
- SQLServer映象報錯Connection handshake failedSQLServerAI
- go get報錯connect: connection refusedGo
- Oracle 11gR2 RAC連線報錯ora-12537錯誤Oracle
- ssh問題:ssh_exchange_identification: Connection closed by remote hostIDEREM
- 客戶端連線資料時會報“ORA-12537:TNS連線已關閉”客戶端
- oracle 啟動監聽報錯TNS-12547: TNS:lost contactOracle
- oracle手工建庫後建立scott使用者的emp表,conn scott/tiger報錯解決Oracle
- TNS-12547TNS-12560 TNS-00517 Linux Error: 104: Connection reset by peerLinuxError
- 解決okhttp報java.lang.IllegalStateException: closed,java.lang.IllegalStateException: closedHTTPJavaException
- TNS-12555報錯的解決方案
- TNS-12537報錯解決方法
- sqlplus執行sql檔案報錯SQL
- Oracle11G監聽報錯Connection refusedOracle
- RAC環境TNS-12541報錯處理
- windows下配置監聽報錯:TNS-04406:物件已經存在、TNS-04415:檔案 I/O 錯誤Windows物件
- 支付寶轉賬介面HTTP/2 stream 0 was not closed close cleanly報錯解決HTTP
- 【轉】ORACLE TNSING報錯(TNS-03505)的解決Oracle