Oracle RAC server connection Load Balance)

Source: Internet
Author: User

The server Load balancer of the Oracle RAC server distributes new connection requests to the node with the smallest load based on the number of connection loads of each node in the RAC. When the database is running, the PMON process of each node in RAC updates the connection load of each node to service_register every three seconds. When any listener failure or unexpected failure occurs on the node, the PMON process checks whether the listener on the current node is restarted every second to obtain the latest load information and adjust the load balancing in time. This article mainly demonstrates server load balancing Under SUSE 10 + oracle 10g rac.

For more information about Server Load balancer on the client, see

Load Balance)
Configure RAC load balancing and Failover

For more information about the basics and concepts of Oracle network configuration, see:

Non-Default port listening configuration in oracle rac (listener. ora tnsnames. ora)

I. Server Load balancer Configuration

  1. 1. Add the corresponding network service name for tnsnames. ora (configured for each node)
  2. Oracle @ bo2dbp: ~> More $ ORACLE_HOME/network/admin/tnsnames. ora
  3. # Tnsnames. ora Network Configuration File:/u01/oracle/db/network/admin/tnsnames. ora
  4. # Generated by Oracle configuration tools.
  5. Remote_lsnr_gobo4 =
  6. (ADDRESS_LIST =
  7. (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.7.61) (PORT = 1521 ))
  8. (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.7.62) (PORT = 1521 ))
  9. )
  10. Local_lsnr_gobo4a =
  11. (ADDRESS_LIST =
  12. (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.7.61) (PORT = 1521 ))
  13. )
  14. Local_lsnr_gobo4b =
  15. (ADDRESS_LIST =
  16. (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.7.62) (PORT = 1521 ))
  17. )
  18. 2. Set the remote_listener parameter.
  19. Alter system set remote_listener = '<net_service_name> 'scope = both sid = '*';
  20. SQL> show parameter instance_name
  21. NAME TYPE VALUE
  22. -----------------------------------------------------------------------------
  23. Instance_name string GOBO4A
  24. SQL> show parameter listener
  25. NAME TYPE VALUE
  26. -----------------------------------------------------------------------------
  27. Local_listener string
  28. Remote_listener string
  29. SQL> alter system set remote_listener = 'remote _ lsnr_gobo4 'scope = both sid = '*';
  30. System altered.
  31. 3. Configure the client tnsnames. ora
  32. --> The client is suse 10.
  33. SZDB :~ # Ifconfig eth1 | grep "inet addr" | cut-d ""-f12 | cut-d:-f2 # -- ip address of the client host
  34. 192.168.7.2
  35. SZDB :~ # Su-oracle
  36. Oracle @ SZDB: ~> Tail-10 $ ORACLE_HOME/network/admin/tnsnames. ora
  37. GOBO4 =
  38. (DESCRIPTION =
  39. (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.7.61) (PORT = 1521 ))
  40. (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.7.62) (PORT = 1521 ))
  41. (LOAD_BALANCE = off) # -- disable the client load balancing option because only the Server Load balancer is tested.
  42. (CONNECT_DATA =
  43. (SERVER = DEDICATED)
  44. (SERVICE_NAME = GOBO4)
  45. )
  46. )
  47. # Author: Robinson Cheng
  48. # Blog: http://blog.csdn.net/robinson_0612
  49. 4. Check the listener
  50. Oracle @ bo2dbp: ~> Lsnrctl status
  51. Listening Endpoints Summary...
  52. (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.7.61) (PORT = 1521 )))
  53. (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.7.51) (PORT = 1521 )))
  54. Services Summary...
  55. Service "+ ASM" has 1 instance (s ).
  56. Instance "+ ASM1", status BLOCKED, has 1 handler (s) for this service...
  57. Service "GOBO4" has 2 instance (s ).
  58. Instance "GOBO4A", status READY, has 2 handler (s) for this service...
  59. Instance "GOBO4B", status READY, has 1 handler (s) for this service ..
  60. .......
  61. Oracle @ bo2dbs: ~> Lsnrctl status
  62. Listening Endpoints Summary...
  63. (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.7.62) (PORT = 1521 )))
  64. (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.7.52) (PORT = 1521 )))
  65. Services Summary...
  66. Service "+ ASM" has 1 instance (s ).
  67. Instance "+ ASM2", status BLOCKED, has 1 handler (s) for this service...
  68. Service "GOBO4" has 2 instance (s ).
  69. Instance "GOBO4A", status READY, has 1 handler (s) for this service...
  70. Instance "GOBO4B", status READY, has 2 handler (s) for this service...
  71. ..........
  72. # -- If the listener or database needs to be restarted, restart the listener or database.
  73. # -- The following is a clear listener log to facilitate subsequent statistics on connection information.
  74. Oracle @ bo2dbp:/u01/oracle/db/network/log> cat/dev/null> listener_bo2dbp.log
  75. Oracle @ bo2dbs:/u01/oracle/db/network/log> cat/dev/null> listener_bo2dbs.log
  • 1
  • 2
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.