×Ô¼ºÐ´µÄoracle dbms_sql º¯Êý°üÀý×Ó
create or replace procedure pro_insert_dbms
is
cid number;
cid_DDL number;
selectsql varchar2(1000);
ddlsql varchar2(1000);
row_count number;
nofrows integer;
lrowid rowid;
ddlrows integer;
errpsn integer;
sqlfcd integer;
errc integer;
errm varchar2(2000);
request_id varchar2(100);
deal_name varchar2(100);
member_name varchar2(100);
/*(¶þ)Ò»°ã¹ý³Ì
¶ÔÓÚÒ»°ãµÄselect²Ù×÷,Èç¹ûʹÓö¯Ì¬µÄsqlÓï¾äÔòÐèÒª½øÐÐÒÔϼ¸¸ö²½Öè:
open cursor--->parse--->define column--->excute--->fetch rows--->close cursor;
¶ø¶ÔÓÚdml²Ù×÷(insert,update)ÔòÐèÒª½øÐÐÒÔϼ¸¸ö²½Öè:
open cursor--->parse--->bind variable--->execute--->close cursor;
¶ÔÓÚdelete²Ù×÷Ö»ÐèÒª½øÐÐÒÔϼ¸¸ö²½Öè:
open cursor--->parse--->execute--->close cursor;
*/
begin
dbms_output.put_line('²âÊÔdbms_sql°ü.....');
delete_commit('delete from test_insert i where i.inner_id=2');
selectsql:='select i.request_id,i.deal_name,i.member_name from test_insert i';
begin
cid:=dbms_sql.open_cursor;
Ïà¹ØÎĵµ£º
delete ɾ³ýÒ»ÕÅ´ó±íʱ¿Õ¼ä²»ÊÍ·Å£¬·Ç³£ÂýÊÇÒòΪռÓôóÁ¿µÄϵͳ×ÊÔ´£¬Ö§³Ö»ØÍ˲Ù×÷£¬¿Õ¼ä»¹±»ÕâÕűíÕ¼ÓÃ×Å¡£
truncate table ±íÃû (ɾ³ý±íÖмǼʱÊͷűí¿Õ¼ä)
DML Óï¾ä£º
±í¼¶¹²ÏíËø£º ¶ÔÓÚ²Ù×÷Ò»ÕűíÖеIJ»Í¬¼Ç¼ʱ£¬»¥²»Ó°Ïì
Ðм¶ÅÅËüËø£º¶ÔÓÚÒ»ÐмǼ£¬oracle »áÖ»ÔÊÐíÖ»ÓÐÒ»¸öÓû§¶ÔËüÔÚͬһʱ¼ä½øÐÐÐ޸IJÙ×÷ ......
SQL±¸·ÝÓ뻹ԾµäÎĵµ
======================================================================
SQL±¸·Ý
======================================================================
----------------------------------------------------------------------
1¡¢SQLÊý¾Ý¿â»Ö¸´Ä£ÐÍ
------------------------------ ......
LoadBalance ¾ÍÊǰѸºÔØƽ¾ùµÄ·ÖÅäµ½¼¯ÈºÖеĸ÷¸ö½Úµã£¬´Ó¶øÌá¸ßÕûÌåµÄÍÌÍÂÄÜÁ¦¡£ Oracle 10g RAC ÌṩÁËÁ½ÖÖ²»Í¬µÄ·½·¨À´·ÖÉ¢¸ºÔØ£º
1. ͨ¹ýConnection Balancing£¬°´ÕÕijÖÖËã·¨°ÑÓû§·ÖÅäµ½²»Í¬µÄ½Úµã¡£Ò²¿ÉÈÏΪÊÇ´¿¼¼ÊõµÄ·ÖÉ¢¸ºÔØ¡£
2. ͨ¹ýService£¬ÔÚÓ¦ÓòãÉϽøÐзÖÉ¢£¬Ò ......
Ò». ¼ì²é¹²ÏíÉ豸
Ò»°ãÇé¿öÏ£¬ ´æ·ÅOCR ºÍ Voting Disk µÄOCFS2 »òÕßraw ¶¼ÊÇ×Ô¶¯Æô¶¯µÄ¡£ Èç¹ûËûÃÇûÓÐÆô¶¯£¬RAC ¿Ï¶¨ÊÇÆô¶¯²»Á˵ġ£
1.1 Èç¹ûʹÓÃocfs2µÄ£¬¼ì²éocfs2 ״̬
/etc/init.d/o2cb status
ÔÚ¹ÒÔØ֮ǰ£¬/etc/init.d/o2cb st ......