You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[!INCLUDE [SQL Server SQL MI](../../includes/applies-to-version/sql-asdbmi.md)]
26
27
27
-
> [!IMPORTANT]
28
+
> [!IMPORTANT]
28
29
> On [Azure SQL Managed Instance](/azure/sql-database/sql-database-managed-instance), most, but not all SQL Server Agent features are currently supported. See [Azure SQL Managed Instance T-SQL differences from SQL Server](/azure/sql-database/sql-database-managed-instance-transact-sql-information#sql-server-agent) for details.
29
30
30
-
This topic describes how to delete [!INCLUDE[msCoName](../../includes/msconame_md.md)][!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Agent alerts in [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)].
31
-
32
-
## <aname="BeforeYouBegin"></a>Before You Begin
33
-
34
-
### <aname="Restrictions"></a>Limitations and Restrictions
35
-
Removing an alert also removes any notifications associated with the alert.
36
-
37
-
### <aname="Security"></a>Security
38
-
39
-
#### <aname="Permissions"></a>Permissions
31
+
This article describes how to delete Microsoft SQL Server Agent alerts using SQL Server Management Studio or Transact-SQL.
32
+
33
+
## <aname="BeforeYouBegin"></a>Before You Begin
34
+
35
+
### <aname="Restrictions"></a>Limitations and Restrictions
36
+
37
+
Removing an alert also removes any notifications associated with the alert.
38
+
39
+
### <aname="Security"></a>Security
40
+
41
+
#### <aname="Permissions"></a>Permissions
42
+
40
43
By default, only members of the **sysadmin** fixed server role can delete alerts.
41
-
42
-
## <aname="SSMSProcedure"></a>Using SQL Server Management Studio
43
-
44
-
####To delete an alert
45
-
46
-
1.In **Object Explorer,**click the plus sign to expand the server that contains the SQL Server Agent alert that you want to delete.
47
-
48
-
2. Click the plus sign to expand **SQL Server Agent**.
49
-
50
-
3. Click the plus sign to expand the **Alerts** folder.
51
-
52
-
4.Right-click the alert you want to delete and select **Delete**.
53
-
54
-
5.In the **Delete Object** dialog box, confirm that the correct alert is selected and click **OK**.
55
-
56
-
## <aname="TsqlProcedure"></a>Using Transact-SQL
57
-
58
-
####To delete an alert
59
-
60
-
1.In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde_md.md)].
61
-
62
-
2.On the Standard bar, click**New Query**.
63
-
64
-
3.Copy and paste the following example into the query window and click**Execute**.
65
-
66
-
```
67
-
-- deletes the SQL Server Agent alert called 'Test Alert.'
68
-
USE msdb ;
69
-
GO
70
-
71
-
EXEC dbo.sp_delete_alert
72
-
@name = N'Test Alert' ;
73
-
GO
74
-
```
75
-
76
-
For more information, see [sp_delete_alert (Transact-SQL)](../../relational-databases/system-stored-procedures/sp-delete-alert-transact-sql.md).
44
+
45
+
## <aname="SSMSProcedure"></a>Using SQL Server Management Studio
46
+
47
+
### To delete an alert
48
+
49
+
1. In **Object Explorer,**select the plus sign to expand the server that contains the SQL Server Agent alert that you want to delete.
50
+
51
+
2.Select the plus sign to expand **SQL Server Agent**.
52
+
53
+
3.Select the plus sign to expand the **Alerts** folder.
54
+
55
+
4. Right-click the alert you want to delete and select **Delete**.
56
+
57
+
5. In the **Delete Object** dialog box, confirm you chose the correct alert then select **OK**.
58
+
59
+
## <aname="TsqlProcedure"></a>Using Transact-SQL
60
+
61
+
### To delete an alert
62
+
63
+
1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde_md.md)].
64
+
65
+
2. On the Standard bar, select**New Query**.
66
+
67
+
3. Copy and paste the following example into the query window and select**Execute**.
68
+
69
+
```
70
+
-- deletes the SQL Server Agent alert called 'Test Alert.'
71
+
USE msdb ;
72
+
GO
73
+
74
+
EXEC dbo.sp_delete_alert
75
+
@name = N'Test Alert' ;
76
+
GO
77
+
```
78
+
79
+
For more information, see [sp_delete_alert (Transact-SQL)](../../relational-databases/system-stored-procedures/sp-delete-alert-transact-sql.md).
> On [Azure SQL Managed Instance](/azure/sql-database/sql-database-managed-instance), most, but not all SQL Server Agent features are currently supported. See [Azure SQL Managed Instance T-SQL differences from SQL Server](/azure/sql-database/sql-database-managed-instance-transact-sql-information#sql-server-agent) for details.
25
24
26
-
Use this page to view and change the properties of a [!INCLUDE[msCoName](../../includes/msconame_md.md)][!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Agent job step.
25
+
Use this page to view and change the properties of a [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] Agent job step.
27
26
28
27
## Options
29
28
**On success action**
30
-
Sets the action for [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Agent to perform if the job step succeeds.
29
+
Sets the action for [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] Agent to perform if the job step succeeds.
31
30
32
31
**Retry attempts**
33
-
Sets the number of times that [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Agent attempts to retry a failed job step.
32
+
Sets the number of times that [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] Agent attempts to retry a failed job step.
34
33
35
34
**Retry interval (minutes)**
36
-
Sets the amount of time for [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Agent to wait between retry attempts.
35
+
Sets the amount of time for [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] Agent to wait between retry attempts.
37
36
38
37
**On failure action**
39
-
Sets the action for [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Agent to perform if the job step fails.
38
+
Sets the action for [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] Agent to perform if the job step fails.
40
39
41
40
## Options for Transact-SQL Job Steps
42
41
**Output file**
@@ -46,16 +45,16 @@ Sets the file to use for output from the job step. This option is available only
46
45
Browse to the file to use for output from the job step.
47
46
48
47
**View**
49
-
In [!INCLUDE[msCoName](../../includes/msconame_md.md)][!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)], this button is disabled for viewing output files. Instead, use Notepad to view job step output files.
48
+
In [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)], this button is disabled for viewing output files. Instead, use Notepad to view Job Step output files.
50
49
51
50
**Append output to existing file**
52
51
Append output to the existing contents of the file. Otherwise, the previous file contents are overwritten each time the job step runs.
53
52
54
53
**Log to table**
55
-
Logs job step output to the **sysjobstepslogs** table in the **msdb** database.
54
+
Logs Job Step output to the **sysjobstepslogs** table in the **msdb** database.
56
55
57
56
**View**
58
-
After the job step has run at least once, click**View** to view its output in the table.
57
+
After the job step has run at least once, select**View** to view its output in the table.
59
58
60
59
**Append output to existing entry in table**
61
60
Appends output to the existing contents of the table. Otherwise, the previous table contents are overwritten each time the job step runs.
@@ -64,7 +63,7 @@ Appends output to the existing contents of the table. Otherwise, the previous ta
64
63
Select this option to include output from the job step in the job history.
65
64
66
65
**Run as user**
67
-
If you are a member of the **sysadmin** fixed server role, you can select another SQL login to run this job step.
66
+
If you're a member of the **sysadmin** fixed server role, you can select another SQL login to run this job step.
68
67
69
68
## Options for Operating System (CmdExec) Job Steps
70
69
**Output file**
@@ -74,16 +73,16 @@ Sets the file to use for output from the job step.
74
73
Browse to the file to use for output from the job step.
75
74
76
75
**View**
77
-
In [!INCLUDE[msCoName](../../includes/msconame_md.md)][!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)], this button is disabled for viewing output files. Instead, use Notepad to view job step output files.
76
+
In [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)], this button is disabled for viewing output files. Instead, use Notepad to view Job Step output files.
78
77
79
78
**Append output to existing file**
80
-
Appends the job step output to the previous file contents each time it runs.
79
+
Appends the Job Step output to the previous file contents each time it runs.
81
80
82
81
**Log to table**
83
-
Logs job step output to the **sysjobstepslogs** table in the **msdb** database.
82
+
Logs Job Step output to the **sysjobstepslogs** table in the **msdb** database.
84
83
85
84
**View**
86
-
After the job step has run at least once, click**View** to view its output in the table.
85
+
After the job step has run at least once, select**View** to view its output in the table.
87
86
88
87
**Append output to existing entry in table**
89
88
Appends output to the existing contents of the table. Otherwise, the previous table contents are overwritten each time the job step runs.
@@ -99,16 +98,16 @@ Sets the file to use for output from the job step.
99
98
Browse to the file to use for output from the job step.
100
99
101
100
**View**
102
-
In [!INCLUDE[msCoName](../../includes/msconame_md.md)][!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)], this button is disabled for viewing output files. Instead, use Notepad to view job step output files.
101
+
In [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)], this button is disabled for viewing output files. Instead, use Notepad to view Job Step output files.
103
102
104
103
**Append output to existing file**
105
-
Appends the job step output to the previous file contents each time it runs.
104
+
Appends the Job Step output to the previous file contents each time it runs.
106
105
107
106
**Log to table**
108
-
Logs job step output to the **sysjobstepslogs** table in the **msdb** database.
107
+
Logs Job Step output to the **sysjobstepslogs** table in the **msdb** database.
109
108
110
109
**View**
111
-
After the job step has run at least once, click**View** to view its output in the table.
110
+
After the job step has run at least once, select**View** to view its output in the table.
112
111
113
112
**Append output to existing entry in table**
114
113
Appends output to the existing contents of the table. Otherwise, the previous table contents are overwritten each time the job step runs.
@@ -131,22 +130,23 @@ Sets the file to use for output from the job step. This option is available only
131
130
Browse to the file to use for output from the job step.
132
131
133
132
**View**
134
-
In [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)], this button is disabled for viewing output files. Instead, use Notepad to view job step output files.
133
+
In [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)], this button is disabled for viewing output files. Instead, use Notepad to view Job Step output files.
135
134
136
135
**Append output to existing file**
137
136
Append output to the existing contents of the file. Otherwise, the previous file contents are overwritten each time the job step runs.
138
137
139
138
**Log to table**
140
-
Logs job step output to the **sysjobstepslogs** table in the **msdb** database.
139
+
Logs Job Step output to the **sysjobstepslogs** table in the **msdb** database.
141
140
142
141
**View**
143
-
After the job step has run at least once, click**View** to view its output in the table.
142
+
After the job step has run at least once, select**View** to view its output in the table.
144
143
145
144
**Append output to existing entry in table**
146
145
Appends output to the existing contents of the table. Otherwise, the previous table contents are overwritten each time the job step runs.
147
146
148
147
**Include step output in history**
149
148
Select this option to include output from the job step in the job history.
0 commit comments