oracle通信协议TNS的说明

http://forums.oracle.com/forums/thread.jspa?threadID=613450

 

Oracle的通信协议TNS对不完全对外公开的,只用成为oracle的合作伙伴并向oracle支付一定的费用才能使用。

 

Jonah H. Harris对oracle的通信协议进行了深入的研究,致力于解析oracle通信协议,实现一个自己的oracle驱动。

他在个人站点 http://www.oracle-internals.com 发表了一些文章介绍。

 

作者自己也是通过抓包分析来了解TNS协议的。

 

--------------------------------

 

Oracle's wire-level protocol is proprietary and not publicly documented. The only way to get a hold of the official specification is to become a partner and pay (what I've heard is) about $100K US for access to it. If you want to research the protocol yourself, there are several online sources of information if you can get the Google keywords just right.

If you're looking for starting information, you can find basic protocol information in David Litchfield's Oracle Hacker's Handbook . If you're looking for a bit more detailed code, you can find dissectors for Oracle's protocol from the Wireshark project (formerly Ethereal) at:

For TNS (Transparent Network Substrate):
http://anonsvn.wireshark.org/wireshark/trunk/epan/dissectors/packet-tns.c
http://anonsvn.wireshark.org/wireshark/trunk/epan/dissectors/packet-tns.h

For TTI (Two-Task Interface):
http://anonsvn.wireshark.org/wireshark/trunk/epan/dissectors/packet-sqloracle.c
http://anonsvn.wireshark.org/wireshark/trunk/epan/dissectors/packet-sqloracle.h

The Wireshark TNS dissector is fairly complete, but the TTI one is far from it.

FYI, I started researching the Oracle protocol in 2001 and now know enough about it to write my own wire-level driver. While I won't release the code to it, in the next couple months you can visit my soon-to-be-fixed website (http://www.oracle-internals.com/ ) for more information on the basic protocol.

Also, if you happen to attend IOUG's COLLABORATE 08, I'm actually presenting on this topic in particular. The session information resides below:

--- 
381: Listening In: Passive Capture and Analysis of Oracle Network Traffic
http://iougew.prod.web.sba.com/displaymod/detailevent.cfm?conference_id=52&event_id=1666

In this presentation we will discuss and demonstrate the methods for passively capturing, analyzing, and reporting the details of Oracle network traffic in real-time for use in end-to-end Oracle tuning and troubleshooting scenarios.

In cases where very short response time requirements must be met, or where sporadic spikes in response time occur, the most reliable way to tune and troubleshoot them is by capturing Oracle's Ethernet traffic, analyzing it, and reporting on various aspects of it. Throughout this session we will demonstrate the passive capture of SQL statements, their frequency, time spent in execution, number of roundtrips, and all relevant response times.

Using the data from these reports can not only assist DBAs in diagnosing network-related issues and in tuning Oracle's network settings, but also ensure that application developers are writing performant, network-friendly database access code.

 


Oracle TNS 314 协议Oracle 数据库中用于客户端与服务器之间建立网络连接的一种通信协议。在链接认证流程中,客户端与服务器之间需要进行一系列的握手过程来确保安全性和验证身份。 首先,客户端发送一个与服务器建立连接的请求。这个请求的包中包含了一些连接信息,如数据库实例名和监听端口号等。服务器接收到这个请求后,会根据其中的信息寻找对应的数据库实例。 接下来,服务器会发送一个回复包给客户端,包中包含了服务器对连接请求的回应信息。 然后,客户端会发送一个包给服务器,这个包中包含了客户端的用户名和密码等认证信息。这个认证信息会被服务器用于验证客户端的身份。 服务器在收到客户端的认证信息后,会进行身份验证。验证成功后,服务器会发送一个认证成功的回复给客户端。 客户端接收到服务器的认证成功回复后,会发送一个包给服务器,以确认连接状态。 最后,服务器接收到客户端的确认包后,确认连接状态,并发送一个连接确认的回复给客户端。 通过以上的链接认证流程,客户端与服务器之间建立了安全的连接,并且成功验证了双方的身份。这样,客户端就可以通过这个连接与服务器进行数据的传输和交互。 在包分析中,我们可以通过抓包工具(如Wireshark)来捕获这些网络数据包,并进行解析和分析。通过分析这些数据包的结构和内容,我们可以更深入地了解 Oracle TNS 314 协议的工作原理和通信过程,从而为系统的故障排查和性能优化提供依据。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值