zoukankan      html  css  js  c++  java
  • 【ORACLE】数据库空闲1分钟自动断开

    -- 开启参数,创建概要文件
    SQL> show parameter resource_limit;

    NAME                                     TYPE         VALUE
    ------------------------------------ ----------- ------------------------------
    resource_limit                             boolean         FALSE
    SQL>
    SQL> alter system set resource_limit=true;

    System altered.

    SQL> show parameter resource_limit;

    NAME                                     TYPE         VALUE
    ------------------------------------ ----------- ------------------------------
    resource_limit                             boolean         TRUE


    SQL> create profile test_profile limit idle_time 1;

    Profile created.

    SQL> alter user scott profile test_profile;

    User altered.
    -- 测试登陆

    [oracle@rac01 ~]$ sqlplus scott/redhat

    SQL*Plus: Release 11.2.0.4.0 Production on 星期二 3月 6 17:02:38 2018

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


    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Data Mining and Real Application Testing options

    SQL> select * from dual;

    D
    -
    X

    SQL> /
    select * from dual
    *
    ERROR at line 1:
    ORA-02396: 超出最大空闲时间, 请重新连接

    -- 删除测试概要文件
    SQL> select username,profile from dba_users where profile=' TEST_PROFILE';

    USERNAME                       PROFILE
    ------------------------------ ------------------------------
    SCOTT                                 TEST_PROFILE

    SQL> drop profile test_profile cascade;

    Profile dropped.






  • 相关阅读:
    深入理解jsonp跨域请求原理
    vue项目性能优化总结
    脱离Office约束,C#结合Mpxj组件完美解析MSProject(.mpp)文件
    将list转换成DataTable
    json时间格式化
    C# DES加密解密
    asp.net mvc ViewBag常用操作
    Jquery ajax与asp.net MVC前后端各种交互
    存储过程实现树形目录外联其他表实现每个节点的统计
    CSS自定义右键菜单
  • 原文地址:https://www.cnblogs.com/xphdbky/p/8746166.html
Copyright © 2011-2022 走看看