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

oracle´ø²ÎÊýÓαêµÄʹÓÃ


¡¡¡¡´ÓÓαêÌáÈ¡Êý¾Ý
¡¡¡¡´ÓÓαêµÃµ½Ò»ÐÐÊý¾ÝʹÓÃFETCHÃüÁÿһ´ÎÌáÈ¡Êý¾Ýºó£¬Óα궼ָÏò½á¹û¼¯µÄÏÂÒ»ÐС£Óï·¨ÈçÏ£º
FETCH cursor_name INTO variable[,variable,...]
¡¡¡¡¶ÔÓÚSELECT¶¨ÒåµÄÓαêµÄÿһÁУ¬FETCH±äÁ¿ÁÐ±í¶¼Ó¦¸ÃÓÐÒ»¸ö±äÁ¿ÓëÖ®Ïà¶ÔÓ¦£¬±äÁ¿µÄÀàÐÍÒ²ÒªÏàͬ¡£
¡¡¡¡Àý£º
SET SERVERIUTPUT ON
DECLARE
v_ename EMP.ENAME%TYPE;
v_salary EMP.SALARY%TYPE;
CURSOR c_emp IS SELECT ename,salary from emp;
BEGIN
OPEN c_emp;
FETCH c_emp INTO v_ename,v_salary;
DBMS_OUTPUT.PUT_LINE('Salary of Employee'|| v_ename
||'is'|| v_salary);
FETCH c_emp INTO v_ename,v_salary;
DBMS_OUTPUT.PUT_LINE('Salary of Employee'|| v_ename
||'is'|| v_salary);
FETCH c_emp INTO v_ename,v_salary;
DBMS_OUTPUT.PUT_LINE('Salary of Employee'|| v_ename
||'is'|| v_salary);
CLOSE c_emp;
END
¡¡¡¡Õâ¶Î´úÂëÎÞÒÉÊǷdz£Âé·³µÄ£¬Èç¹ûÓжàÐзµ»Ø½á¹û£¬¿ÉÒÔʹÓÃÑ­»·²¢ÓÃÓαêÊôÐÔΪ½áÊøÑ­»·µÄÌõ¼þ£¬ÒÔÕâÖÖ·½Ê½ÌáÈ¡Êý¾Ý£¬³ÌÐòµÄ¿É¶ÁÐԺͼò½àÐÔ¶¼´óΪÌá¸ß£¬ÏÂÃæÎÒÃÇʹÓÃÑ­»·ÖØÐÂдÉÏÃæµÄ³ÌÐò£º
SET SERVERIUTPUT ON
DECLARE
v_ename EMP.ENAME%TYPE;
v_salary EMP.SALARY%TYPE;
CURSOR c_emp IS SELECT ename,salary from emp;
BEGIN
OPEN c_emp;
LOOP
FETCH c_emp INTO v_ename,v_salary;
EXIT WHEN c_emp%NOTFOUND;
DBMS_OUTPUT.PUT_LINE('Salary of Employee'|| v_ename
||'is'|| v_salary);
END
¡¡¡¡¼Ç¼±äÁ¿
¡¡¡¡¶¨ÒåÒ»¸ö¼Ç¼±äÁ¿Ê¹ÓÃTYPEÃüÁîºÍ%ROWTYPE£¬¹ØÓÚ%ROWsTYPEµÄ¸ü¶àÐÅÏ¢Çë²ÎÔÄÏà¹Ø×ÊÁÏ¡£
¡¡¡¡¼Ç¼±äÁ¿ÓÃÓÚ´ÓÓαêÖÐÌáÈ¡Êý¾ÝÐУ¬µ±ÓαêÑ¡ÔñºÜ¶àÁеÄʱºò£¬ÄÇôʹÓüǼ±ÈΪÿÁÐÉùÃ÷Ò»¸ö±äÁ¿Òª·½±ãµÃ¶à¡£
¡¡¡¡µ±ÔÚ±íÉÏʹÓÃ%ROWTYPE²¢½«´ÓÓαêÖÐÈ¡³öµÄÖµ·ÅÈë¼Ç¼ÖÐʱ£¬Èç¹ûҪѡÔñ±íÖÐËùÓÐÁУ¬ÄÇôÔÚSELECT×Ó¾äÖÐʹÓÃ*±È½«ËùÓÐÁÐÃûÁгöÀ´Òª°²È«µÃ¶à¡£
¡¡¡¡Àý£º
SET SERVERIUTPUT ON
DECLARE
R_emp EMP%ROWTYPE;
CURSOR c_emp IS SELECT * from emp;
BEGIN
OPEN c_emp;
LOOP
FETCH c_emp INTO r_emp;
EXIT WHEN c_emp%NOTFOUND;
DBMS_OUT.PUT.PUT_LINE('Salary of Employee'||r_emp.ename||'is'|| r_emp.salary);
END LOOP;
CLOSE c_emp;
END;
¡¡¡¡%ROWTYPEÒ²¿ÉÒÔÓÃÓαêÃûÀ´¶¨Ò壬ÕâÑùµÄ»°¾Í±ØÐëÒªÊ×ÏÈÉùÃ÷Óα꣺
SET SERVERIUTPUT ON
DECLARE
CURSOR c_emp IS SELECT ename,sala


Ïà¹ØÎĵµ£º

oracle flashback


1£¬ÉÁ»ØÊý¾Ý¿âµ½Ö®Ç°Ä³Ê±¼äµã£¨ÔÚ°²×°Ê±ÐèÒª¿ª·ÅÉÁ»Ø¹¦ÄÜ£©
²»Ö§³Ö±í¿Õ¼äɾ³ý
 select name from v$database;
 --¿´ÊÇ·ñ´ò¿ªÉÁ»Ø¹¦ÄÜ
 select flashback_on,name from v$database;
 select name from v$bgprocess where paddr<>'00' order by 1;
´ò¿ªÉÁ»Ø¹¦ÄÜ
SQL> shutdown immedia ......

OracleÊý¾Ý¿âµ¼Èëµ¼³ö£¨1£©

OracleÊý¾Ý¿âµ¼Èëµ¼³ö£¨1£©
 
Oracleµ¼Èëµ¼³ö¹Ù·½¶¨Òå
 
ÈçºÎ²é¿´ImpºÍExpÃüÁ
Ç°Ì᣺°²×°OracleÊý¾Ý¿â»òÕß¿Í»§¶Ë¡£
Ò»¡¢             IMPÃüÁî
1.         ´ò¿ªÃüÁîÌáʾ·û¡£ÀýÈ磬£¨Windows XP£© ......

oracleѹÁ¦²âÊÔÖ®orastress!


orastressÖ÷Òª²âÊÔÊý¾Ý¿âµÄѹÁ¦¡£Ëü¿ÉÒÔ²âÊÔÊý¾Ý¿âµÄCPU»òÕßÄÚ´æµÄѹÁ¦£¨ÒÔÖ»¶Á·½Ê½£©£¬Ò²¿ÉÒÔʹÓðüÀ¨ÆÕͨINSERTºÍÖ±½Ó·¾¶INSERTÁ½ÖÖ·½Ê½²âÊÔÊý¾Ý¿âµÄI/OÄÜÁ¦¡£
orastressÖ»ÄÜÔËÐÐÔÚwindowsÏ£¬µ«ËüÒ²¿ÉÒÔ²âÊÔÔ¶³Ì·þÎñÆ÷µÄѹÁ¦¡£
1¡¢ÏÂÔØ
ÏÂÔصØÖ·ÊÇ
http://www.linxcel.co.uk/orabm/orastress.zip
2¡¢°²×°
oras ......

¸ü¸ÄOracleÊý¾Ý¿â±íµÄ±í¿Õ¼ä

ÔÚOracleÊý¾Ý¿â¹ÜÀíϵͳÖУ¬´´½¨¿â±í£¨table£©Ê±Òª·ÖÅäÒ»¸ö±í¿Õ¼ä£¨tablespace£©£¬Èç¹ûδָ¶¨±í¿Õ¼ä£¬ÔòʹÓÃϵͳÓû§È·Ê¡µÄ±í¿Õ¼ä¡£
ÔÚOracleʵ¼ÊÓ¦ÓÃÖУ¬ÎÒÃÇ¿ÉÄÜ»áÓöµ½ÕâÑùµÄÎÊÌâ¡£´¦ÓÚÐÔÄÜ»òÕßÆäËû·½ÃæµÄ¿¼ÂÇ£¬ÐèÒª¸Ä±äij¸ö±í»òÕßÊÇij¸öÓû§µÄËùÓбíµÄ±í¿Õ¼ä¡£Í¨³£µÄ×ö·¨¾ÍÊÇÊ×ÏȽ«±íɾ³ý£¬È»ºóÖØн¨±í£¬ÔÚн¨±íʱ½«± ......

´óÐÍÊý¾Ý¿âÓÅ»¯Éè¼Ædz̸(ORACLE) £¨Ò»£©

  
   ¶ÔÓÚORACLEÊý¾Ý¿âµÄÊý¾Ý´æÈ¡£¬Ö÷ÒªÓÐËĸö²»Í¬µÄµ÷Õû¼¶±ð£¬µÚÒ»¼¶µ÷ÕûÊDzÙ×÷ϵͳ¼¶°üÀ¨Ó²¼þƽ̨,µÚ¶þ¼¶µ÷ÕûÊÇORACLE RDBMS¼¶µÄµ÷Õû,µÚÈý¼¶ÊÇÊý¾Ý¿âÉè¼Æ¼¶µÄµ÷Õû,×îºóÒ»¸öµ÷Õû¼¶ÊÇSQL¼¶¡£Í¨³£ÒÀ´ËËļ¶µ÷Õû¼¶±ð¶ÔÊý¾Ý¿â½øÐе÷Õû¡¢ÓÅ»¯£¬Êý¾Ý¿âµÄÕûÌåÐÔÄÜ»áµÃµ½ºÜ´óµÄ¸ÄÉÆ¡£ÏÂÃæ´Ó¼¸¸ö²»Í¬·½Ã ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ