例:创建一个概要文件 create profile CLERK_PROFILE limit session_per_user 1 #用户可拥有的会话次数 idle_time 10 #进程处于空闲状态的时间(10分钟) 然后就可以将该概要文件授予一个用户 alter user A profile CLERK_PROFILE;
to bzszp(SongZip) : 谢谢你的回答。 我还想问一下,如果我想设idle_time 为unlimited,不知道这种设置是否合理? 还有你知道其他大型数据库有类似的情况吗?
好像如上我设置了后不起作用耶,我设置成一分钟,而一分钟后oracle也不断开连接呀?
to potee(糯米) : 能麻烦你查一下吗?to zhaokeke2004(大力): 你说的是什么概要文件呀,我按bzszp(SongZip)说道作了,并重新启动了数据库
概要文件就是那个profile文件,重新启动数据库后要启用资源限制文件(profile) alter system set resource_limit = ture
to zhaokeke2004(大力):好像还是不对。我现在想设置连接永远不超时,使用如下profile,其中srm30_user是我使用的用户- Create profile create profile DEFAULT limit sessions_per_user unlimited cpu_per_session unlimited cpu_per_call unlimited connect_time unlimited idle_time unlimited logical_reads_per_session unlimited logical_reads_per_call unlimited composite_limit unlimited private_sga unlimited failed_login_attempts unlimited password_life_time unlimited password_reuse_time unlimited password_reuse_max unlimited password_lock_time unlimited password_grace_time unlimited password_verify_function Null; -- Add users to profile alter user anonymous profile DEFAULT; alter user ctxsys profile DEFAULT; alter user dbsnmp profile DEFAULT; alter user hr profile DEFAULT; alter user mdsys profile DEFAULT; alter user ordplugins profile DEFAULT; alter user ordsys profile DEFAULT; alter user outln profile DEFAULT; alter user sys profile DEFAULT; alter user system profile DEFAULT; alter user wkproxy profile DEFAULT; alter user wksys profile DEFAULT; alter user wmsys profile DEFAULT; alter user xdb profile DEFAULT; alter user srm30_user profile DEFAULT;当重启数据库后,执行 alter system set resource_limit = true当时发现当时间一长,客户端到数据库的连接还是会断掉?
能说详细点吗,是什么配置呀?
create profile CLERK_PROFILE limit
session_per_user 1 #用户可拥有的会话次数
idle_time 10 #进程处于空闲状态的时间(10分钟)
然后就可以将该概要文件授予一个用户
alter user A profile CLERK_PROFILE;
谢谢你的回答。
我还想问一下,如果我想设idle_time 为unlimited,不知道这种设置是否合理?
还有你知道其他大型数据库有类似的情况吗?
能麻烦你查一下吗?to zhaokeke2004(大力):
你说的是什么概要文件呀,我按bzszp(SongZip)说道作了,并重新启动了数据库
alter system set resource_limit = ture
create profile DEFAULT limit
sessions_per_user unlimited
cpu_per_session unlimited
cpu_per_call unlimited
connect_time unlimited
idle_time unlimited
logical_reads_per_session unlimited
logical_reads_per_call unlimited
composite_limit unlimited
private_sga unlimited
failed_login_attempts unlimited
password_life_time unlimited
password_reuse_time unlimited
password_reuse_max unlimited
password_lock_time unlimited
password_grace_time unlimited
password_verify_function Null;
-- Add users to profile
alter user anonymous profile DEFAULT;
alter user ctxsys profile DEFAULT;
alter user dbsnmp profile DEFAULT;
alter user hr profile DEFAULT;
alter user mdsys profile DEFAULT;
alter user ordplugins profile DEFAULT;
alter user ordsys profile DEFAULT;
alter user outln profile DEFAULT;
alter user sys profile DEFAULT;
alter user system profile DEFAULT;
alter user wkproxy profile DEFAULT;
alter user wksys profile DEFAULT;
alter user wmsys profile DEFAULT;
alter user xdb profile DEFAULT;
alter user srm30_user profile DEFAULT;当重启数据库后,执行 alter system set resource_limit = true当时发现当时间一长,客户端到数据库的连接还是会断掉?