查看是否启用限制配置 SQL> show parameter resource_limit; 或者 select * from v$parameterwhere name = 'resource_limit'; 添加限制 alter system set resource_limit=true; create profile sess limit sessions_per_user 20; alter user 用户名 profile sess;…
#!/bin/bash while true do date +%Y%m%d-%H:%M:%S mysql -uroot -p'xxx' -e "select count(1) from information_schema.processlist" echo '---' mysql -uroot -p'xxx' -e "select ID,USER,HOST,DB,COMMAND,TIME,count(USER) from information_schema.proces…
SELECT login_name, ) user_count FROM Sys.dm_exec_requests dr WITH(nolock) RIGHT OUTER JOIN Sys.dm_exec_sessions ds WITH(nolock) ON dr.session_id = ds.session_id RIGHT OUTER JOIN Sys.dm_exec_connections dc WITH(nolock) ON ds.session_id = dc.session_id…