|
|
最初由 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,而且数据库不返回错误,我的过程中做的异常处理,可是这类的错误扑捉不到。有没有什么参数可使数据库操作超过预定的时间后就返回错误,而不只是杀掉进程 |
|