Creating procedure and enable stage logging once [SqlMonitor]
Currently enableStageLogging and createProcedure is called each time prepearMonitorConnection is called (every query). prepearMonitorConnection's main purpose is to get the correct stageIgnoreBefore time. As it is now this stageIgnoreBefore time is hardcoded in the procedure as it is created. The procedure should rather take this as an argument to enable only creating the procedure once.
-
Enable stage logging once when connecting to DB (also when reset) -
Create procedure once when connecting to DB (also when reset)