Trigger on extended properties? SQL SERVER

379 Views Asked by At

Does SQL Server allow triggers on extended properties, table level or column level?

If not, is there anything like a trigger that can detect an 'add' or 'update' on extended properties and execute a stored procedure automatically?

Thank you!

1

There are 1 best solutions below

1
On BEST ANSWER

You can use a DDL trigger for this.

CREATE TRIGGER foo
ON DATABASE
FOR CREATE_EXTENDED_PROPERTY, ALTER_EXTENDED_PROPERTY
AS
  BEGIN
      /*TODO: Something useful here*/
      SELECT EVENTDATA()
  END