search
HomeDatabaseMysql TutorialPLSQL 经常自动断开失去连接的解决过程

情况是这样的,很多开发同事的PLSQL上班时间开着8个小时,有时候他们出去抽烟后或者中午吃完饭,回来在PLSQL上面执行就报错无响应

问题背景:

情况是这样的,很多开发同事的PLSQL上班时间开着8个小时,有时候他们出去抽烟后或者中午吃完饭,回来在PLSQL上面执行就报错无响应,然后卡住了半天动弹不了,非得重新登录plsql才生效,,我猜猜是因为连接失效的缘故,经常碰到这种情况,还没有影响工作效率和工作心情的。

1,去查看以下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>

看到有4个,那如何找到powerdesk用户所属于的那个profile呢?去查看当前用户的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>

看到CONNECT_TIME是UNLIMITED,没有限制,那么为什么plsql连接会出现未响应的现象呢?

2,cmd里面去用sqlplus连接验证

sqlplus连接上,过去30分钟不操作,再次操作连接db,正常使用,看来这和Oracledb无关了,应该要去看看plsql的设置了

3,去plsql里面设置

进入plsql的Tools,再进入Preferences,然后选择左边的Connection选型,选择Check connection,如下图1.png所示:

PLSQL 经常自动断开失去连接的解决过程

这会比较稳定一些,当然可能你PLSQL开一天不用,再进去会延时一会,但是短时间里面都不会失灵了。

PS:后续问题,PLSQL不断开连接,但是你关闭以前打开的执行文件或者sql窗口还是会卡住,报未响应的情况,这种只要强行关闭PLSQL重新打开登录了。

Oracle 10g 安装后重启系统,用PLSQL连接报没有监听

ORA-03114 PLSQL过程编译断开连接错误

PLSQL 连接 Oracle简单配置

PLSQL批量Forall操作性能提升详解

使用Oracle SQLDeveloper连接数据库并创建用户

Oracle自带的PL/SQL Developer导入导出数据

在64位Win7系统下安装Oracle 11g和Oracle SQL Developer客户端

本文永久更新链接地址

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Reduce the use of MySQL memory in DockerReduce the use of MySQL memory in DockerMar 04, 2025 pm 03:52 PM

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

How to solve the problem of mysql cannot open shared libraryHow to solve the problem of mysql cannot open shared libraryMar 04, 2025 pm 04:01 PM

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

How do you alter a table in MySQL using the ALTER TABLE statement?How do you alter a table in MySQL using the ALTER TABLE statement?Mar 19, 2025 pm 03:51 PM

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Run MySQl in Linux (with/without podman container with phpmyadmin)Run MySQl in Linux (with/without podman container with phpmyadmin)Mar 04, 2025 pm 03:54 PM

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

What is SQLite? Comprehensive overviewWhat is SQLite? Comprehensive overviewMar 04, 2025 pm 03:55 PM

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

Running multiple MySQL versions on MacOS: A step-by-step guideRunning multiple MySQL versions on MacOS: A step-by-step guideMar 04, 2025 pm 03:49 PM

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

How do I configure SSL/TLS encryption for MySQL connections?How do I configure SSL/TLS encryption for MySQL connections?Mar 18, 2025 pm 12:01 PM

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?Mar 21, 2025 pm 06:28 PM

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download

Atom editor mac version download

The most popular open source editor