DB link hang Solution

Source: Internet
Author: User

Phenomenon: database a operates on Database B through db_link. It does not return data for a long time and hang will die in it.

Solution: add the following parameters to the sqlnet. ora file on Database B:
Sqlnet. expire_time = 10

10 represents 0 minutes

 

Extension:

If resource_limit = true is set. Use idle_time to limit the session idle time. Session idle exceeds the set time and the status is sniped (V $ session )., however, the process in the OS will not be released. When the session (user process) communicates with the server process again, the corresponding server process will be disabled.

The principles of sqlnet. expire_time are different. The Oracle server sends a packet to test the dead connection. If the connection is closed or no longer used, the corresponding server process is closed.

Use both of the preceding methods to reduce server process and prevent process from exceeding the init $ oracle_sid limit value.

DCD: Dead connection detection, which can be used to detect and mark a session that is frozen but not disconnected. Then, pmon cleans up the session and releases the resource.
To enable DCD, you only need to add the sqlnet. expire_time parameter to the sqlnet. ora file on the server, in minutes:

SQLNET.EXPIRE_TIME=10

If the time reaches this value,ServerThe client sends a "probe" packet to the client. If it is normal for the client to be disconnected, the packet will be ignored and timer will re-timer. If the client is interrupted abnormally, the server receives a message to release the connection.

 

E text:

Sqlnet. expire_time actually works on a different principle and is used to detect dead connectionsas opposed to disconnecting (actually 'sniping') A session based on idle_time which the profile accomplishes.

Sqlnet. expire_time basically instructs the server to send a probe packet every set minutes to the client, and if it finds a terminated connection or a connection that is no longer in use, causes the associated server process to terminate on the server.
A valid database connection that is idle will respond to the probe packet causing no action on the part of the server, whereas the resource_limit will snipe the session when idle_time is exceeded. the 'sniped' session will get disconnected when the user (or the user process) tries to communicate with the server again.
But again, as you mentioned, expire_time works globally while idle_time profile works for that user. you can use both of them to make sure that the client not only gets sniped but also gets disconnected if the user process abnormally terminates.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.