Kill all sessions of a specified user name
declare
ora_user varchar2(30) default 'SCOTT';
begin
execute immediate 'alter user '||ora_user||' account lock';
for crs in (select sid,serial# from v$session where username = ora_user) loop
execute immediate 'alter system kill session '''||crs.sid||','||crs.serial#||'''';
end loop;
end;
/
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/38542/viewspace-914205/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Kill SessionsSession
- oracle profile sessions_per_user的用法OracleSession
- profile中SESSIONS_PER_USER 資源限制特性測試Session
- Sessions Get Killed if Connection Use Default Service name (Same as db_name) (Doc ID 730315.1)Session
- The user specified as a definer ('wx_root'@'%') does not exist 解決方案
- 更改SERVICE_NAME導致大量會話被KILL會話
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解決方法MySql
- Git 修改已初始化配置過的 user.name user.emailGitAI
- Make sure you configure your "user.name" and "user.email" in git.AIGit
- Oracle案例05——ORA-12162: TNS:net service name is incorrectly specifiedOracle
- 【故障處理】ORA-12162: TNS:net service name is incorrectly specified
- Git批量修改歷史commit中的user.name 和user.emailGitMITAI
- Tomcat執行報錯,Annotation-specified bean name 'KY_QT_TTomcatBeanQT
- dba_tables,dba_all_tables,user_tables,all_tables有什麼區別
- SESSIONS, PROCESSES, TRANSACTIONSSession
- Sessions & Processes parameterSession
- limit active sessionsMITSession
- oracle 11g登陸報錯'ORA-12162: TNS:net service name is incorrectly specified'Oracle
- hpux上的定時任務報:ORA-12162: TNS:net service name is incorrectly specifiedUX
- VSFTPD錯誤的解決 500 OOPS: vsftpd: cannot locate user specified in ftp_usernaFTPOOP
- (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=download))JDBC
- PARSING_USER_ID,PARSING_SCHEMA_ID,PARSING_SCHEMA_NAME in V$SQLSQL
- 會話控制利器 gorilla/sessions會話GoSession
- Inhomogeneous deployment for replicated sessions is not allowed.Session
- How to get complete sessions informationSessionORM
- sessions,processes的監控方法Session
- Connections and Sessions (110)Session
- kill sessionSession
- DB_NAME&TANCE_NAME&DB_UNIQUE_NAME&ORACLE_SID&GLOBAL_NAME&DB_DOMAIN&SERVICE_NAMEOracleAI
- 【kill session】Oracle 徹底 kill session(轉載)SessionOracle
- No input file specified.
- 【檢視】oracle 資料字典檢視之 DBA_OBJECTS / ALL_OBJECTS / USER_OBJECTS(OBJ)OracleObject
- Kill Oracle Local=NOOracle
- kill oracle jobsOracle
- awk -- kill sessionSession
- Oracle kill sessionOracleSession
- error: '[class name]' does not name a typeError
- CUUG 筆記ORACLE db_name instance_name gobal_name service_name db_unique_name分析筆記OracleGo