ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 85 - DP-300 discussion

Report
Export

DRAG DROP

You have SQL Server on an Azure virtual machine named SQL1.

SQL1 has an agent job to back up all databases.

You add a user named dbadmin1 as a SQL Server Agent operator.

You need to ensure that dbadmin1 receives an email alert if a job fails.

Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.


Question 85
Correct answer: Question 85

Explanation:

Step 1: Enable the email settings for the SQL Server Agent.

To send a notification in response to an alert, you must first configure SQL Server Agent to send mail.

Step 2: Create a job alert

Step 3: Create a job notification

Example:

-- adds an e-mail notification for the specified alert (Test Alert)

-- This example assumes that Test Alert already exists

-- and that François Ajenstat is a valid operator name.

USE msdb ;

GO

EXEC dbo.sp_add_notification

@alert_name = N'Test Alert',

@operator_name = N'François Ajenstat',

@notification_method = 1 ;

GO

Reference:

https://docs.microsoft.com/en-us/sql/ssms/agent/notify-an-operator-of-job-status

https://docs.microsoft.com/en-us/sql/ssms/agent/assign-alerts-to-an-operator

asked 02/10/2024
Juan Garrido Soler
32 questions
User
0 comments
Sorted by

Leave a comment first