Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have some data connections created using QMC. It is connecting to the active database host. However, I need to switch to another host during the disaster recovery test conducted on the active server. Is it possible to give multiple hostname in the connection string so that I don't have to change the connection string manually to ensure no downtime.
Here is my connection string -
CUSTOM CONNECT TO "provider=QvOdbcConnectorPackage.exe;driver=oracle;ConnectionType=basic;host=<hostname>;port=1521;servicename=<servicename>;USETNS=false;EnableNcharSupport=1;allowNonSelectQueries=false;QueryTimeout=30;useBulkReader=true;maxStringLength=4096;logSQLStatements=false;"
Hi There,
Try below
create multiple connections for example like below
lets say you created 3 connections with separate hostnames : sample :
Connecton_DB_1
Connecton_DB_2
Connecton_DB_3
SET ErrorMode=0; //To ignore error message and not prompt user for action
SET vConnectionLoop=1;
LET vConnectionNo=1;
Do
ODBC CONNECT TO Connecton_DB_$(vConnectionNo);
IF Len(ConnectString())=0 Then
SET vConnectionLoop=1;
LET vConnectionNo = $(vConnectionNo)+ 1;
ELSE
SET vConnectionLoop=2;
ENDIF
LOOP while vConnectionLoop=1;
SET ErrorMode=1;