/var/tmp/.oracle 和 oracle listener (監聽)的一點理解,.oraclelistener

來源:互聯網
上載者:User

/var/tmp/.oracle 和 oracle listener (監聽)的一點理解,.oraclelistener

 

關於 /var/tmp/.oracle 的作用測試

~---查看 /var/tmp 的許可權

[root@lixora var]# ll
total 164
。。。
drwxrwxrwt  3 root root 4096 Oct 31 13:16 tmp

 

[root@lixora .oracle]# ll
total 0
srwxrwxrwx 1 oracle10g oinstall 0 Oct 31 14:11 s#12569.1
srwxrwxrwx 1 oracle10g oinstall 0 Oct 31 14:11 s#12569.2
srwxrwxrwx 1 oracle10g oinstall 0 Oct 31 14:11 sEXTPROC0

 

-----修改/var/tmp 的許可權

[root@lixora var]# chmod 444 tmp
[root@lixora var]# ll
。。。
dr--r--r--  3 root root 4096 Oct 31 13:16 tmp
。。。

 

-----嘗試啟動監聽

[oracle10g@lixora ~]$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 31-OCT-2014 14:13:31

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Starting /u02/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u02/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u02/app/oracle/product/10.2.0/db_1/network/log/listener.log
Error listening on: (ADDRESS=(PROTOCOL=ipc)(PARTIAL=yes)(QUEUESIZE=1))
No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=lixora)(PORT=1521)))
TNS-12557: TNS:protocol adapter not loadable
 TNS-12560: TNS:protocol adapter error
  TNS-00527: Protocol Adapter not loadable


Listener failed to start. See the error message(s) above...

 

 

 

----再次修改 /var/tmp 的許可權

[root@lixora var]# chmod 777 tmp
[root@lixora var]# ll
。。。
drwxrwxrwx 3 root root 4096 Oct 31 13:16 tmp
。。。

 

再次去啟動監聽,可以正常啟動

關於錯誤

ORA-12557: TNS:protocol adapter not loadable
Cause: On some platforms (such as OS/2) protocol adapters are loaded at run-time. If the shared library (or DLL) for the protocol adapter is missing or one of its supporting libraries is missing then this error is returned.
Action: For further details, turn on tracing and reexecute the operation. The trace file will include the name of the shared library (or DLL) that could not be loaded.

1. Make sure the %ORACLE_HOME%/bin directory is in your PATH.
2. Make sure the protocol is typed/specified correctly in your tnsnames.ora file or whatever source you're using to resolve servicenames.
3. TCP is the default protocol and is installed by default. Ifyou're using something different (like SPX) make sure you installed the protocol adapter.
4. Make sure TOAD is using the correct oracle home if you have multiple homes installed

 

貌似也沒有涉及到相關的錯誤描述啊!但是到底 /var/tmp/.oracle 下的檔案是啥呢? 根據檔案的描述:

[root@lixora .oracle]# ll
total 0
srwxrwxrwx 1 oracle10g oinstall 0 Oct 31 14:08 s#12538.1
srwxrwxrwx 1 oracle10g oinstall 0 Oct 31 14:08 s#12538.2
srwxrwxrwx 1 oracle10g oinstall 0 Oct 31 14:08 sEXTPROC0
[root@lixora .oracle]# ps -ef|grep 12538
54322    12538     1  0 14:08 ?        00:00:00 /u02/app/oracle/product/10.2.0/db_1/bin/tnslsnr LISTENER -inherit

這些檔案均是 socket 檔案, 且s#12368.1 中的12568 為進程號,經查證是 監聽的進程號

那麼這些scoket 是用來幹嘛的呢?

ODM find:

The hidden directory  '/var/tmp/.oracle' (or /tmp/.oracle on some platforms) or its content was removed while instances & the CRS stack were up and running. Typically this directory contains a number of "special" socket files that areused by local clients to connect via the IPC protocol (sqlnet) to various Oracle processes including the TNS listener, the CSS, CRS & EVM daemons or even  database or ASM instances. These files are created when the "listening" process starts. 

 

就是說:這些socket 文被用作 本地用戶端使用處理序間通訊協議(ipc)和不同的oracle的進程通訊,而這些進程包括:tns 監聽,css ,crs,evm 守護進程;甚至資料庫和asm 執行個體。這些socket 由‘主動監聽’的進程建立。在這裡oracle tns listener 建立這些socket 檔案主要使用用作pmon 和 tnslsnr  通訊從報錯資訊裡就可以看出問題:

Error listening on: (ADDRESS=(PROTOCOL=ipc)(PARTIAL=yes)(QUEUESIZE=1))

 

 

不知道以上分析是否確切,不當之處請拍磚:-)

 

 

 

 

 

 

 

 

 

 


oracle的OracleOraHome92TNSListener服務與oracle net manager中的監聽程式(LISTENNER)有什關係與不同

OracleOraHome92TNSListener服務與oracle net manager中的監聽程式(LISTENNER)是一一對應的,當你用Net Configuration Assitant建立一個Listener,在系統服務裡就對建立一個對應的OracleOraHome92TNSListener服務(服務名字最後幾個字母不一樣,因為你建立的監聽器的名字不同),同時net manager中也會多出一個監聽器。
 
oracle 無監聽程式,有配置listener與tnsnames服務

DEMO =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.22.12.33)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = demo)
)
)

中的SERVICE_NAME 改成跟監聽裡面的SID一樣,即SERVICE_NAME = ORCL;

如果不行的話,tnsping一下看下什麼結果。
 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.