Oracle¼àÌýЧÀÍÆ÷Òì³£ÇéÐÎÓ¦¶ÔÕ½ÂÔ
OracleÊý¾Ý¿âÊÇÆóÒµ¼¶Êý¾Ý¿âϵͳÖеÄٮٮÕߣ¬ËüµÄÎȹÌÐÔºÍÐÔÄÜÒ»Ö±¶¼±¸ÊÜÒµ½çµÄÈÏ¿É¡£Oracle¼àÌýЧÀÍÆ÷£¨Listener£©×÷ΪOracleÊý¾Ý¿âÓë¿Í»§¶ËÓ¦ÓÃÖ®¼äµÄ½»»¥»·½Ú£¬Æðµ½ÁËÖÁ¹ØÖ÷ÒªµÄ×÷Óá£È»¶ø£¬ÓÐʱ¼äListenerÒ²»á·ºÆðÒì³£ÇéÐΣ¬¿ÉÄܵ¼ÖÂÊý¾Ý¿âÎÞ·¨Õý³£ÅþÁ¬£¬¸øӪҵϵͳ´øÀ´ÑÏÖØÓ°Ïì¡£Òò´Ë£¬¹ØÓÚOracle¼àÌýЧÀÍÆ÷Òì³£ÇéÐεÄÓ¦¶ÔÕ½ÂÔÖÁ¹ØÖ÷Òª¡£
Ò»¡¢Òì³£ÇéÐÎÆÊÎö
ListenerЧÀÍ×èÖ¹£ºµ±ListenerЧÀÍ×èÖ¹ÔËÐÐʱ£¬¿Í»§¶ËÎÞ·¨ÅþÁ¬µ½Êý¾Ý¿â¡£
ListenerЧÀÍÒì³££ºÓÐʱListenerЧÀÍËäÈ»ÔËÐУ¬µ«¿ÉÄÜ·ºÆðÍøÂçͨѶÒì³£¡¢ÉèÖùýʧµÈÎÊÌ⣬µ¼ÖÂÎÞ·¨Õý³£¼àÌýÊý¾Ý¿â¶Ë¿Ú¡£
ListenerЧÀÍÛÕ±Õ£ºÔڸ߲¢·¢»òÖØ´óÍøÂçÇéÐÎÏ£¬ListenerЧÀÍÓпÉÄܱ»´ó×ÚÅþÁ¬ÇëÇóÛÕ±Õ£¬µ¼ÖÂеÄÅþÁ¬ÎÞ·¨½¨Éè¡£
¶þ¡¢»ù±¾Ó¦¶ÔÕ½ÂÔ
°´ÆÚ¼à¿ØListenerЧÀÍ״̬£¬ÊµÊ±·¢Ã÷ÎÊÌ⣻
ÉèÖÃ×Ô¶¯ÖØÆô»úÖÆ£¬È·±£ListenerЧÀÍËæʱ¿ÉÓã»
ÓÅ»¯ÍøÂçÉèÖã¬ïÔÌÍøÂçͨѶÒì³£µÄ¿ÉÄÜÐÔ£»
ÉèÖøºÔØƽºâ£¬·Öµ£ListenerѹÁ¦£»
É趨ºÏÀíµÄÅþÁ¬ÊýÉÏÏÞ£¬±ÜÃâListener±»¹ý¶àÅþÁ¬ÇëÇóÛÕ±Õ¡£
Èý¡¢Ïêϸ´úÂëʾÀý
¼à¿ØListenerЧÀÍ״̬£º
# ¼ì²éListenerЧÀÍ״̬ lsnrctl status
µÇ¼ºó¸´ÖÆ
ÉèÖÃ×Ô¶¯ÖØÆô»úÖÆ£º
# ±àд¾ç±¾£¬×¼Ê±¼ì²éListener״̬£¬·ºÆðÒì³£×Ô¶¯ÖØÆô #!/bin/bash status=$(lsnrctl status | grep "Listener is running") if [ -z "$status" ]; then lsnrctl start echo "Listener restarted at $(date)" >> /path/to/restart_log.txt fi
µÇ¼ºó¸´ÖÆ
ÉèÖøºÔØƽºâ£º
<!-- ÔÚlistener.oraÉèÖÃÎļþÖÐÌí¼Ó¸ºÔØƽºâ²ÎÊý --> (ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = server2)(PORT = 1521)) (LOAD_BALANCE = yes)
µÇ¼ºó¸´ÖÆ
É趨ÅþÁ¬ÊýÉÏÏÞ£º
<!-- ÔÚsqlnet.oraÉèÖÃÎļþÖÐÉ趨ÅþÁ¬ÊýÉÏÏÞ --> SQLNET.SEND_BUF_SIZE=65536 SQLNET.RECV_BUF_SIZE=65536 SQLNET.INBOUND_CONNECT_TIMEOUT=400 SQLNET.OUTBOUND_CONNECT_TIMEOUT=400 SQLNET.SEND_TIMEOUT=360 SQLNET.RECV_TIMEOUT=360 SQLNET.EXPIRE_TIME=10
µÇ¼ºó¸´ÖÆ
×ÛÉÏËùÊö£¬¹ØÓÚOracle¼àÌýЧÀÍÆ÷Òì³£ÇéÐεÄÓ¦¶ÔÕ½ÂÔ£¬ÐèҪͨ¹ý¼à¿Ø¡¢×Ô¶¯ÖØÆô¡¢ÍøÂçÓÅ»¯¡¢¸ºÔØƽºâºÍÅþÁ¬ÊýÏÞÖƵÈÊÖ¶ÎÀ´°ü¹ÜListenerЧÀ͵ÄÎȹÌÐԺͿɿ¿ÐÔ¡£Í¬Ê±£¬Í¨¹ýÏÖʵµÄ´úÂëʾÀý£¬¿ÉÒÔ¸üºÃµØÃ÷È·ºÍʵ¼ùÕâЩսÂÔ£¬È·±£Êý¾Ý¿âϵͳµÄÕý³£ÔËÐкÍÓªÒµµÄÎȹÌÉú³¤¡£
ÒÔÉϾÍÊÇOracle¼àÌýЧÀÍÆ÷Òì³£ÇéÐÎÓ¦¶ÔÕ½ÂÔµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡