JobServer Members
The JobServer object represents the Microsoft SQL Server Agent subsystem and the MSDB database.
The following tables list the members exposed by the JobServer type.
Protected Fields
名稱 | Description | |
---|---|---|
m_ExtendedProperties | (inherited from SqlSmoObject ) |
頂端
Public Properties
(see also Protected Properties )
名稱 | Description | |
---|---|---|
AgentLogLevel | Gets or sets the type of messages that are logged by Microsoft SQL Server Agent. | |
AgentMailType | Gets or sets the mail type for Microsoft SQL Server Agent. | |
AgentShutdownWaitTime | Gets or sets the time that Microsoft SQL Server Agent waits for jobs to complete execution before shutting down. | |
AlertCategories | Represents a collection of AlertCategory objects. Each AlertCategory object represents an alert category defined on Microsoft SQL Server Agent. | |
Alerts | Represents a collection of Alert objects. Each Alert object represents an alert defined on Microsoft SQL Server Agent. | |
AlertSystem | The AlertSystem object stores information that applies to all the alerts defined on Microsoft SQL Server Agent. | |
DatabaseMailProfile | Gets or sets a Database Mail profile. | |
ErrorLogFile | Gets or sets the name and path of the file in which Microsoft SQL Server Agent records errors. | |
HostLoginName | Gets or sets the logon used to log on to Microsoft SQL Server. | |
IdleCpuDuration | Gets or sets the length of time in seconds that the processor must have to maintain the CPU idle percentage value before the processor is considered idle. | |
IdleCpuPercentage | Gets or sets the CPU idle percentage threshold that the processor is required to achieve before it is considered idle. | |
IsCpuPollingEnabled | Gets or sets the Boolean property value that specifies whether CPU polling is enabled. | |
JobCategories | Represents a collection of JobCategory objects. Each JobCategory object represents a job category defined on Microsoft SQL Server Agent. | |
Jobs | Represents a collection of Job objects. Each Job object represents a job defined on Microsoft SQL Server Agent. | |
JobServerType | Gets or sets the type of job server with regard to multiserver administration. | |
LocalHostAlias | Gets or sets the local host alias that is used to connect to the local instance of Microsoft SQL Server. | |
LoginTimeout | Gets or sets the number of seconds after which an attempt to connect times out. | |
MaximumHistoryRows | Gets or sets the maximum number of history rows retained. | |
MaximumJobHistoryRows | Gets or sets the maximum number of history rows retained per job. | |
MsxAccountCredentialName | Gets or sets the Microsoft Windows account required to connect to the master server using Windows Authentication. | |
MsxAccountName | Gets or sets the logon required to connect to the master server using Microsoft SQL Server Authentication. | |
MsxServerName | Gets or sets the name of the master server participating in multiserver administration. | |
Name | Gets or sets the name of the object. (inherited from NamedSmoObject) | |
NetSendRecipient | Gets or sets the recipient of net send messages. | |
OperatorCategories | Represents a collection of OperatorCategory objects. Each OperatorCategory object represents an operator category defined on Microsoft SQL Server Agent. | |
Operators | Represents a collection of Operator objects. Each Operator object represents an operator defined on Microsoft SQL Server Agent. | |
Parent | Gets the Server object that is the parent of the JobServer object. | |
Properties | Gets a collection of Property objects that represent the object properties. (inherited from SqlSmoObject) | |
ProxyAccounts | Represents a collection of ProxyAccount objects. Each ProxyAccount object represents a proxy account defined on Microsoft SQL Server Agent. | |
ReplaceAlertTokensEnabled | ||
SaveInSentFolder | Gets or sets the Boolean property value that specifies whether the notifications are saved. | |
SharedSchedules | Represents a collection of JobSchedule objects. Each JobSchedule object represents a shared schedule defined on Microsoft SQL Server Agent. | |
SqlAgentAutoStart | Gets or sets the Boolean property value that specifies whether SQL Server Agent is automatically started. | |
SqlAgentMailProfile | Gets or sets a Microsoft SQL Server Agent mail profile. | |
SqlAgentRestart | Gets or sets the Boolean property value that specifies whether SQL Server Agent is monitored and restarted if it stops. | |
SqlServerRestart | Gets or sets the Boolean property value that specifies whether the Microsoft SQL Server Service is monitored and restarted if it stops. | |
State | Gets the state of the referenced object. (inherited from SmoObjectBase) | |
SysAdminOnly | Gets the Boolean property value that specifies whether CmdExec and ActiveX commands can only be executed by members of the sysadmins fixed server role. | |
TargetServerGroups | Represents a collection of TargetServerGroup objects. Each TargetServerGroup object represents a target server group defined on Microsoft SQL Server Agent. | |
TargetServers | Represents a collection of TargetServer objects. Each TargetServer object represents a target server defined on Microsoft SQL Server Agent. | |
Urn | Gets the Uniform Resource Name (URN) address value that uniquely identifies the object. (inherited from SqlSmoObject) | |
UserData | Gets or sets user-defined data associated with the referenced object. (inherited from SmoObjectBase) | |
WriteOemErrorLog | Gets or sets the Boolean property value that specifies whether to write the error log to a non-Unicode file or not. |
頂端
Protected Properties
名稱 | Description | |
---|---|---|
ExecuteForScalar | Gets or sets the Boolean property value that specifies whether the object is set to the execute for scalar option. (inherited from SqlSmoObject) | |
ObjectInSpace | Gets the Boolean property value that specifies whether the object exists in isolation or whether it is connected to the instance of Microsoft SQL Server directly or indirectly. (inherited from SqlSmoObject) | |
PresetProperties | Gets or sets the preset properties of the referenced object. (inherited from SqlSmoObject) | |
ScalarResult | Gets the scalar result for the referenced object. (inherited from SqlSmoObject) |
頂端
Public Methods
(see also Protected Methods )
名稱 | Description | |
---|---|---|
Alter | Updates any JobServer object property changes on an instance of Microsoft SQL Server. | |
ClearHostLoginAccount | Clears the host logon account and uses integrated security to log on to Microsoft SQL Server. | |
ClearMsxAccount | Clears the master server logon account and uses integrated security to log on to the master server. | |
CycleErrorLog | Closes and renames the current error log, and then creates a new empty error log file. | |
DropJobByID | Removes the job with the specified ID value. | |
DropJobsByLogin | Removes the job with the specified logon name. | |
DropJobsByServer | Removes the job with the specified server. | |
EnumErrorLogs | Enumerates a list of Microsoft SQL Server Agent error log information. | |
EnumJobHistory | Overloaded. Enumerates a list of Microsoft SQL Server Agent job history information. | |
EnumJobs | Overloaded. Enumerates a list of information about the current job. | |
EnumPerformanceCounters | Overloaded. Enumerates a list of Microsoft SQL Server Agent performance counter information. | |
EnumSubSystems | Enumerates a list of Microsoft SQL Server Agent execution subsystems. | |
Equals | Overloaded. (inherited from Object ) | |
GetHashCode | (inherited from Object ) | |
GetJobByID | Returns a job with the specified ID value. | |
GetType | (inherited from Object ) | |
Initialize | Overloaded. Initializes the object and forces the properties be loaded. (inherited from SqlSmoObject) | |
MsxDefect | Overloaded. Ends Microsoft SQL Server Agent participation in a multiserver administration group | |
MsxEnlist | Enlists Microsoft SQL Server Agent as a target server with the specified master server in a multiserver administration. | |
PurgeJobHistory | Overloaded. Removes all logged records of Microsoft SQL Server Agent jobs. | |
ReadErrorLog | Overloaded. Enumerates the error log. | |
ReassignJobsByLogin | Changes ownership for any Microsoft SQL Server Agent job currently owned by a Microsoft SQL Server logon. | |
ReferenceEquals | (inherited from Object ) | |
Refresh | Refreshes the object and retrieves properties when the object is next accessed. (inherited from SqlSmoObject) | |
RemoveJobByID | Removes a job with a specified ID value. | |
RemoveJobsByLogin | Removes a job with a specified logon. | |
Script | Overloaded. Generates a Transact-SQL script that can be used to re-create SQL Server Agent. | |
SetHostLoginAccount | Sets the Microsoft SQL Server Authentication account and password used to log on to SQL Server. | |
SetMsxAccount | Overloaded. Sets the name of the credentials used to log on to the master server in multiserver administration. | |
StartMonitor | Starts monitoring the local Microsoft SQL Server Agent Service by an instance of SQL Server. | |
StopMonitor | Ends monitoring the local Microsoft SQL Server Agent Service by an instance of SQL Server. | |
TestMailProfile | Tests the validity of an e-mail profile. | |
TestNetSend | Tests the validity of a net send address. | |
ToString | Returns a String that represents the referenced object. (inherited from SqlSmoObject) |
頂端
Protected Methods
名稱 | Description | |
---|---|---|
AlterImpl | (inherited from SqlSmoObject ) | |
AlterImplFinish | (inherited from SqlSmoObject ) | |
AlterImplInit | (inherited from SqlSmoObject ) | |
AlterImplWorker | (inherited from SqlSmoObject ) | |
BindDefaultImpl | (inherited from SqlSmoObject ) | |
BindRuleImpl | (inherited from SqlSmoObject ) | |
CheckCollation | (inherited from SqlSmoObject ) | |
CheckObjectState | Overloaded. Validates the state of the referenced object. (inherited from SqlSmoObject) | |
CheckObjectStateImpl | (inherited from SqlSmoObject ) | |
CheckVersion80 | Checks the validity of the object on Microsoft SQL Server 2000. (inherited from SqlSmoObject) | |
CheckVersion80SP3 | Checks the validity of the object on Microsoft SQL Server 2000 SP3. (inherited from SqlSmoObject) | |
CheckVersion90 | Check the validity of the object on Microsoft SQL Server 2005. (inherited from SqlSmoObject) | |
CheckVersionBelow90 | (inherited from SqlSmoObject ) | |
CleanObject | (inherited from SqlSmoObject ) | |
CreateImpl | (inherited from SqlSmoObject ) | |
CreateImplFinish | (inherited from SqlSmoObject ) | |
CreateImplInit | (inherited from SqlSmoObject ) | |
DropImpl | (inherited from SqlSmoObject ) | |
DropImplWorker | (inherited from SqlSmoObject ) | |
Finalize | (inherited from Object ) | |
FormatSqlVariant | (inherited from SqlSmoObject ) | |
GenerateDataSpaceScript | (inherited from SqlSmoObject ) | |
GetBindDefaultScript | (inherited from SqlSmoObject ) | |
GetBindRuleScript | (inherited from SqlSmoObject ) | |
GetBoolParameter | Overloaded. (inherited from SqlSmoObject ) | |
GetDateTimeParameter | (inherited from SqlSmoObject ) | |
GetDateTimeParameterAsInt | (inherited from SqlSmoObject ) | |
GetDBName | Gets the name of the database with which Microsoft SQL Server Agent is associated. (inherited from AgentObjectBase) | |
GetEnumParameter | (inherited from SqlSmoObject ) | |
GetFragOptionString | (inherited from SqlSmoObject ) | |
GetGuidParameter | (inherited from SqlSmoObject ) | |
GetParameter | Overloaded. (inherited from SqlSmoObject ) | |
GetPropValue | (inherited from SqlSmoObject ) | |
GetPropValueOptional | (inherited from SqlSmoObject ) | |
GetPropValueOptionalAllowNull | (inherited from SqlSmoObject ) | |
GetRealValue | (inherited from SqlSmoObject ) | |
GetScriptingOptionsForCreate | (inherited from SqlSmoObject ) | |
GetServerName | Gets the name of the instance of Microsoft SQL Server with which the object is associated. (inherited from SqlSmoObject) | |
GetSqlServerVersionName | Gets the version name of the instance of Microsoft SQL Server with which the object is associated. (inherited from SqlSmoObject) | |
GetStringParameter | Overloaded. (inherited from SqlSmoObject ) | |
GetTimeSpanParameterAsInt | (inherited from SqlSmoObject ) | |
GetUrnRecursive | Overloaded. (inherited from SqlSmoObject ) | |
ImplInitialize | (inherited from SqlSmoObject ) | |
IsCollectionDirty | (inherited from SqlSmoObject ) | |
IsObjectDirty | Verifies whether the object properties have been modified and the changes have not yet been persisted on the instance of Microsoft SQL Server. (inherited from SqlSmoObject) | |
IsObjectInitialized | Verifies whether the object has been initialized. (inherited from SqlSmoObject) | |
IsObjectInSpace | Verifies whether the object is isolated or connected to the instance of Microsoft SQL Server. (inherited from SqlSmoObject) | |
IsVersion80SP3 | (inherited from SqlSmoObject ) | |
MarkDropped | (inherited from SqlSmoObject ) | |
MarkForDropImpl | (inherited from SqlSmoObject ) | |
MemberwiseClone | (inherited from Object ) | |
PostAlter | (inherited from SqlSmoObject ) | |
PostCreate | (inherited from SqlSmoObject ) | |
PostDrop | (inherited from SqlSmoObject ) | |
RenameImpl | (inherited from NamedSmoObject ) | |
RenameImplWorker | (inherited from NamedSmoObject ) | |
ScriptAlter | (inherited from SqlSmoObject ) | |
ScriptChangeOwner | (inherited from NamedSmoObject ) | |
ScriptCreate | (inherited from SqlSmoObject ) | |
ScriptDdl | (inherited from SqlSmoObject ) | |
ScriptDrop | (inherited from SqlSmoObject ) | |
ScriptImpl | Overloaded. (inherited from SqlSmoObject ) | |
ScriptImplWorker | (inherited from SqlSmoObject ) | |
ScriptRename | (inherited from NamedSmoObject ) | |
SetParentImpl | (inherited from SqlSmoObject ) | |
Trace | (inherited from SqlSmoObject ) | |
UnbindDefaultImpl | (inherited from SqlSmoObject ) | |
UnbindRuleImpl | (inherited from SqlSmoObject ) | |
UpdateCollectionState2 | (inherited from SqlSmoObject ) |
頂端
請參閱
參考
JobServer Class
Microsoft.SqlServer.Management.Smo.Agent Namespace
其他資源
自動化管理工作 (SQL Server Agent)
Scheduling Automatic Administrative Tasks in SQL Server Agent
SQL Server Agent 預存程序 (Transact-SQL)