文档课题:MAX_IDLE_TIME参数解析.
数据库:oracle 19.3
系统:Windows 11
参数介绍:
MAX_IDLE_TIME specifies the maximum number of minutes that a session can be idle. After that point, the session is automatically terminated.
Note:This parameter is available starting with Oracle Database 12c Release 2 (12.2.0.1).

实验目标:测试max_idle_time参数,一个session到达指定分钟后,是否会断开?
C:\Users\Administrator>sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on 星期三 6月 22 20:43:13 2022
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
连接到:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> show parameter idle_time
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
max_idle_time integer 0
SQL> alter system set max_idle_time=2;
系统已更改。
SQL> show parameter idle_time
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
max_idle_time integer 2
SQL> select systimestamp from dual;
SYSTIMESTAMP
---------------------------------------------------------------------------
22-6月 -22 08.44.15.899000 下午 +08:00
重新登陆
说明:此处测试到非sys用户重新登陆后两分钟后连接报错,system用户在securecrt上测试是失败的.
隔2分钟后再次查询就报错.
SQL> select systimestamp from dual;
select systimestamp from dual
*
第 1 行出现错误:
ORA-03113: 通信通道的文件结尾
进程 ID: 5160
会话 ID: 8 序列号: 26490
SQL> select * from dual;
ERROR:
ORA-03114: 未连接到 ORACLE