PLSQL automatically disconnects and loses connection.

Source: Internet
Author: User

PLSQL automatically disconnects and loses connection.
Problem Background:

This is the case. Many developers work 8 hours on plsql. Sometimes, after they go out to smoke or finish lunch, they will return an error and report no response when they come back to plsql, after getting stuck for a long time, I had to log on to plsql again to make it take effect. I guess this is because the connection is invalid. This situation often happens and does not affect work efficiency and mood.

 

1. Check the connection time of the following CONNECT_TIME.

 

SQL> select * from dba_profiles t wheret. resource_name = 'connect _ time ';

PROFILE RESOURCE_NAME RESOURCE_TYPE LIMIT

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

DEFAULT CONNECT_TIME KERNEL UNLIMITED

MONITORING_PROFILE CONNECT_TIME KERNEL DEFAULT

TMPOPT CONNECT_TIME KERNEL DEFAULT

MYPROFILE CONNECT_TIME KERNEL DEFAULT

 

SQL>

 

How can we find the profile that the powerdesk user belongs? View the current user's CONNECT_TIME

 

SQL> select * from user_resource_limits;

RESOURCE_NAME LIMIT

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

COMPOSITE_LIMIT UNLIMITED

SESSIONS_PER_USER UNLIMITED

CPU_PER_SESSION UNLIMITED

CPU_PER_CALL UNLIMITED

LOGICAL_READS_PER_SESSION UNLIMITED

LOGICAL_READS_PER_CALL UNLIMITED

IDLE_TIME UNLIMITED

CONNECT_TIME UNLIMITED

PRIVATE_SGA UNLIMITED

9 rows selected

 

SQL>

 

We can see that CONNECT_TIME is UNLIMITED and there is no limit. Why is the plsql connection unresponsive?


Original blog address: blog.

 

2. Use sqlplus for connection verification in cmd.

Sqlplus connection, no operation in the past 30 minutes, operation again connected to the db, normal use, it seems this has nothing to do with oracledb, should look at the plsql settings

 

 

3. Set it in plsql.

Go to Tools of plsql, go to Preferences, select Connection type on the left, and select Check connection, as shown in 1.png:

This will be a little more stable. Of course, you may not need to open the plsq for a day. If you enter it again, it will be delayed for a while, but it will not fail in a short time.

 

 

PS: for subsequent problems, plsql keeps connecting. However, if you close the previously opened execution file or SQL window, it will still get stuck and report unresponded information, in this case, you only need to forcibly close plsql and re-open the login.

 

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.