12
返回列表 发新帖
楼主: ninigirl

使用数据库链接的时候网络出现问题

[复制链接]
论坛徽章:
0
11#
 楼主| 发表于 2005-3-15 09:38 | 只看该作者
最初由 husthxd 发布
[B]

1.连接过程:
1. Example of a connection to the server:
a.        The listener process is responsible for detecting and routing the incoming requests  to the proper destination.  Except when connection is established through a special method called hostnaming.
  
b.        A user initiates a connect request by passing password/username and servicename The service name maps to a connect descriptor wich is resolved by hostnaming, local naming or oracle names. (sqlnet.ora tnsnames.ora names.ora)

c.        When a service name is resolved a request is send to the listener.  The listener  determines were to direct the request.

e.        The listener spawns a serverprocess or redirects the connection to an existing process that handles the communication with the database.

f.        The client will directly communicate with the server process for the duration of  the session without involving the listener.

2.断开连接过程
Disconnection from the server:
a.        User initiated disconnect: a request to disconnect after transactions.
         
b.         Timer initiated disconnect: Dead connection detection to identify the connection  left hanging after an abnormal disconnect.
                -        If a user decides to power off the pc without quitting the application properly.
                -        On some OS's the server side process will be left running. This can  impede the server side resources.
                -         With the dead connection detection a small probe packet is send from the client with a user defined interval.  If the connection is invalid  the connection will be closed.  An error is generated and the server process will be terminated.
         
c.        Abnormal connection termination: Connections disconnected without noticing NET8. Net8 will notice the termination at the next data operation and will  effectively disconnect the current operation.  ---> ORA-3113

3.意外(exception)情况
Data and exception operations:
            * Data operations: All communication is done synchronously unless a multithreaded server is used.
         
        * Exceptions operations: When a user presses the interupt(ctrl-c) the application calls this function.  Additionaly the database can initiate a break to the client if abnormal operations occur.  There are 2 types of breaks:
                -         Inband breaks: are transmitted as part of regular data traffic using the normal protocol read and write functions.  These breaks are symply  queued.
                -        Outband breaks: are faster as it is send during urgent data messages. These messages cause signals and take a lot of load of the server. [/B]


版主,我有个问题,我想知道为什么这个session的状态一直是active,而且数据库不返回错误,我的过程中做的异常处理,可是这类的错误扑捉不到。有没有什么参数可使数据库操作超过预定的时间后就返回错误,而不只是杀掉进程

使用道具 举报

回复
论坛徽章:
168
马上加薪
日期:2014-02-19 11:55:142012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-01-04 11:49:54蜘蛛蛋
日期:2011-12-05 16:08:56ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41设计板块每日发贴之星
日期:2011-07-22 01:01:02ITPUB官方微博粉丝徽章
日期:2011-06-30 12:30:16管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:33
12#
发表于 2005-3-15 12:18 | 只看该作者
最初由 ninigirl 发布
[B]

版主,我有个问题,我想知道为什么这个session的状态一直是active,而且数据库不返回错误,我的过程中做的异常处理,可是这类的错误扑捉不到。有没有什么参数可使数据库操作超过预定的时间后就返回错误,而不只是杀掉进程 [/B]


没有接触过.
不过我觉得与其花这么多精力在这上面不如改善你的网络环境.
没办法改变了吗?

使用道具 举报

回复
论坛徽章:
0
13#
 楼主| 发表于 2005-3-15 14:56 | 只看该作者
我们决定不了网络,只能靠对数据库的管理,减轻问题的程度

版主,可以做个实验试试,执行个过程,然后把网线拔了,看看这个进程的状态

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表