Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to find if the oracle connection is broken in qlik sense cloud and how to create an app to monitor the connection
You can try this ways
Reload Logs
Data connection page
Test reload script with TRY/CATCH
@Chanty4u I tried by using subroutine. Will it be effective?
SUB TestConnection(vStatusVar, ConnectionName)
// Set ErrorMode = 0 (Ignore Errors) - This is the "TRY" part
SET ErrorMode = 0;
// Reset ScriptError before the attempt to ensure we only catch errors from this run
LET ScriptError = 0;
// Attempt the connection (This is the critical step)
LIB CONNECT TO '$(ConnectionName)';
// Check if the connection succeeded, or if the last statement failed
IF ScriptError = 0 THEN
// If ScriptError is 0, the last statement (LIB CONNECT) succeeded.
// Set the status variable to 'OK'
LET $(vStatusVar) = 'OK';
TRACE 'Connection OK: $(ConnectionName)';
ELSE
// If ScriptError is non-zero, the LIB CONNECT failed. Keep the default 'FAILED' status.
TRACE 'Connection FAILED to $(ConnectionName). Error Code: ' & ScriptError & ' - ' & ScriptErrorDetails;
ENDIF
// Reset ErrorMode to 1 (Stop on Error) for the rest of the script
SET ErrorMode = 1;
END SUB
// 1. Initialize Status Variables
Let vOracleStatus = 'FAILED';
CALL TestConnection('vOracleStatus', 'connection Name');
ConnectionMonitor:
LOAD * INLINE [
Connection Name,Data Sources,Status
];