Beispiel #1
0
        protected override MonitoringAlert GetExistingOrNewAlertInfo(IHealthValidationResultMinimal result)
        {
            DatabasePotentialOneCopyAlert databasePotentialOneCopyAlert = (DatabasePotentialOneCopyAlert)base.GetExistingOrNewAlertInfo(result);
            string activeServerName = PotentialOneRedundantCopyAlertTable.GetActiveServerName(result);

            if (databasePotentialOneCopyAlert.TargetServer != activeServerName)
            {
                DatabaseAlertInfoTable <DatabasePotentialOneCopyAlert> .Tracer.TraceDebug <string, string>((long)this.GetHashCode(), "PotentialOneRedundantCopyAlertTable::GetExistingOrNewAlertInfo: TargetServer has been changed, create one new alert for {0}, new TargetServer is {1}", result.Identity, activeServerName);

                base.RemoveDatabaseAlert(result.IdentityGuid);
                databasePotentialOneCopyAlert = (DatabasePotentialOneCopyAlert)base.GetExistingOrNewAlertInfo(result);
            }
            return(databasePotentialOneCopyAlert);
        }
Beispiel #2
0
        private static DatabasePotentialOneCopyAlert CreateDatabaseOneRedundantCopyAlert(IHealthValidationResultMinimal validationResult)
        {
            string activeServerName = PotentialOneRedundantCopyAlertTable.GetActiveServerName(validationResult);

            return(new DatabasePotentialOneCopyAlert(validationResult.Identity, validationResult.IdentityGuid, activeServerName));
        }