コード例 #1
0
 // copy constructor
 public JobStepData(JobStepData source)
 {
     this.originalName   = source.originalName;
     this.currentName    = source.currentName;
     this.alreadyCreated = source.alreadyCreated;
     this.deleted        = source.deleted;
     this.command        = source.command;
     this.commandExecutionSuccessCode = source.commandExecutionSuccessCode;
     this.databaseName     = source.databaseName;
     this.databaseUserName = source.databaseUserName;
     this.server           = source.server;
     this.id               = source.id;
     this.originalId       = source.originalId;
     this.failureAction    = source.failureAction;
     this.failStep         = source.failStep;
     this.failStepId       = source.failStepId;
     this.successAction    = source.successAction;
     this.successStep      = source.successStep;
     this.successStepId    = source.successStepId;
     this.priority         = source.priority;
     this.outputFileName   = source.outputFileName;
     this.appendToLogFile  = source.appendToLogFile;
     this.appendToStepHist = source.appendToStepHist;
     this.writeLogToTable  = source.writeLogToTable;
     this.appendLogToTable = source.appendLogToTable;
     this.retryAttempts    = source.retryAttempts;
     this.retryInterval    = source.retryInterval;
     this.subSystem        = source.subSystem;
     this.proxyName        = source.proxyName;
     this.urn              = source.urn;
     this.parent           = source.parent;
 }
コード例 #2
0
 /// <summary>
 /// Set defaults for a new empty job
 /// </summary>
 private void SetDefaults()
 {
     this.alreadyCreated = false;
     this.currentName    = originalName = string.Empty;
     this.command        = string.Empty;
     this.commandExecutionSuccessCode = 0;
     this.databaseName     = "master";
     this.databaseUserName = string.Empty;
     this.server           = string.Empty;
     this.originalId       = this.id = -1;
     this.failureAction    = StepCompletionAction.QuitWithFailure;
     this.failStep         = null;
     this.failStepId       = -1;
     this.successAction    = StepCompletionAction.GoToNextStep;
     this.successStep      = null;
     this.successStepId    = -1;
     this.priority         = OSRunPriority.Normal;
     this.outputFileName   = string.Empty;
     this.appendToLogFile  = false;
     this.appendToStepHist = false;
     this.writeLogToTable  = false;
     this.appendLogToTable = false;
     this.retryAttempts    = 0;
     this.retryInterval    = 0;
     this.subSystem        = AgentSubSystem.TransactSql;
     this.proxyName        = string.Empty;
     this.urn = null;
 }
コード例 #3
0
        public JobStepSubSystem Lookup(AgentSubSystem key)
        {
            JobStepSubSystem rv = null;

            if (this.subSystems.ContainsKey(key))
            {
                return(this.subSystems[key]);
            }
            return(rv);
        }
コード例 #4
0
        /// <summary>
        /// load data from and existing step
        /// </summary>
        /// <param name="source"></param>
        private void LoadData(JobStep source)
        {
            this.alreadyCreated = true;
            currentName         = originalName = source.Name;
            this.urn            = source.Urn;
            this.successAction  = source.OnSuccessAction;
            this.failureAction  = source.OnFailAction;
            this.originalId     = this.id = source.ID;
            this.subSystem      = source.SubSystem;
            this.failStepId     = source.OnFailStep;
            this.successStepId  = source.OnSuccessStep;

            this.cachedSource = source;
        }
コード例 #5
0
        private static JobStepSubSystem CreateJobStepSubSystem(
            AgentSubSystem agentSubSystem,
            CDataContainer dataContainer,
            JobStepData data)
        {
            switch (agentSubSystem)
            {
            case AgentSubSystem.TransactSql:
                return(new JobStepSubSystem(AgentSubSystem.TransactSql));

            case AgentSubSystem.CmdExec:
                return(new JobStepSubSystem(AgentSubSystem.CmdExec));

            case AgentSubSystem.Distribution:
                return(new JobStepSubSystem(AgentSubSystem.Distribution));

            case AgentSubSystem.Merge:
                return(new JobStepSubSystem(AgentSubSystem.Merge));

            case AgentSubSystem.QueueReader:
                return(new JobStepSubSystem(AgentSubSystem.QueueReader));

            case AgentSubSystem.Snapshot:
                return(new JobStepSubSystem(AgentSubSystem.Snapshot));

            case AgentSubSystem.LogReader:
                return(new JobStepSubSystem(AgentSubSystem.LogReader));

            case AgentSubSystem.AnalysisCommand:
                return(new JobStepSubSystem(AgentSubSystem.AnalysisCommand));

            case AgentSubSystem.AnalysisQuery:
                return(new JobStepSubSystem(AgentSubSystem.AnalysisQuery));

            case AgentSubSystem.PowerShell:
                return(new JobStepSubSystem(AgentSubSystem.PowerShell));

            default:
                return(null);
            }
        }
コード例 #6
0
        public List <SelectListItem> getProxies(string ServerName, AgentSubSystem StepType)
        {
            List <SelectListItem> proxies    = new List <SelectListItem>();
            ConnectSqlServer      connection = new ConnectSqlServer();
            Server dbServer = connection.Connect(ServerName);

            foreach (ProxyAccount proxy in dbServer.JobServer.ProxyAccounts)
            {
                DataTable dt = proxy.EnumSubSystems();
                foreach (DataRow row in dt.Rows)
                {
                    if (row["Name"].ToString() == StepType.ToString())
                    {
                        proxies.Add(new SelectListItem {
                            Text = proxy.Name, Value = proxy.ID.ToString()
                        });
                    }
                }
            }
            return(proxies);
        }
コード例 #7
0
 // Returns name of the subsystem for a given enum value
 public static string LookupName(AgentSubSystem key)
 {
     // Have to subtract first enum value to bring the
     // index to 0-based index
     return(typeConverter.ConvertToInvariantString((Enum)key));
 }
コード例 #8
0
 // Returns name of the subsystem for a given enum value
 public static string LookupFriendlyName(AgentSubSystem key)
 {
     return((string)typeConverter.ConvertToString((Enum)key));
 }
コード例 #9
0
 public JobStepSubSystem(AgentSubSystem key)
 {
     this.subSystemKey = key;
 }