ORACLE²éѯϵͳÖÐ×èÈûÇé¿ö~
ÔÚORACLEÖо³£»áÅöµ½×èÈûµÄÇé¿ö·¢Éú£¬Õâ¸öʱºòÎÒÃǾÍÐèÒª¿ìËÙµÄÕÒ³öµ¼ÖÂ×èÈûµÄÔÒò£¬²¢¾¡¿ìÅųýËü£¬ºÃÈÃϵͳÖØÐÂÕý³£ÔËÐС£
ÏÂÃæÒÔËÀËøΪÀý£¬À´¿´¿´ÈçºÎÕÒ³öµ¼ÖÂ×èÈûµÄ»á»°²¢½â¾öÎÊÌâ¡£
//SCOTT´°¿Ú1
SQL> select * from t2;
ID
----------
3
1
2
SQL> update t2 set id=12 where id=2;
1 row updated.
SQL>
//SCOTT´°¿Ú2
SQL> select * from t2;
ID
----------
3
1
2
SQL> update t2 set id=11 where id=3;
ÒѸüР1 ÐС£
SQL> update t2 set id=13 where id=2;
//´Ëʱ½øÈëµÈ´ý……¿¨×¡²»¶¯ÁË
//SYS´°¿Ú
SQL> select c.terminal||' ('''||a.sid||','||c.serial#||''') is blocking '||b.sid
||','||d.serial# block_msg, a.block
2 from v$lock a,v$lock b,v$session c,v$session d
3 where a.id1=b.id1
4 and a.id2=b.id2
5 and a.block>0
6 and a.sid <>b.sid
7 and a.sid=c.sid
8 and b.sid=d.SID
9 ;
BLOCK_MSG BLOCK
---------------------------------------- ----------
HWANG ('138,305') is blocking 153,15 1
SQL> select sid,serial#,username from v$session where username is not null;
SID SERIAL# USERNAME
---------- ---------- ------------------------------
136 179 SYS
138 305 SCOTT
153 15 SCOTT
//Õâ¸öʱºò¿ÉÒÔɱµôÄǸöBLOCKER
SQL> alter system kill session'138,305';
System altered.
//SCOTT´°¿Ú1
SQL> select * from t2;
select * from t2
*
ERROR at line 1:
ORA-00028: your session has been killed
SQL>
Ïà¹ØÎĵµ£º
ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
Ê×ÏÈ£¬Ô ......
¡¡1¡¢Ä¿µÄ£º
¡¡¡¡OracleϵͳÖеÄprofile¿ÉÒÔÓÃÒÔ¶ÔÓû§ËùÄÜÊ©ÓõÄÊý¾Ý¿â×ÊÔ´½øÕ¹ÏÞÖÆ£¬ÔËÓÃCreate ProfileÏÂÁî´´°ìÒ»¸öProfile£¬ÓÃËüÀ´¶ÒÏÖ¶ÔÊý¾Ý¿â×ÊÔ´µÄÏÞÖÆÔËÓã¬Èç¹û°Ñ¸Ãprofile·ÖÅä¸øÓû§£¬Ôò¸ÃÓû§ËùÄÜÊ©ÓõÄÊý¾Ý¿â×ÊÔ´¶¼ÔÚ¸ÃprofileµÄÏÞÖÆÒÔÄÚ¡£
¡¡¡¡2¡¢Ìõ¼þ£º
¡¡¡¡´´ÉèprofileÎñ±ØÒªÓÐCREATE PROFILEµÄÏµÍ ......
select d.code,d.name, sum(w.weight) weight,round(avg(w.price),2) price,sum(w.money) money
from weight_info w left outer join t_dict d on w.productcode=d.code left outer join t_balancecode b on w.balancecode=b.balancecode where 1=1 and w.operdate>TO_TIMESTAMP('2009-11-2 04:12:32.0', ' ......
Ò»¡¢¼àÌýÆ÷(LISTENER)
¡¡¡¡¼àÌýÆ÷ÊÇOracle»ùÓÚ·þÎñÆ÷¶ËµÄÒ»ÖÖÍøÂç·þÎñ£¬Ö÷ÒªÓÃÓÚ¼àÌý¿Í»§¶ËÏòÊý¾Ý¿â·þÎñÆ÷¶ËÌá³öµÄÁ¬½ÓÇëÇó¡£¼ÈÈ»ÊÇ»ùÓÚ·þÎñÆ÷¶ËµÄ·þÎñ£¬ÄÇôËüÒ²Ö»´æÔÚÓÚÊý¾Ý¿â·þÎñÆ÷¶Ë£¬½øÐмàÌýÆ÷µÄÉèÖÃÒ²ÊÇÔÚÊý¾Ý¿â·þÎñÆ÷¶ËÍê³ÉµÄ¡£
¶þ¡¢±¾µØ·þÎñÃû(Tnsname)
¡¡¡¡Oracle¿Í»§¶ËÓë·þÎñÆ÷¶ËµÄÁ¬½ÓÊÇͨ¹ý¿Í»§¶ ......
SQL> select dbms_metadata.get_ddl('PROCEDURE','PRO2','SCOTT') text from dual;
TEXT
----------------------------------------
CREATE OR REPLACE PROCEDURE "SCOTT"."P
RO2"
is
begin
dbms_output.put_line('wangpeng up');
end;
SQL> select dbms_metadata.get_ddl('PROCEDURE','PRO1','SCOTT') te ......