1. 程式人生 > >oracle 新建 dblink 及 釋放使用者鎖

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];