Oracle网络服务及管理工具.ppt
第三讲 Oracle网络服务及管理工具,本章目标,Listener,Listener Continue,A listener process can listen for more than one databaseMultiple listeners can listen on behalf of a single database to perform load balancingThe listener can listen for multiple protocolsThe default name of the listener in Oracle Net is LISTENERThe name of the listener must be unique per listener.ora file,Connection Methods,Spawn and Bequeath Connections,Spawn and Bequeath Connections,1.The listener receives a client connection request.2.The listener starts a dedicated server process,and the dedicated server inherits the connection request from the listener.3.The client is now connected directly to the dedicated server.If,because of the operating system or protocol,a connection cannot be passed between two different processes on the same machine,a redirect must take place instead.Note:When a client disconnects,the clients dedicated server process closes.,Direct Hand-Off Connections,Direct Hand-Off Connections,1.The listener receives a client connection request.2.The listener hands the connect request directly to the dispatcher.3.The client is now connected to the dispatcher.,Redirected Session,Redirected Session,1.The client establishes a connection to the listener by using the configured protocol and sends the listener a connect packet.2.The listener checks that the SID is defined.If it is,the listener will spawn a new thread or process to service the new connection.An IPC connection is then established between the listener and the new process or thread.3.The new process or thread selects a new TCP/IP port from the list of free user-defined ports and passes this information back to the listener.4.The listener inserts this new port into a redirect packet and sends it back to the client and the original TCP socket between the client and the listener is then reset.5.A new TCP connection is established to the redirect address specified in the redirect packet and a connect packet is then forwarded to the dedicated server process.6.The dedicated server process can now finally accept the incoming connection and forwards an ACCEPT message back to the client.,Listener服务配置及注册,Static Service Registration:The listener.ora File,Create a Listener-Netca,oracleORACLE$ORACLE_HOME/bin/netmgr,Create a Listener-Netmgr,oracleORACLE$ORACLE_HOME/bin/netmgr,Create a tnsname.ora-Netmgr,oracleORACLE$/opt/u01/oracle/bin/netmgr,本章总结,Listener的作用;Listener的创建;Tnsname.ora的作用;远程客户端的连接;,