Home » Microsoft » 70-764 v.2 » How should you complete the Transact-SQL statement?
HOTSPOT
Your company hosts Microsoft SQL Server instances for customers. One customer requires that the SQL Server instance send an email when an alert is generated in the Sales database.
You need to create the alert.
How should you complete the Transact-SQL statement? To answer, select the appropriate options in the answer area.
Hot Area:
Correct Answer:
Explanation/Reference:
The following example adds an e-mail notification for the specified alert (Test Alert).
NOTE: This example assumes that Test Alert already exists and that Francois Ajenstat is a valid operator name.
USE msdb ;
GO
EXEC dbo.sp_add_notification
@alert_name = N’Test Alert’, @operator_name = N’Frangois Ajenstat’,
@operator_name = N’Frangois Ajenstat’, @notification_method = 1 ;
GO
References: https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-add-notification-transact-sql?view=sql-server-2017
The Correct answer is
EXEC dbo.sp_Add_Alert.
The parameters for SP_ADD_NOTIFICATION are different
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-add-alert-transact-sql?view=sql-server-2017