예제 #1
0
        public static bool IsActivationDisabled(AmServerName srv)
        {
            Exception ex;
            IADServer miniServer = AmBestCopySelectionHelper.GetMiniServer(srv, out ex);

            return(AmBestCopySelectionHelper.IsActivationDisabled(miniServer));
        }
예제 #2
0
 // Token: 0x06000694 RID: 1684 RVA: 0x00020039 File Offset: 0x0001E239
 private bool IsActivationEnabled(ref LocalizedString error)
 {
     if (AmBestCopySelectionHelper.IsActivationDisabled(this.TargetServer))
     {
         error = ReplayStrings.AmBcsTargetServerActivationDisabled(this.TargetServer.Fqdn);
         this.ReportCopyStatusFailure(AmBcsChecks.ActivationEnabled, error);
         return(false);
     }
     return(true);
 }
예제 #3
0
 internal void Analyze()
 {
     this.OwningServer = new AmServerName(this.Database.Server.Name);
     this.ActiveServer = this.StateInfo.ActiveServer;
     if (AmServerName.IsNullOrEmpty(this.ActiveServer))
     {
         this.ActiveServer = this.OwningServer;
     }
     if (!AmServerName.IsEqual(this.ActiveServer, this.OwningServer))
     {
         this.IsAdPropertiesOutOfSync = true;
     }
     if (this.Database.Servers.Length > 1 && AmBestCopySelectionHelper.IsActivationDisabled(this.ActiveServer))
     {
         this.IsActiveOnDisabledServer = true;
     }
     this.MisMountedServerList = new List <AmServerName>();
     foreach (AmServerName amServerName in this.StoreStatus.Keys)
     {
         if ((this.StoreStatus[amServerName] & MdbStatusFlags.Online) == MdbStatusFlags.Online)
         {
             if (AmServerName.IsEqual(amServerName, this.ActiveServer))
             {
                 this.IsMountedOnActive = true;
             }
             else
             {
                 this.MisMountedServerList.Add(amServerName);
             }
         }
         else if ((this.StoreStatus[amServerName] & MdbStatusFlags.MountInProgress) == MdbStatusFlags.MountInProgress && AmServerName.IsEqual(amServerName, this.ActiveServer))
         {
             this.IsMountedOnActive = true;
         }
     }
     this.IsMismounted = (this.MisMountedServerList != null && this.MisMountedServerList.Count > 0);
     this.IsMountedButAdminRequestedDismount = false;
     if (this.IsMountedOnActive)
     {
         if (this.StateInfo.IsAdminDismounted)
         {
             this.IsMountedButAdminRequestedDismount = true;
         }
         if (!this.StateInfo.IsMounted)
         {
             this.IsClusterDatabaseOutOfSync = true;
         }
     }
     else if (this.StateInfo.IsMounted)
     {
         this.IsClusterDatabaseOutOfSync = true;
     }
     this.IsPeriodicMountRequired = true;
     if (!this.IsMountedOnActive)
     {
         bool flag = AmSystemManager.Instance.StoreStateMarker.IsStoreGracefullyStoppedOn(this.ActiveServer);
         if (!this.Database.MountAtStartup || this.StateInfo.IsAdminDismounted || !this.StateInfo.IsMountAttemptedAtleastOnce || flag)
         {
             this.IsPeriodicMountRequired = false;
             ReplayCrimsonEvents.PeriodicCheckerSkippedMount.LogPeriodic <string, Guid, AmServerName, bool, bool, bool, bool>(this.Database.Guid, TimeSpan.FromMinutes(30.0), this.Database.Name, this.Database.Guid, this.ActiveServer, this.Database.MountAtStartup, this.StateInfo.IsAdminDismounted, this.StateInfo.IsMountAttemptedAtleastOnce, flag);
         }
     }
     else
     {
         this.IsPeriodicMountRequired = false;
     }
     if (this.StateInfo.IsMountSucceededAtleastOnce && !AmServerName.IsEqual(this.StateInfo.LastMountedServer, this.StateInfo.ActiveServer))
     {
         this.IsClusterDatabaseOutOfSync = true;
     }
 }