问题
i am using oracle 12, and hoping to find how can i enable or disable simultaneous connections for my database for each user. i found codes regarding dispatchers and other ones including the following codes:
SHARED_SERVER_SESSIONS
MAX_DISPATCHERS
CONNECTIONS
SESSIONS
POOL
in addition to other codes that didn't find suitable for my case .Can anyone help ?
回答1:
Create a new profile as
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>;
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
SELECT profile FROM dba_users WHERE username = <user_name>;
Then ALTER USER
ALTER USER <user_name> PROFILE <profile_name>;
来源:https://stackoverflow.com/questions/21026677/how-to-disable-simultaneous-connections-by-one-user-on-oracle