oracle12C中max,oracle 12c max_idle_time tips

Oracle 12c MAX_IDLE_TIME Tips

MAX_IDLE_TIME

We can set idle time to control the idle sessions from Oracle Database 12.2.

1. Max_idle_time is new parameter from 12.2.

2. alter system .... to set the idle time for whole DB(cdb/pdb), NOT for special session. (Can NOT use alter session ...).

3. max_idle_time's valule is NOT second, it is minuties. So the time is NOT accurate.

Test

There will be ORA-03113 error while the session has MAX_IDLE_TIME minuties.

# [ [email protected]:/home/oracle [02:49:37] [19.3.0.0.0 [DBMS EE] SID=orcl] 0 ] #

# sqlplus [email protected]:1521/pdb1 as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jul 17 02:49:51 2019

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

[email protected]:1521/pdb1> show parameter max_idle_time

NAME TYPE VALUE

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

max_idle_time integer 0

[email protected]:1521/pdb1> alter system set max_idle_time=1;

System altered.

[email protected]:1521/pdb1> show parameter max_idle_time

NAME TYPE VALUE

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

max_idle_time integer 1

[email protected]:1521/pdb1> exit

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

# [ [email protected]:/home/oracle [02:50:36] [19.3.0.0.0 [DBMS EE] SID=orcl] 0 ] #

# sqlplus [email protected]:1521/PDB1

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jul 17 02:50:57 2019

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.

Last Successful login time: Wed Jul 17 2019 02:49:13 +00:00

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

[email protected]:1521/PDB1> select * from dual;

D

-

X

[email protected]:1521/PDB1> set time on

02:51:16 [email protected]:1521/PDB1> select * from dual;

D

-

X

02:51:21 [email protected]:1521/PDB1>

02:51:21 [email protected]:1521/PDB1> select * from dual;

select * from dual

*

ERROR at line 1:

ORA-03113: end-of-file on communication channel

Process ID: 6417

Session ID: 237 Serial number: 46791

02:53:18 [email protected]:1521/PDB1>

Have a good work&life! 2019/07 via LinHong

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值