Share via


Membres Job

The Job class represents a Microsoft SQL Server Agent job.

Le type Job expose les membres suivants.

Constructeurs

  Nom Description
Méthode publique Job() () () () Initializes a new instance of the Job class.
Méthode publique Job(JobServer, String) Initializes a new instance of the Job class on the specified instance of Microsoft SQL Server Agent and with the specified name.
Méthode publique Job(JobServer, String, Int32) Initializes a new instance of the Job class on the specified instance of SQL Server Agent and with the specified name and category

Haut de la page

Méthodes

  Nom Description
Méthode protégée AddDatabaseContext (Hérité de SqlSmoObject.)
Méthode publique AddSharedSchedule Adds a shared schedule to the Microsoft SQL Server Agent job.
Méthode publique Alter Updates any Job object property changes on an instance of Microsoft SQL Server. 
Méthode protégée AlterImpl (Hérité de SqlSmoObject.)
Méthode protégée AlterImplFinish (Hérité de SqlSmoObject.)
Méthode protégée AlterImplInit (Hérité de SqlSmoObject.)
Méthode protégée AlterImplWorker (Hérité de SqlSmoObject.)
Méthode publique ApplyToTargetServer Adds a server to the list of target servers maintained for the referenced Microsoft SQL Server Agent job.
Méthode publique ApplyToTargetServerGroup Adds one or more servers to the list of target servers maintained for the referenced Microsoft SQL Server Agent job.
Méthode protégée BindDefaultImpl (Hérité de SqlSmoObject.)
Méthode protégée BindRuleImpl (Hérité de SqlSmoObject.)
Méthode protégée CheckCollation (Hérité de SqlSmoObject.)
Méthode protégée CheckObjectState() () () () Validates the state of the referenced object. (Hérité de SqlSmoObject.)
Méthode protégée CheckObjectState(Boolean) Validates the state of the referenced object with the option to specify that an exception is thrown if the object is not yet created. (Hérité de SqlSmoObject.)
Méthode protégée CheckObjectStateImpl (Hérité de SqlSmoObject.)
Méthode protégée CheckVersion100 (Hérité de SqlSmoObject.)
Méthode protégée CheckVersion80 Checks the validity of the object on SQL Server 2000. (Hérité de SqlSmoObject.)
Méthode protégée CheckVersion80SP3 Checks the validity of the object on SQL Server 2000 SP3. (Hérité de SqlSmoObject.)
Méthode protégée CheckVersion90 Check the validity of the object on SQL Server 2005. (Hérité de SqlSmoObject.)
Méthode protégée CheckVersionBelow90 (Hérité de SqlSmoObject.)
Méthode protégée CleanObject (Hérité de SqlSmoObject.)
Méthode publique Create Creates a job on the instance of Microsoft SQL Server as defined by the Job object.
Méthode protégée CreateImpl (Hérité de SqlSmoObject.)
Méthode protégée CreateImplFinish (Hérité de SqlSmoObject.)
Méthode protégée CreateImplInit (Hérité de SqlSmoObject.)
Méthode publique DeleteJobStepLogs(DateTime) Deletes job step log files that are older than the specified date.
Méthode publique DeleteJobStepLogs(Int32) Deletes job step log files that are larger that the specified log ID number.
Méthode publique Discover (Hérité de SqlSmoObject.)
Méthode publique Drop() () () () Removes an existing job.
Méthode publique Drop(Boolean) Removes an existing job.
Méthode protégée DropImpl (Hérité de SqlSmoObject.)
Méthode protégée DropImplWorker (Hérité de SqlSmoObject.)
Méthode publique EnumAlerts Enumerates a list of Agent alerts that cause automated execution of the referenced job.
Méthode publique EnumHistory() () () () Enumerates a list of execution history associated with the referenced job.
Méthode publique EnumHistory(JobHistoryFilter) Enumerates a list of execution history associated with the referenced job.
Méthode publique EnumJobStepLogs() () () () Enumerates a list of job step log files for the referenced job.
Méthode publique EnumJobStepLogs(Int32) Enumerates a list of job step log files for the job step with the specified ID value.
Méthode publique EnumJobStepLogs(String) Enumerates a list of job step log files for the job step with the specified name.
Méthode publique EnumJobStepsByID Returns an array of JobStep objects that belong to the referenced job and that are ordered by ID value.
Méthode protégée EnumScriptImpl (Hérité de SqlSmoObject.)
Méthode protégée EnumScriptImplWorker (Hérité de SqlSmoObject.)
Méthode publique EnumTargetServers Enumerates a list of execution target servers that have been assigned to the referenced job.
Méthode publique Equals (Hérité de Object.)
Méthode protégée Finalize (Hérité de Object.)
Méthode protégée FormatSqlVariant (Hérité de SqlSmoObject.)
Méthode protégée GenerateDataSpaceFileStreamScript (Hérité de SqlSmoObject.)
Méthode protégée GenerateDataSpaceScript (Hérité de SqlSmoObject.)
Méthode protégée GetBindDefaultScript (Hérité de SqlSmoObject.)
Méthode protégée GetBindRuleScript (Hérité de SqlSmoObject.)
Méthode protégée GetBoolParameter(StringBuilder, ScriptingOptions, String, String, Int32%) (Hérité de SqlSmoObject.)
Méthode protégée GetBoolParameter(StringBuilder, ScriptingOptions, String, String, Int32%, Boolean) (Hérité de SqlSmoObject.)
Méthode protégée GetDateTimeParameter (Hérité de SqlSmoObject.)
Méthode protégée GetDateTimeParameterAsInt (Hérité de SqlSmoObject.)
Méthode protégée GetDBName Gets the database name that is associated with the object. (Hérité de AgentObjectBase.)
Méthode protégée GetEnumParameter (Hérité de SqlSmoObject.)
Méthode protégée GetFragOptionString (Hérité de SqlSmoObject.)
Méthode protégée GetGuidParameter (Hérité de SqlSmoObject.)
Méthode publique GetHashCode (Hérité de Object.)
Méthode protégée GetParameter(StringBuilder, ScriptingOptions, String, String, Int32%) (Hérité de SqlSmoObject.)
Méthode protégée GetParameter(StringBuilder, ScriptingOptions, String, String, Int32%, Boolean) (Hérité de SqlSmoObject.)
Méthode protégée GetPropValue (Hérité de SqlSmoObject.)
Méthode protégée GetPropValueOptional (Hérité de SqlSmoObject.)
Méthode protégée GetPropValueOptionalAllowNull (Hérité de SqlSmoObject.)
Méthode protégée GetRealValue (Hérité de SqlSmoObject.)
Méthode protégée GetScriptingOptionsForCreate (Hérité de SqlSmoObject.)
Méthode protégée GetServerName Gets the name of the instance of SQL Server with which the object is associated. (Hérité de SqlSmoObject.)
Méthode protégée GetServerObject (Hérité de SqlSmoObject.)
Méthode protégée GetSqlServerVersionName Gets the version name of the instance of SQL Server with which the object is associated. (Hérité de SqlSmoObject.)
Méthode protégée GetStringParameter(StringBuilder, ScriptingOptions, String, String, Int32%) (Hérité de SqlSmoObject.)
Méthode protégée GetStringParameter(StringBuilder, ScriptingOptions, String, String, Int32%, Boolean) (Hérité de SqlSmoObject.)
Méthode protégée GetTimeSpanParameterAsInt (Hérité de SqlSmoObject.)
Méthode publique GetType (Hérité de Object.)
Méthode protégée GetUrnRecursive(StringBuilder) (Hérité de SqlSmoObject.)
Méthode protégée GetUrnRecursive(StringBuilder, UrnIdOption) (Hérité de SqlSmoObject.)
Méthode protégée ImplInitialize (Hérité de SqlSmoObject.)
Méthode publique Initialize() () () () Initializes the object and forces the properties be loaded. (Hérité de SqlSmoObject.)
Méthode publique Initialize(Boolean) Initializes the object and forces the properties be loaded. (Hérité de SqlSmoObject.)
Méthode publique Invoke Runs the job.
Méthode protégée IsObjectDirty Verifies whether the object properties have been modified and the changes have not yet been persisted on the instance of SQL Server. (Hérité de SqlSmoObject.)
Méthode protégée IsObjectInitialized Verifies whether the object has been initialized. (Hérité de SqlSmoObject.)
Méthode protégée IsObjectInSpace Verifies whether the object is isolated or connected to the instance of SQL Server. (Hérité de SqlSmoObject.)
Méthode protégée IsVersion80SP3 (Hérité de SqlSmoObject.)
Méthode protégée MarkDropped (Hérité de SqlSmoObject.)
Méthode protégée MarkForDropImpl (Hérité de SqlSmoObject.)
Méthode protégée MemberwiseClone (Hérité de Object.)
Méthode protégée PostAlter (Hérité de SqlSmoObject.)
Méthode protégée PostCreate (Hérité de SqlSmoObject.)
Méthode protégée PostDrop (Hérité de SqlSmoObject.)
Méthode publique PurgeHistory Removes system records maintaining execution history for the referenced job.
Méthode publique Refresh Refreshes the object and retrieves properties when the object is next accessed. (Hérité de SqlSmoObject.)
Méthode publique RemoveAllJobSchedules() () () () Removes all shared and unshared schedules from the job.
Méthode publique RemoveAllJobSchedules(Boolean) Removes all shared and unshared schedules from the job.
Méthode publique RemoveAllJobSteps Removes all the job steps associated with the job.
Méthode publique RemoveFromTargetServer Removes an execution target server from the list of target servers maintained for a job.
Méthode publique RemoveFromTargetServerGroup Removes a group of execution target servers from the list of target servers maintained for a job.
Méthode publique RemoveSharedSchedule(Int32) Removes the specified shared schedule from the job.
Méthode publique RemoveSharedSchedule(Int32, Boolean) Removes the specified shared schedule from the job and keeps unused schedules.
Méthode publique Rename Renames the job.
Méthode protégée RenameImpl This method supports the SMO infrastructure and is not intended to be used directly from your code. (Hérité de NamedSmoObject.)
Méthode protégée RenameImplWorker This method supports the SMO infrastructure and is not intended to be used directly from your code. (Hérité de NamedSmoObject.)
Méthode publique Script() () () () Generates a Transact-SQL script that can be used to re-create the Microsoft SQL Server Agent job.
Méthode publique Script(ScriptingOptions) Generates a Transact-SQL script that can be used to re-create the Microsoft SQL Server Agent job as specified by the scripting options.
Méthode protégée ScriptAlter (Hérité de SqlSmoObject.)
Méthode protégée ScriptChangeOwner This method supports the SMO infrastructure and is not intended to be used directly from your code. (Hérité de NamedSmoObject.)
Méthode protégée ScriptCreate (Hérité de SqlSmoObject.)
Méthode protégée ScriptDdl (Hérité de SqlSmoObject.)
Méthode protégée ScriptDrop (Hérité de SqlSmoObject.)
Méthode protégée ScriptImpl() () () () (Hérité de SqlSmoObject.)
Méthode protégée ScriptImpl(ScriptingOptions) (Hérité de SqlSmoObject.)
Méthode protégée ScriptImplWorker (Hérité de SqlSmoObject.)
Méthode protégée ScriptRename This method supports the SMO infrastructure and is not intended to be used directly from your code. (Hérité de NamedSmoObject.)
Méthode protégée SetParentImpl (Hérité de SqlSmoObject.)
Méthode publique Start() () () () Runs the referenced job.
Méthode publique Start(String) Runs the referenced job starting at the specified job step.
Méthode publique Stop Stops executing the referenced job.
Méthode publique ToString Returns a String that represents the referenced object. (Hérité de SqlSmoObject.)
Méthode protégée TouchImpl (Hérité de SqlSmoObject.)
Méthode protégée UnbindDefaultImpl (Hérité de SqlSmoObject.)
Méthode protégée UnbindRuleImpl (Hérité de SqlSmoObject.)
Méthode publique Validate (Hérité de SmoObjectBase.)

Haut de la page

Champs

  Nom Description
Champ protégé m_ExtendedProperties (Hérité de SqlSmoObject.)

Haut de la page

Propriétés

  Nom Description
Propriété publique Category Gets or sets the category to which the job belongs.
Propriété publique CategoryID Gets the ID value that uniquely identifies the job category.
Propriété publique CategoryType Gets or sets the type of category, with respect to local or multiserver jobs.
Propriété publique CurrentRunRetryAttempt Gets the number of times Microsoft SQL Server Agent has attempted to run the job unsuccessfully.
Propriété publique CurrentRunStatus Gets the current execution status of the job.
Propriété publique CurrentRunStep Gets information about the job step that is currently running.
Propriété publique DateCreated Gets the date and time when the job was created.
Propriété publique DateLastModified Gets the date and time when the job was last modified.
Propriété publique DeleteLevel Gets or sets the completion action that determines whether to delete the job definition when the job finishes execution.
Propriété publique Description Gets or sets the textual description of the job.
Propriété publique EmailLevel Gets or sets the completion action that determines whether to send an e-mail notification to an operator when the job finishes execution.
Propriété publique EventLogLevel Gets or sets the completion action that determines whether to generate an operating system event log entry when the job finishes execution.
Propriété protégée ExecuteForScalar Gets or sets the Boolean property value that specifies whether the object is set to the execute for scalar option. (Hérité de SqlSmoObject.)
Propriété publique HasSchedule Gets the Boolean property value that specifies whether the job has at least one schedule.
Propriété publique HasServer Gets the Boolean property value that specifies whether the job has a target server assigned for multiple-server operations.
Propriété publique HasStep Gets the Boolean property value that specifies whether the job has at least one job step.
Propriété publique IsEnabled Gets or sets the Boolean property value that specifies whether the job is enabled.
Propriété protégée IsTouched Gets the Boolean property value that specifies whether the object properties have been updated but not yet persisted on the server. (Hérité de SqlSmoObject.)
Propriété publique JobID Gets or sets the job ID value.
Propriété publique JobSchedules Gets a collection of JobSchedule objects that represent the schedules assigned to the job.
Propriété publique JobSteps Gets a collection of JobStep objects that represent the job steps defined for the job.
Propriété publique JobType Gets the job type, which specifies whether the job is local or multiserver.
Propriété publique LastRunDate Gets the date and time when the job was last run.
Propriété publique LastRunOutcome Gets the result of the job from the last time it completed execution.
Propriété publique Name (Se substitue à NamedSmoObject. . :: . .Name.)
Propriété publique NetSendLevel Gets or sets the completion action that determines whether to net-send a notification to an operator when the job finishes execution.
Propriété publique NextRunDate Gets the date and time when the job is next scheduled to run.
Propriété publique NextRunScheduleID Gets the ID value of the schedule that is responsible for the next execution of the job.
Propriété protégée ObjectInSpace Gets the Boolean property value that specifies whether the object exists in isolation, or whether it is directly or indirectly connected to the instance of SQL Server. (Hérité de SqlSmoObject.)
Propriété publique OperatorToEmail Gets or sets the operator that receives notification by e-mail when the job finishes execution.
Propriété publique OperatorToNetSend Gets or sets the operator that receives a net-send notification when the job finishes execution.
Propriété publique OperatorToPage Gets or sets the operator that receives a pager notification when the job finishes execution.
Propriété publique OriginatingServer Gets the name of the server that is acting as the master server in a multiserver job.
Propriété publique OwnerLoginName Gets or sets the owner of the job.
Propriété publique PageLevel Gets or sets the completion action that determines whether to send a pager notification to an operator when the job finishes execution.
Propriété publique Parent Gets or sets the JobServer object that is the parent of the Job object.
Propriété publique Properties Gets a collection of Property objects that represent the object properties. (Hérité de SqlSmoObject.)
Propriété protégée ScalarResult Gets the scalar result for the referenced object. (Hérité de SqlSmoObject.)
Propriété publique StartStepID Gets or sets the ID value of the first job step in the sequence to be executed.
Propriété publique State Gets the state of the referenced object. (Hérité de SmoObjectBase.)
Propriété publique Urn Gets the Uniform Resource Name (URN) address value that uniquely identifies the object. (Hérité de SqlSmoObject.)
Propriété publique UserData Gets or sets user-defined data associated with the referenced object. (Hérité de SmoObjectBase.)
Propriété publique VersionNumber Gets a system-maintained value that is incremented every time the job is modified.

Haut de la page

Événements

  Nom Description
Événement public PropertyChanged (Hérité de SqlSmoObject.)
Événement public PropertyMetadataChanged (Hérité de SqlSmoObject.)

Haut de la page

Implémentations d'interfaces explicites

  Nom Description
Implémentation d'interface expliciteMéthode privée IAlienObjectDiscover (Hérité de SqlSmoObject.)
Implémentation d'interface expliciteMéthode privée IAlienObjectGetParent (Hérité de SqlSmoObject.)
Implémentation d'interface expliciteMéthode privée IAlienObjectGetProperty (Hérité de SqlSmoObject.)
Implémentation d'interface expliciteMéthode privée ISfcPropertyProviderGetPropertySet (Hérité de SqlSmoObject.)
Implémentation d'interface expliciteMéthode privée IAlienObjectGetUrn (Hérité de SqlSmoObject.)
Implémentation d'interface expliciteMéthode privée IAlienObjectResolve (Hérité de SqlSmoObject.)
Implémentation d'interface expliciteMéthode privée IAlienObjectSetProperty (Hérité de SqlSmoObject.)

Haut de la page