The JobName property is a string identifying a SQL Server Agent job.
Alert Object | JobHistoryFilter Object |
object.JobName [= value]
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list |
value | String naming an existing SQL Server Agent job |
For the Alert object, the JobName property represents the name of the SQL Server Agent job run in response to the represented alert.
Setting the JobName property on the JobHistoryFilter object restricts the output of the EnumJobHistory method of the JobServer object. When used, the output includes only historical data for the named SQL Server Agent job.
String. The JobName property is constrained by the constraints applicable to the Name property of the Job object.
Read/write for the JobHistoryFilter object. Read-only for the Alert object.
HRESULT GetJobName(SQLDMO_LPBSTR pRetVal);
HRESULT SetJobName(SQLDMO_LPCSTR NewValue);
Note SQL-DMO strings are always returned as OLE BSTR objects. A C/C++ application obtains a reference to the string. The application must release the reference by using SysFreeString.