Forum Discussion

Hamdi_Fersi_350's avatar
Icon for Nimbostratus rankNimbostratus
Apr 20, 2012

Load-Balancing with data guard

Hi Guys,


I'm a newbie in the F5 load balancers, and I'm discovering how much it's powerful and flexible.


However, I'm getting a little bit confused concerning load-balancing between oracle Databases already set in Active/Standby mode.


The thing is that I know that there is a Dataguard who specifies the actual status of the database through this query:


SELECT database_role from V$DATABASE;



But, how to use this script in order to switch over in the F5, telling him to switch from the old active to the new active Database.



Is it through an iRule script?


Can anybody send me a tip on how to do this?



Thanks alot.



3 Replies

  • Hi Hamdi,



    This can be done by using a custom monitor, and I can going to defer to a post by Chris Akker on a similiar request:


  • Chris_Akker_129's avatar
    Historic F5 Account
    Hi Hamdi, the database query in question in used to determine the state of the database, OPEN or not. So, if both your Active and Standby database servers are in a big-ip pool, during normal operation, the Active will be "up", and the Standby will be "down". When there is a transition from Active to Standby ( via Dataguard Manager or other process ), then health monitor will show the reverse...the Active will be "down", and the Standby will now be "up" ( becoming the new Active ). Then big-ip will begin to send connections to the Standby, as soon as the monitor ( database query ) returns the OPEN status to the big-ip.



    This monitor does not control the actual transistion, it detects the change in state, and routes connections to the current OPEN database.



    Hope this helps clarify the use case for this.





  • Yes that helped alot,


    Thanks alot guys.


    Actually, it helped me to control my databases through another mechanism and not through the Big-IP LBs.


    Thanks anyway for the help :)