• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

在Oracle中增加用户限制

mysql 搞代码 4年前 (2022-01-09) 13次浏览 已收录 0个评论

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

今天在项目开发中,,发现数据库连接数过多,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公社  】

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

Disconnected f

本文来源gaodai^.ma#com搞#代!码网

rom 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


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:在Oracle中增加用户限制
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址