sql - 如何自动终止事件 session ?

标签 sql oracle plsql

我想在开始时间大于 1 小时时自动终止 session 。
我该怎么做?

最佳答案

你可以设置一个 空闲超时连接超时 在配置文件中,并根据需要将该配置文件分配给用户。
来自 the CREATE PROFILE documentation :

If a user exceeds the CONNECT_TIME or IDLE_TIME session resource limit, then the database rolls back the current transaction and ends the session. When the user process next issues a call, the database returns an error.

[...]

CONNECT_TIME : Specify the total elapsed time limit for a session, expressed in minutes.

IDLE_TIME : Specify the permitted periods of continuous inactive time during a session, expressed in minutes. Long-running queries and other operations are not subject to this limit.

关于sql - 如何自动终止事件 session ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54518111/

相关文章:

c# - ListView 显示 4 条记录。 DataGridView显示3条记录?

sql - 基于子元素值使用 PLSQL 提取 XML

database - 访问通过数据库链接在数据库中创建的表同义词

多列的 SQL 条件约束是唯一的

sql - postgresql 中的数据透视表

oracle - oracle 限制周日建表

java - 使用正则表达式解析 Oracle 脚本

php - 在mysql中使用Distinct和Sum

sql - 从mysql自连接中检索父值

c# - Oracle 同义词错误