Database Redundancy

Currently we have a pay by phone system that accesses a database.  We are going to setup a second database server at our DR site.  I would like to build this redundancy in the script.  My first thought is place commands under Connection Not Available each time a DB step was attempted.  Does anyone have a reccomendation of a more efficient way to go about this?  Has anyone done something like this before?

ahannah's picture

Database Redundancy

Ashafer33,

This is going to be a pretty difficult one to achieve.  Simply because your script will need to reference a database source, and right now to my knowledge there is no way to script that reference to a variable/parameter so you can change it on the fly via the Application interface on the appadmin page. 

If you goto the Dowloads section here, look at UCCX 7 Script docs, then pull up the Script Editor volume 2 reference guide, it has all the database steps you can use in it.  I think what you could possibly do is use the DB Get step and on the SQL Error branch of the DB Get, you could possibly try to nest an additional DB Get step which could reference your backup database server.  I have never tried it this way before, and you would want to make sure you debug the heck out of it, but give that a shot and let me know if it works. 

Hope that helps,

Alex

Solution Found!

We ended up finding a solution to this, and it is great!!!  It's all done on the ODBC connection using SQL Client 10.  This client has a field for a mirror server.  Our DBA did some magic on his end and, voila!  Tested and it works great!  I did have to rebuild the ODBC connection using the new client and re-create it as a datasource.  No scripting involvement at all.

Recommended Reading: