Discussion Board for collaboration related to QlikView App Development.
I have a QVW application that generates QVD files from primary SQL database.
I also have a mirror database copy of that primary server.
What function should I use or what statement to use in the connection string so in case of primary server is down then it will automatically connect to the mirror database?
Go to Solution.
Hi Lokesh, I didn't tried but maybe using the script error variables, ie:
SET ErrorMode = 0; //If any error is found, continue execution
CONNECT To MainConnection;
IF ScriptError >0 then //If there was an error connecting try this
SET ErrorMode = 1; // If this one fails an error must be thrown
CONNECT TO FailoverConnection;
SET ErrorMode = 1; // In case there was no error, set ErrorMode to 1 for the rest of the script.
View solution in original post
Something similar discussed over here by pcammaert
Failover Partner issue or other kind of error? | Qlik Community
try something like this...
DB Connection1; //Primary Database connection
IF ScriptError=3 or ScriptError=4 then
DB Connection 2; // mirror database connection