情况是这样的,很多开发同事的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开一天不用,再进去会延时一会,但是短时间里面都不会失灵了。
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客户端
本文永久更新链接地址:

Stored procedures are precompiled SQL statements in MySQL for improving performance and simplifying complex operations. 1. Improve performance: After the first compilation, subsequent calls do not need to be recompiled. 2. Improve security: Restrict data table access through permission control. 3. Simplify complex operations: combine multiple SQL statements to simplify application layer logic.

The working principle of MySQL query cache is to store the results of SELECT query, and when the same query is executed again, the cached results are directly returned. 1) Query cache improves database reading performance and finds cached results through hash values. 2) Simple configuration, set query_cache_type and query_cache_size in MySQL configuration file. 3) Use the SQL_NO_CACHE keyword to disable the cache of specific queries. 4) In high-frequency update environments, query cache may cause performance bottlenecks and needs to be optimized for use through monitoring and adjustment of parameters.

The reasons why MySQL is widely used in various projects include: 1. High performance and scalability, supporting multiple storage engines; 2. Easy to use and maintain, simple configuration and rich tools; 3. Rich ecosystem, attracting a large number of community and third-party tool support; 4. Cross-platform support, suitable for multiple operating systems.

The steps for upgrading MySQL database include: 1. Backup the database, 2. Stop the current MySQL service, 3. Install the new version of MySQL, 4. Start the new version of MySQL service, 5. Recover the database. Compatibility issues are required during the upgrade process, and advanced tools such as PerconaToolkit can be used for testing and optimization.

MySQL backup policies include logical backup, physical backup, incremental backup, replication-based backup, and cloud backup. 1. Logical backup uses mysqldump to export database structure and data, which is suitable for small databases and version migrations. 2. Physical backups are fast and comprehensive by copying data files, but require database consistency. 3. Incremental backup uses binary logging to record changes, which is suitable for large databases. 4. Replication-based backup reduces the impact on the production system by backing up from the server. 5. Cloud backups such as AmazonRDS provide automation solutions, but costs and control need to be considered. When selecting a policy, database size, downtime tolerance, recovery time, and recovery point goals should be considered.

MySQLclusteringenhancesdatabaserobustnessandscalabilitybydistributingdataacrossmultiplenodes.ItusestheNDBenginefordatareplicationandfaulttolerance,ensuringhighavailability.Setupinvolvesconfiguringmanagement,data,andSQLnodes,withcarefulmonitoringandpe

Optimizing database schema design in MySQL can improve performance through the following steps: 1. Index optimization: Create indexes on common query columns, balancing the overhead of query and inserting updates. 2. Table structure optimization: Reduce data redundancy through normalization or anti-normalization and improve access efficiency. 3. Data type selection: Use appropriate data types, such as INT instead of VARCHAR, to reduce storage space. 4. Partitioning and sub-table: For large data volumes, use partitioning and sub-table to disperse data to improve query and maintenance efficiency.

TooptimizeMySQLperformance,followthesesteps:1)Implementproperindexingtospeedupqueries,2)UseEXPLAINtoanalyzeandoptimizequeryperformance,3)Adjustserverconfigurationsettingslikeinnodb_buffer_pool_sizeandmax_connections,4)Usepartitioningforlargetablestoi


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 English version
Recommended: Win version, supports code prompts!

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Notepad++7.3.1
Easy-to-use and free code editor
