始创于2000年 股票代码:831685
咨询热线:0371-60135900 注册有礼 登录
  • 挂牌上市企业
  • 60秒人工响应
  • 99.99%连通率
  • 7*24h人工
  • 故障100倍补偿
您的位置: 网站首页 > 帮助中心>文章内容

在Oracle中增加用户限制

发布时间:  2012/9/19 17:27:36

今天在项目开发中,发现数据库连接数过多,Oracle中存在很多超时连接。导致新增客户端无法连接到数据库。所以设置了强制释放oracle连接属性。

在网上查询了设置说明如下:

sqlplus /nolog
打开sqlplus
connect system/bianqiwei@orcltns as sysdba
使用具有dba权限得用户登陆Oracle-
 

show parameter resource_limit
显示资源限定是否开启,value为true是开启,为false是关闭
alter system set resource_limit=true
如果未开启,则使用此命令开启资源限定功能
create profile profileName limit connect_time 60 idle_time 30
创建profile文件,profileName任意起,connect_time设置连接超过多少分钟后强制释放,idle_time设置连续不活动的会话超过多少分钟后强制释放
alter user OracleUser profile profileName
将profile文件作用于指定用户 【LINUX公社 www.LinuxIDC.com 】

在数据库中的实际操作如下:

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
[Oracle@nsn-db-server ~]$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 22 16:14:11 2009

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> show parameter resource

NAME                                 TYPE
------------------------------------ ---------------------------------
VALUE
------------------------------
resource_limit                       boolean
FALSE
resource_manager_plan                string

SQL> alter system set resource_limit=true;

System altered.

SQL> create profile sbaplimit20091222 limit connect_time 60 idle_time 30
  2 
SQL> create profile sbaplimit20091222 limit connect_time 60 idle_time 30
  2 
SQL>
SQL> create profile sbaplimit20091222 limit connect_time 60 idle_time 30;

Profile created.

SQL> alter user sbap profile sbaplimit20091222_;

User altered.

SQL> exit


 


本文出自:亿恩科技【www.enkj.com】

服务器租用/服务器托管中国五强!虚拟主机域名注册顶级提供商!15年品质保障!--亿恩科技[ENKJ.COM]

  • 您可能在找
  • 亿恩北京公司:
  • 经营性ICP/ISP证:京B2-20150015
  • 亿恩郑州公司:
  • 经营性ICP/ISP/IDC证:豫B1.B2-20060070
  • 亿恩南昌公司:
  • 经营性ICP/ISP证:赣B2-20080012
  • 服务器/云主机 24小时售后服务电话:0371-60135900
  • 虚拟主机/智能建站 24小时售后服务电话:0371-60135900
  • 专注服务器托管17年
    扫扫关注-微信公众号
    0371-60135900
    Copyright© 1999-2019 ENKJ All Rights Reserved 亿恩科技 版权所有  地址:郑州市高新区翠竹街1号总部企业基地亿恩大厦  法律顾问:河南亚太人律师事务所郝建锋、杜慧月律师   京公网安备41019702002023号
      1
     
     
     
     

    0371-60135900
    7*24小时客服服务热线