oracle Óαê
oracle Óαê
¹Ø¼ü×Ö: oracle Óαê
1. Óαê: ÈÝÆ÷£¬´æ´¢SQLÓï¾äÓ°ÏìÐÐÊý¡£
2. ÓαêÀàÐÍ: ÒþʽÓα꣬ÏÔʾÓα꣬REFÓαꡣÆäÖУ¬ÒþʽÓαêºÍÏÔʾÓαêÊôÓÚ¾²Ì¬Óα꣨ÔËÐÐÇ°½«ÓαêÓëSQLÓï¾ä¹ØÁª£©,REFÓαêÊôÓÚ¶¯Ì¬Óαê(ÔËÐÐʱ½«ÓαêÓëSQLÓï¾ä¹ØÁª)¡£
3. ÒþʽÓαê: DMLÓï¾ä¶ÔÓ¦µÄÓα꣬ÓÉOracle×Ô¶¯¹ÜÀí£¬Ò²³ÆSQLÓαꡣ£¨ËùÓеÄDML²Ù×÷¶¼±»OracleÄÚ²¿½âÎöΪһ¸öcursorÃûΪSQLµÄÒþʽÓα꣩
q ÒþʽÓαêµÄÊôÐÔÓУº
q %FOUND – SQL Óï¾äÓ°ÏìÁËÒ»Ðлò¶àÐÐʱΪ TRUE
q %NOTFOUND – SQL Óï¾äûÓÐÓ°ÏìÈκÎÐÐʱΪTRUE
q %ROWCOUNT – SQL Óï¾äÓ°ÏìµÄÐÐÊý
q %ISOPEN - ÓαêÊÇ·ñ´ò¿ª£¬Ê¼ÖÕΪFALSE
¾ÙÀý˵Ã÷£º
Sql´úÂë
declare
v_empno emp.empno %type:=7000;
begin
update emp set ename='fxe' where empno=v_empno;
if SQl%found then
dbms_output.put_line(SQL%rowcount||'Delete Ok!');
end if;
if SQL%notfound then -- Ò»ÌõSQL¾Í±íʾÊÇÒ»¸öÒþʽÓαê
dbms_output.put_line('¹ÍÔ±±àºÅ'||v_empno||'²»´æÔÚ');
end if;
end;
declare
v_empno emp.empno %type:=7000;
begin
update emp set ename='fxe' where empno=v_empno;
if SQl%found then
dbms_output.put_line(SQL%rowcount||'Delete Ok!');
end if;
if SQL%notfound then -- Ò»ÌõSQL¾Í±íʾÊÇÒ»¸öÒþʽÓαê
dbms_output.put_line('¹ÍÔ±±àºÅ'||v_empno||'²»´æÔÚ');
end if;
end;
4. ÏÔʾÓαê
Ïà¹ØÎĵµ£º
Lately,
Jordan bank upgraded their ICBS banking software to Oracle 9i and
IDS9i. The Bank also moved from a decentralized to a centralized
system.
We were contracted to monitor and diagnose performance issues during the launching phase of the new system.
The IBM server was equipped with 32 GB o ......
oracle°²È«
Óû§¹ÜÀí
DBAÊÚÓ費ͬÓû§²»Í¬È¨Àû£¬Ã¿¸öÓû§¿ÉÒÔÔÚÊÚȨ·¶Î§Äڻ£¬Èκγ¬Ô½È¨ÏÞ·¶Î§µÄ²Ù×÷¶¼ÊÓΪ·Ç·¨¡£
sysÓû§ ÍøÂç¹ÜÀíÔ± ÓµÓÐ×î¸ßȨÏÞ
conn sys/¿ÚÁî as sysdba;
systemÓû§ ±¾µØ¹ÜÀíÔ±
scottÓû§ ʾÀýÊý¾Ý¿â
½¨Á¢Óû§£º£¨±ØÐëÓµÓÐdbaȨÏÞ£©
Create User Óû§Ãû Identified by ¿ÚÁî [E ......
²é¿´ÕýÔÚÖ´ÐеÄsqlÓï¾ä
SELECT osuser, username, sql_text from v$session a, v$sqltext b where a.sql_address =b.address order by address, piece;
²¶×½ÔËÐкܾõÄSQL
select username,sid,opname, round(sofar*100 / totalwork,0) || '%' as progress, time_remaining,sql_text from v$session_longops , v$ ......
´ó¼ÒÔÚÓ¦ÓÃORACLEµÄʱºò¿ÉÄÜ»áÓöµ½ºÜ¶à¿´ÆðÀ´²»ÄѵÄÎÊÌâ, Ìرð¶ÔÐÂÊÖÀ´Ëµ, ½ñÌìÎÒ¼òµ¥°ÑËü×ܽáÒ»ÏÂ, ·¢²¼¸ø´ó¼Ò, Ï£Íû¶Ô´ó¼ÒÓаïÖú! ºÍ´ó¼ÒÒ»Æð̽ÌÖ, ¹²Í¬½ø²½!
¶ÔORACLE¸ßÊÖÀ´ËµÊDz»Óÿ´µÄ¡£
1. Oracle°²×°Íê³ÉºóµÄ³õʼ¿ÚÁî?
¡¡¡¡internal/oracle
¡¡¡¡sys/change_on_install
¡¡¡¡system/manager
¡¡¡¡scott/tiger
¡ ......