Пример #1
0
        public static bool IsActivationDisabled(AmServerName srv)
        {
            Exception ex;
            IADServer miniServer = AmBestCopySelectionHelper.GetMiniServer(srv, out ex);

            return(AmBestCopySelectionHelper.IsActivationDisabled(miniServer));
        }
Пример #2
0
        // Token: 0x0600081E RID: 2078 RVA: 0x000276B4 File Offset: 0x000258B4
        internal static ServerVersion GetServerVersion(AmServerName serverName)
        {
            Exception ex;
            IADServer miniServer = AmBestCopySelectionHelper.GetMiniServer(serverName, out ex);

            if (miniServer == null)
            {
                throw ex;
            }
            return(miniServer.AdminDisplayVersion);
        }
Пример #3
0
        // Token: 0x060006D7 RID: 1751 RVA: 0x00020C1C File Offset: 0x0001EE1C
        private bool IsAutoActivationAllowed(ref LocalizedString error)
        {
            if (this.ServerToCheck.Equals(this.SourceServer))
            {
                AmTrace.Debug("AmBcsServerValidation: Skipping 'IsAutoActivationAllowed' check since source == target. TargetServer: {0}", new object[]
                {
                    this.ServerToCheck
                });
                return(true);
            }
            Exception ex;
            IADServer miniServer = AmBestCopySelectionHelper.GetMiniServer(this.ServerToCheck, out ex);

            if (miniServer == null)
            {
                AmTrace.Error("AmBcsServerValidation: Rejecting server '{0}' for DB '{1}' because target MiniServer could not be read.", new object[]
                {
                    this.ServerToCheck,
                    this.Database.Name
                });
                error = ReplayStrings.AmBcsTargetServerADError(this.ServerToCheck.Fqdn, ex.ToString());
                this.ReportServerBlocked(AmBcsServerChecks.AutoActivationAllowed, error);
                return(false);
            }
            IADServer miniServer2 = AmBestCopySelectionHelper.GetMiniServer(this.SourceServer, out ex);

            if (miniServer2 == null)
            {
                AmTrace.Error("AmBcsServerValidation: Rejecting server '{0}' for DB '{1}' because source MiniServer '{2}' could not be read.", new object[]
                {
                    this.ServerToCheck,
                    this.Database.Name,
                    this.SourceServer
                });
                error = ReplayStrings.AmBcsSourceServerADError(this.SourceServer.Fqdn, ex.ToString());
                this.ReportServerBlocked(AmBcsServerChecks.AutoActivationAllowed, error);
                return(false);
            }
            if (!AmBestCopySelectionHelper.IsAutoActivationAllowed(miniServer2, miniServer, out error))
            {
                this.ReportServerBlocked(AmBcsServerChecks.AutoActivationAllowed, error);
                return(false);
            }
            return(true);
        }
Пример #4
0
        // Token: 0x060006F4 RID: 1780 RVA: 0x00021394 File Offset: 0x0001F594
        private void PopulateMiniServersForDatabaseCopies()
        {
            if (this.m_miniServers != null)
            {
                return;
            }
            this.PopulateDatabaseCopiesIfNecessary();
            List <IADServer> list = new List <IADServer>(this.m_dbCopies.Length);
            Exception        ex   = null;

            foreach (IADDatabaseCopy iaddatabaseCopy in this.m_dbCopies)
            {
                AmServerName serverName = new AmServerName(iaddatabaseCopy.HostServerName);
                IADServer    miniServer = AmBestCopySelectionHelper.GetMiniServer(serverName, out ex);
                if (miniServer == null)
                {
                    throw ex;
                }
                list.Add(miniServer);
            }
            this.m_miniServers = list;
        }