Oracle RAC Failover Ïê½â
Oracle RAC ͬʱ¾ß±¸HA(High Availiablity) ºÍLB(LoadBalance). ¶øÆä¸ß¿ÉÓÃÐԵĻù´¡¾ÍÊÇFailover(¹ÊÕÏתÒÆ). ËüÖ¸¼¯ÈºÖÐÈκÎÒ»¸ö½ÚµãµÄ¹ÊÕ϶¼²»»áÓ°ÏìÓû§µÄʹÓã¬Á¬½Óµ½¹ÊÕϽڵãµÄÓû§»á±»×Ô¶¯×ªÒƵ½½¡¿µ½Úµã£¬´ÓÓû§¸ÐÊܶøÑÔ£¬ ÊǸоõ²»µ½ÕâÖÖÇл»¡£
Oracle 10g RAC µÄFailover ¿ÉÒÔ·ÖΪ3ÖÖ£º
1. Client-Side Connect time Failover
2. TAF
3. Service-Side TAF
×¢ÒâÊÂÏ ²»ÄÜÔÚlistener.ora ÎļþÖÐÉèÖÃGLOBAL_NAME£¬ ÒòΪÕâ¸ö²ÎÊý»á½ûÓÃConnect-time Failover ºÍ Transparent Application Failover.
Ò»£®Client-Side Connect Time Failover
Client-Side Connect Time FailoverµÄº¬Ò壺Èç¹ûÓû§¶Ëtnsname ÖÐÅäÖÃÁ˶à¸öµØÖ·£¬Óû§·¢ÆðÁ¬½ÓÇëÇóʱ£¬»áÏȳ¢ÊÔÁ¬½ÓµØÖ·±íÖеĵÚÒ»¸öµØÖ·£¬Èç¹ûÕâ¸öÁ¬½Ó³¢ÊÔʧ°Ü£¬Ôò¼ÌÐø³¢ÊÔʹÓõڶþ¸öµØÖ·£¬Ö±ÖÁÁ¬½Ó³É¹¦»òÕß±éÀúÁËËùÓеĵØÖ·¡£
ÕâÖÖFailoverµÄÌص㣺¡¡Ö»ÔÚ½¨Á¢Á¬½ÓÄÇһʱ¿ÌÆð×÷Óã¬Ò²¾ÍÊÇ˵£¬ÕâÖÖFailover·½Ê½Ö»ÔÚ·¢ÆðÁ¬½Óʱ²Å»áÈ¥¸ÐÖª½Úµã¹ÊÕÏ£¬Èç¹û½ÚµãûÓз´Ó¦£¬Ôò×Ô¶¯³¢ÊÔµØÖ·ÁбíÖеÄÏÂÒ»¸öµØÖ·¡£Ò»µ©Á¬½Ó½¨Á¢Ö®ºó£¬½Úµã³öÏÖ¹ÊÕ϶¼²»»á×ö´¦Àí£¬´Ó¿Í»§¶ËµÄ±íÏÖ¾ÍÊǻỰ¶Ï¿ªÁË£¬Óû§³ÌÐò±ØÐëÖØн¨Á¢Á¬½Ó¡£
ÆôÓÃÕâÖÖFailoverµÄ·½·¨¾ÍÊÇÔÚ¿Í»§¶ËµÄtnsnames.oraÖÐÌí¼ÓFAILOVER=ON ÌõÄ¿£¬Õâ¸ö²ÎÊýĬÈϾÍÊÇON£¬ËùÒÔ¼´Ê¹²»Ìí¼ÓÕâ¸öÌõÄ¿£¬¿Í»§¶ËÒ²»á»ñµÃÕâÖÖFailoverÄÜÁ¦¡£
ʾÀý£º
RAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))
(LOAD_BALANCE=YES)
(
CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME=RAC)
)
)
×¢£ºrac1-vip£¬rac2-vipÒªÌí¼Óµ½hosts ÎļþÖУ¬²»È»¿ÉÄܽâÎö²»ÁË¡£
¶þ£® TAF(Transparent Applica
Ïà¹ØÎĵµ£º
Ò»¡¢Ë÷ÒýÀàÐͼ°½á¹¹£º
oracleµÄË÷Òý·ÖΪ5ÖÖ:ΨһË÷Òý£¬×éºÏË÷Òý£¬·´Ïò¼üË÷Òý£¬Î»Í¼Ë÷Òý£¬»ùÓÚº¯ÊýµÄË÷Òý
Âß¼ÉÏ£º
Single column µ¥ÁÐË÷Òý
Concatenated ¶àÁÐË÷Òý
Unique ΨһË÷Òý
NonUnique ·ÇΨһË÷Òý
Function-basedº¯ÊýË÷Òý
Domain ÓòË÷Òý
ÎïÀíÉÏ£º
Partitioned ·ÖÇøË÷Òý
NonPartitioned ......
Linux ƽ̨ÏÂOracle Silent Installations(¾²Ä¬°²×°)£¬Ò»Ö±¶¼Ã»Óг¢ÊÔ¹ýÓÃÕâÖÖ·½·¨À´×°Êý¾Ý¿â¡£ ÒòΪÓи߼¶µÄ¹¤¾ß£¬¾ÍûÓбØÒªÔÚÀ´ÓÃÕâÖÖ·½·¨ÁË£¬Oracle µÄ½çÃ滹ÊDZȽϷ½±ã£¬¶øÇÒÎÒÃÇ»¹ÓÐXmanager ¹¤¾ß£¬ËùÒÔÔÚlinux ÏÂ×°Èí¼þ£¬»¹ÊǺܷ½±ãµÄ¡£
Òò´ËÒ²¾ÍûÓÐÌ«ÔÚÒâÕ ......
create or replace procedure inserttestdata
(
v_count in number,
v_startuserid in varchar2,
v_returnval out number )
as
v_opertime   ......
¾ÍÊÇÔÚÒÑÓеÄÊý¾Ý¿âʵÀýÉÏ´´½¨Ò»¸öеÄÕʺţ¬·ÃÎÊһЩеıí
²Ù×÷²½ÖèÈçÏ£º
1¡¢µÇ¼linux£¬ÒÔoracleÓû§µÇ¼£¨Èç¹ûÊÇrootÓû§µÇ¼µÄ£¬µÇ¼ºóÓà su - oracleÃüÁîÇл»³ÉoracleÓû§£©
2¡¢ÒÔsysdba·½Ê½À´´ò¿ªsqlplus£¬ÃüÁîÈçÏ£º sqlplus "/as sysdba"
3¡¢²é¿´ÎÒÃdz£¹æ½«Óû§±í¿Õ¼ä·ÅÖÃλÖà ......