且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何禁用一个用户在oracle上的同时连接

更新时间:2022-04-11 08:19:02

创建新的个人资料为

CREATE PROFILE <profile_name> LIMIT 
   SESSIONS_PER_USER          1
   CPU_PER_SESSION            UNLIMITED 
   CPU_PER_CALL               <some_value>
   CONNECT_TIME               <some_value>
   LOGICAL_READS_PER_SESSION  DEFAULT 
   LOGICAL_READS_PER_CALL     <some_value>
   PRIVATE_SGA                <some_value>
   COMPOSITE_LIMIT            <some_value>; 

注意:根据需要选择其他参数,可以从dba_profile视图获取当前配置文件参数值,他们在上面的查询。之前获取使用以下查询的用户的个人资料名称

note: choose other parameters as per requirement, you can get current profile parameter values from dba_profile view and use them in the above query. Before that get the profile name of the user using below query

从dba_users选择个人资料WHERE username =< user_name&gt ;;

然后ALTER USER

Then ALTER USER

ALTER USER< user_name> PROFILE< profile_name&gt ;;