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

ORACLE ´¿¶È¼¶±ð£¨PURITY£©

PRAGMA RESTRICT_REFERENCES()£¬Õâ¸öPRAGMA±È½Ï¸´ÔÓ£¬ ×ܵÄÀ´Ëµ£¬ËüÊÇÒ»¸ö³ÌÐò¸¨Öú¼ìÑéÂ룬¼ì²é×Ó³ÌÐòµÄ´¿¶È£¨PURITY£©£¬°ïÖú¼ìÑé×Ó³ÌÐòÊÇ·ñÓÐÎ¥·´¹æÔòµÄµØ·½¡£Ò»°ãÓÃÔÚº¯ÊýÉÏ£¬µ«µ±º¯Êýµ÷Óùý³Ìʱ£¬Ò²Òª×÷ÏàÓ¦µÄÉèÖüì²é¡£ÕâÊÇΪÁ˱ÜÃâµ±ÔÚDMLÓï¾äÉϵ÷Óú¯ÊýʱÕý³£Ö´Ðв»ÖÁÓÚ²úÉú´íÎó¡£
    Óï·¨£¬PRAGMA RESTRICT_REFERENCES(function_name | default , )RNDS, WNDS, RNPS, WNPS) | , TRUST);
     RNDS£¬WNDS£¬RNPS£¬WNPS¿ÉÒÔͬʱָ¶¨¡£µ«µ±TRUSTÖ¸¶¨ÊÇ£¬ÆäËüµÄ±»ºöÂÔ¡£
     DEFAUTÊÇÖ¸×÷ÓÃÔڸóÌÐò°üÉϵÄËùÓÐ×Ó³ÌÐò£¬º¯Êý¡£
     RNDS£¨Read No Database State£©£¬¹æ¶¨×Ó³ÌÐò²»ÄܶÁÈ¡ÈκεÄÊý¾Ý¿â״̬ÐÅÏ¢¡£(¼´²»»á²éѯÊý¾Ý¿âµÄÈÎºÎ±í£¬°üÀ¨DUALÐé±í£©
     RNPS£¨Read No Package State£©£¬¹æ¶¨×Ó³ÌÐò²»ÄܶÁÈ¡ÈκγÌÐò°üµÄ״̬ÐÅÏ¢£¬Èç±äÁ¿µÈ¡£
     WNDS£¨Write No Database State£©£¬¹æ¶¨×Ó³ÌÐò²»ÄÜÏòÊý¾Ý¿âдÈëÈκÎÐÅÏ¢¡££¨¼´²»ÄÜÐÞ¸ÄÊý¾Ý¿â±í£©
     WNPS£¨Write No Package State£©£¬¹æ¶¨×Ó³ÌÐò²»ÄÜÏò³ÌÐò°üдÈëÈκÎÐÅÏ¢¡££¨¼´²»ÄÜÐ޸ijÌÐò°ü±äÁ¿µÄÖµ£©
     TRUST£¬Ö¸³ö×Ó³ÌÐòÊÇ¿ÉÒÔÏàÐŵIJ»»áÎ¥·´Ò»¸ö»ò¶à¸ö¹æÔò¡£Õâ¸öÑ¡ÏîÊÇÐèÒªµÄµ±ÓÃC»òJAVAдµÄº¯Êýͨ¹ýPL/SQLµ÷ÓÃʱ£¬ÒòΪPL/SQLÔÚÔËÐÐÊǶÔËüÃDz»Äܼì²é¡£
ʾÀý:
create or replace package purity is
minsal number(6,2);
maxsal number(6,2);
function max_sal return number;
function min_sal return number;
--ÏÞÖƺ¯Êý²»Äܸıä°ü±äÁ¿:WNPS,ÆäËüµÄ»¹ÓÐ
pragma restrict_references(max_sal,wnps);
pragma restrict_references(min_sal,wnps);
end;
create or replace package body purity is
function max_sal return number
as
begin 
--select max(sal) into maxsal from emp;
--¼ÓÉÏÃæÕâÐж԰ü±äÁ¿½øÐиıä,ÔòÌáʾ"Î¥·´Ïà¹Ø±àÒëָʾ"
return maxsal;
end;
function min_sal return number
as
begin 
--select min(sal) into minsal from emp;
--¼ÓÉÏÃæÕâÐж԰ü±äÁ¿½øÐиıä,ÔòÌáʾ"Î¥·´Ïà¹Ø±àÒëָʾ"
return minsal;
end;
--¹¹Ô캯Êý
--д¹¹Ô캯Êý¹¹Ôì±äÁ¿Ê±,BEGIN¿ªÊ¼,¹²ÓðüÌå½áÊøµÄEND;±êÖ¾
begin
select min(sal),max(sal) into minsal,maxsal from em


Ïà¹ØÎĵµ£º

OracleÖеĴø²ÎÊýµÄÊÓͼ

OracleµÄÊÓͼ²»Ö§³Ö²ÎÊý
ÕâÀïÓÐÒ»¸öÁíÀàµÄ·½·¨£¬²»ÊǺܺ㬵«ÊÇ»¹ÊÇÒ»ÖÖ½â¾ö·½°¸
ͨ¹ýpackageʵÏÖ
create or replace package pkg_pv is
¡¡¡¡procedure set_pv(pv varchar2);
¡¡¡¡function get_pv return varchar2;
¡¡¡¡end;
¡¡¡¡create or replace package body pkg_pv is
¡¡¡¡v varchar2(20);
¡¡¡¡procedure set ......

Oracle RAC °²×°Îĵµ


Ò». ÓйØRACµÄÏà¹Ø¸ÅÄî
RAC:È«³ÆÊÇReal Application Cluster¡£RAC²¢·ÇÊǸöм¼Êõ£¬ÆäÇ°Éí½ÐOPS(Oracle Parallel Server)£¬´Ó9i¿ªÊ¼²Å¸ÄÃû½ÐRAC,oracle Data GuardÔÚ9i֮ǰ½Ð×öStandby
¸ÃÌåϵʵÏÖÁ˶à¸öʵÀýͬʱ·ÃÎʺ͹ÜÀíͬһÊý¾Ý¿â£¬¶à¸öʵÀý¿ÉÒÔ´æÔÚÓÚ²»Í¬½Úµã£¬Ò²¿ÉÒÔÔÚÏàͬµÄ½Ú ......

ÔÚORACLEµÃµ½Ä³¸ö±íµÄÖ÷¼ü×Ö¶ÎÃû

select column_name from all_cons_columns cc
where owner='SSH'  --SSHΪÓû§Ãû³Æ£¬Òª×¢Òâ´óСд
and table_name='SYS_DEPT' --SYS_DEPTΪ±íÃû£¬×¢Òâ´óСд
and exists (select 'x' from all_constraints c
where c.owner = cc.owner
and c.constraint_name = cc.constraint_name
and c.constraint_type ='P' ......

Redhat Linux oracle 10g em °´Å¥ÂÒÂë½â¾ö

ÍøÉÏÓкܶà×ÊÁÏ£¬Ò²ÊDzο¼eygleµÄÎĵµ¡£
OS : Redhat AS 4 U5
DB : Oracle 10.2.0.3
1.ÐÞ¸Äjdk ÏÂÃæµÄ×ÖÌå¡£
[oracle@rac2 db_1]$ cd $ORACLE_HOME/jdk/jre/lib/
[oracle@rac2 lib]$ mv font.properties font.properties_bak
[oracle@rac2 lib]$
[oracle@rac2 lib]$ cp font.properties.zh_CN.Redhat font.propertie ......

Ö´ÐÐcommitʱoracle×öÄÄЩ¹¤×÷

COMMITÊÇÒ»¸ö·Ç³£¿ìµÄ²Ù×÷£¬µ±ÎÒÃÇ·¢²¼commitÃüÁîʱ£¬ÕæÕýÀ§ÄѵĶ¯×÷ÒѾ­Íê³É£¬
ÔÚÊý¾Ý¿âÖÐÒѾ­Ö´ÐÐÁËÊý¾Ý¸ü¸Ä£¬ËùÒÔÒѾ­Íê³ÉÁË99%µÄÈÎÎñ£¬ÀýÈ磺ÏÂÁвÙ×÷ÒѾ­²úÉú£º
 
      1.ÔÚSGA(Buffer Cache)ÖÐÒѾ­Éú³ÉÁËundo¿é£»
      2.ÔÚSGA(Buffer Cache)ÖÐÒѾ­Éú³ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ