oracle 新建 dblink 及 释放用户锁

create public database link dblink_protest2 connect to protest2 identified by protest
 using '(DESCRIPTION=(
 ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.30.1.10)(PORT=1521))
 )
 (CONNECT_DATA=(SERVICE_NAME=ORCL))
 )';
 
查看有哪些用户登录


  select  t2.username,t2.sid,t2.serial#,t2.logon_time from v$locked_object t1,v$session t2 where t1.session_id=t2.sid order by t2.LOGON_TIME;



alter system kill session 'sid,serial#'   [immediate];

你可能感兴趣的:(oracle 新建 dblink 及 释放用户锁)