This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I have the following scenario. I have two databases, say Main and Shadow. One of these is a copy of the other. Lets say Shadow is a copy of Main. If Main goes offline for any reason (I get an error in reading from it) then how can I easily switch to reading from the Shadow database. For example, a workflow that captures the logic below. Obviously this flow won't work but can anyone suggest how to solve this problem.
Thanks Mark, I am not sure your suggestion would work. I can't replicate a database being down but I can make the database call return an error so I think this represents the same scenario ( I simply provide fake credentials). The problem when a database read returns an error is the flow stops at that point. It would be great if the tool had a second output stream in cases of errors to make error handling easier. Below is an updated flow - stripped down to the essentials. AS you can see, there is no streaming of data from the first DB read so the Count tool isn't hit. I have tried testing Count = null and count = 0 but the problem is the flow stops on a DB error. By the way, the tag in the filters below should read "If record count != 0"
As an alternative, I tried the following. Obviously the issue here is having to read from Shadow even if the first read succeeds. But as the read fail from database A fails, the flow stops.