Pro * C connection interruption test (Oracle 9i)

Source: Internet
Author: User
To test the robustness of the application, Deliberately interrupt the Pro * C program that is normally connected, so as to observe their performance.

The test method is as follows: 1. When compiling the Pro * C application, add cpool = No or cpool = yes to test the different performance of the connection pool and no connection pool; 2. After the application is started, wait for the input and stop the process. 3. query the Session of the test program in the database:
Select*FromV $ sessionWhereProgrampolic'testconnpool.exe ';
4. Generate the code to kill the session:

Select'Alter system kill session ''' | Sid | ',' | serial # | ''';'
FromV $ session
WhereProgrampolic'testconnpool.exe ';

5. Execute the SQL statement to kill the session:
Alter System Kill Session'2017 8 ';.....
6. Press any key to continue the application execution and view the error message. 7. Try to reconnect when an error occurs. The following are the test results in various cases:
Test Status Error code for calling Reconnect

If you do not use a connection pool, use kill session to manually disconnect the connection.

ORA-00028 your session has been killed Yes

Use the connection pool and kill session to manually disconnect all connections

ORA-03114: not connected to oralce No. The connection pool is damaged and only the process is restarted. This error is displayed when reconnecting: ORA-00022 invalid session ID; Access Denied

Use the connection pool and kill session to manually disconnect the connection pool.

No error is reported. It is strange that physical connections are disconnected, and the results are still normal.  

Use the connection pool and kill session to manually disconnect non-connection pool connections

ORA-03114: not connected to oralce Yes.
If the connection pool is not used, disconnect the network cable and restore the network connection. ORA-12571: TNS: Packet writer failure Yes. This error is caused by a client error. A new session is created after the connection is reconnected, and the old session is still in the session List of oracle. (If the application crashes and restarts frequently, the connection to Oracle may be exhausted)
Use the connection pool to disconnect the network cable and restore the network connection. ORA-12571: TNS: Packet writer failure Yes. Oracle re-creates the physical connection of the connection pool, but does not create a new logical connection.
 

 

Related Article

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.