I am trying to attach a trigger to the sys table sys.dm_db_missing_index_details
with the following query:
CREATE TRIGGER indexBackup
ON sys.dm_db_missing_index_details
AFTER INSERT,DELETE,UPDATE
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for trigger here
EXEC PerformanceTest.[dbo].[usp_persist_missing_index_DMV_data]
END
GO
I am getting the following error:
The object
sys.dm_db_missing_index_details
does not exist or is invalid for this operation.
Is it allowed to attach a trigger to a sys view or am i missing something?