Home  >  Article  >  Database  >  Oracle中强行断开用户连接的方法

Oracle中强行断开用户连接的方法

WBOY
WBOYOriginal
2016-06-07 17:21:201371browse

Oracle中强行断开用户连接的方法,首先查找目标用户的当前进程,注意是serial#而不是serial,网上有的介绍漏掉了#:

Oracle中强行断开用户连接的方法,,首先查找目标用户的当前进程,注意是serial#而不是serial,网上有的介绍漏掉了#:

select sid,serial# from v$session where username='ERP';

使用此语句会返回一个进程列表,每行有两个数字,然后用数字替代下面的sid和serial

alter system kill session 'sid,serial';

例如

alter system kill session '222,123';

通过select 语句可能返回多行记录,所以要多次执行alter语句

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn