Beispiel #1
0
        protected override void InternalProcessRecord()
        {
            TaskLogger.LogEnter();
            DatabaseCopy dataObject = base.DataObject;

            base.InternalProcessRecord();
            if (base.HasErrors)
            {
                TaskLogger.LogExit();
                return;
            }
            this.m_database.InvalidDatabaseCopiesAllowed = true;
            this.RunConfigurationUpdaterRpc();
            try
            {
                ReplayState.DeleteState((this.m_server != null) ? this.m_server.Fqdn : this.m_serverName, this.m_database);
            }
            catch (SecurityException ex)
            {
                this.WriteWarning(Strings.ErrorCannotDeleteReplayState(this.m_database.Name, this.m_serverName, ex.Message));
            }
            catch (UnauthorizedAccessException ex2)
            {
                this.WriteWarning(Strings.ErrorCannotDeleteReplayState(this.m_database.Name, this.m_serverName, ex2.Message));
            }
            catch (IOException ex3)
            {
                this.WriteWarning(Strings.ErrorCannotDeleteReplayState(this.m_database.Name, this.m_serverName, ex3.Message));
            }
            catch (RemoteRegistryTimedOutException ex4)
            {
                this.WriteWarning(Strings.ErrorCannotDeleteReplayState(this.m_database.Name, this.m_serverName, ex4.Message));
            }
            string pathName = this.m_database.EdbFilePath.PathName;

            if (string.IsNullOrEmpty(pathName))
            {
                this.WriteWarning(Strings.NeedRemoveCopyLogFileManuallyAfterCopyDisabledRcr(this.m_database.Name, this.m_database.LogFolderPath.PathName, this.m_serverName));
            }
            else
            {
                this.WriteWarning(Strings.NeedRemoveCopyFileManuallyAfterCopyDisabledRcr(this.m_database.Name, this.m_database.LogFolderPath.PathName, pathName, this.m_serverName));
            }
            DatabaseTasksHelper.UpdateDataGuaranteeConstraint((ITopologyConfigurationSession)base.DataSession, this.m_database, new Task.TaskWarningLoggingDelegate(this.WriteWarning));
            TaskLogger.LogExit();
        }