Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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


Ïà¹ØÎĵµ£º

OracleÓαêʹÓÃ×ܽá

Óα꣨CURSOR£©Ò²½Ð¹â±ê£¬ÔÚ¹ØÏµÊý¾Ý¿âÖо­³£Ê¹Óã¬ÔÚPL/SQL³ÌÐòÖпÉÒÔÓÃCURSORÓëSELECTÒ»Æð¶Ô±í»òÕßÊÓͼ
ÖеÄÊý¾Ý½øÐвéѯ²¢ÖðÐжÁÈ¡¡£
         OracleÓαê·ÖΪÏÔʾÓαêºÍÒþʽÓαꡣ
         ÏÔʾÓα꣨Explicit Cursor£©:ÔÚPL/SQL ......

ÈçºÎÐÞ¸Äoracle RAC VIPµØÖ·

      ÓÐʱºòÍøÂç·¢Éú±ä¶¯£¬±ØÐëÊÖ¶¯ÐÞ¸ÄÒ»ÏÂRAC VIPµØÖ·£¬²»½öÊǵØÖ·£¬Ò²¿ÉÒÔÐÞ¸ÄVIPËùÔÚµÄÍø¿¨£¬Ô­ÔòÊÇVIPµØÖ·ÒªºÍPUBµØÖ·ÔÚͬһ¸öÍø¶ÎÄÚ£¬·½·¨ÆäʵÊDZȽϼòµ¥µÄ£¬ÓÐÈËÎʵ½£¬ÎÒ¸øÒ»¸öʾÀýÈçÏ£º
1¡¢¹Ø±ÕÊý¾Ý¿â
srvctl stop database -d db
2¡¢¹Ø±ÕNOTEAPPA
srvctl stop nodeapps -n db2
à ......

oracle²éѯÁ´½ÓÊý sqlÃüÁî

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 ......

SQL SEVERÓëORACLE µÄsqlÓï¾äÇø±ð

Êýѧº¯Êý£º
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 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ