oracleɾ³ýËÀËøµÄsession
²é¿´Ëø±í½ø³ÌSQLÓï¾ä1£º
select sess.sid,
sess.serial#,
lo.oracle_username,
lo.os_user_name,
ao.object_name,
lo.locked_mode
from v$locked_object lo,
dba_objects ao,
v$session sess
where ao.object_id = lo.object_id and lo.session_id = sess.sid;
ɱµôËø±í½ø³Ì£º
alter system kill session 'sid,serial#';
ÈçÓмǼÔò±íʾÓÐlock£¬¼Ç¼ÏÂSIDºÍserial# £¬½«¶þÕßÁ¬½ÓÆðÀ´£¬¾Í¿ÉÒÔkill¡£ÈçÏ£º
alter system kill session '1458,15829';
Ïà¹ØÎĵµ£º
Óα꣨CURSOR£©Ò²½Ð¹â±ê£¬ÔÚ¹ØÏµÊý¾Ý¿âÖо³£Ê¹Óã¬ÔÚPL/SQL³ÌÐòÖпÉÒÔÓÃCURSORÓëSELECTÒ»Æð¶Ô±í»òÕßÊÓͼ
ÖеÄÊý¾Ý½øÐвéѯ²¢ÖðÐжÁÈ¡¡£
OracleÓαê·ÖΪÏÔʾÓαêºÍÒþʽÓαꡣ
ÏÔʾÓα꣨Explicit Cursor£©:ÔÚPL/SQL ......
ÓÐʱºòÍøÂç·¢Éú±ä¶¯£¬±ØÐëÊÖ¶¯ÐÞ¸ÄÒ»ÏÂRAC VIPµØÖ·£¬²»½öÊǵØÖ·£¬Ò²¿ÉÒÔÐÞ¸ÄVIPËùÔÚµÄÍø¿¨£¬ÔÔòÊÇVIPµØÖ·ÒªºÍPUBµØÖ·ÔÚͬһ¸öÍø¶ÎÄÚ£¬·½·¨ÆäʵÊDZȽϼòµ¥µÄ£¬ÓÐÈËÎʵ½£¬ÎÒ¸øÒ»¸öʾÀýÈçÏ£º
1¡¢¹Ø±ÕÊý¾Ý¿â
srvctl stop database -d db
2¡¢¹Ø±ÕNOTEAPPA
srvctl stop nodeapps -n db2
à ......
select t.OSUSER,t.STATUS,t.LOGON_TIME from v$session t
select t.OSUSER,t.STATUS,t.LOGON_TIME from v$session t where t.OSUSER='admin'
select t.OSUSER,t.STATUS,t.LOGON_TIME from v$session t where t.OSUSER='liuzhaoqing'
select t.OSUSER,t.STATUS,t.LOGON_TIME from v$session t where t.OSUSER='ymx'
sel ......
Êýѧº¯Êý£º
1.¾ø¶ÔÖµ
S:SELECT abs(-1) value
O:SELECT abs(-1) value from dual
2.È¡Õû(´ó)
S:SELECT ceiling(-1.001) value
O:SELECT ceil(-1.001) value from dual
3.È¡Õû£¨Ð¡£©
S:SELECT floor(-1.001) value
O:SELECT floor(-1.001) value from dual
4.È¡Õû£¨½ØÈ¡£©
S:SELECT cast(-1.002 as int) value
O ......