• Haining (5/21/2012)


    The answer given for the question is not quite consistent with SQL 2012.

    In fact, the SERVER scope DDL triggers present as,

    "DDL triggers are not scoped to schemas. Therefore, functions such as OBJECT_ID, OBJECT_NAME, OBJECTPROPERTY, and OBJECTPROPERTYEX cannot be used for querying metadata about DDL triggers. Use the catalog views instead.

    Server-scoped DDL triggers appear in the SQL Server Management Studio Object Explorer in the Triggers folder. This folder is located under the Server Objects folder. Database-scoped DDL triggers appear in the Database Triggers folder. This folder is located under the Programmability folder of the corresponding database."

    Reference: http://msdn.microsoft.com/en-us/library/ms175941.aspx%5B/quote%5D

    It seems to me that unless I've horribly misunderstood something, the answer is completely consistent with SQL Server 2012. See the SQL 2012 BoL page sys.server_triggers. The page you refer to is about where things appear in SSMS, not about where they are stored, which for server scoped triggers is as in the answer. The answer also points out that database scoped triggers are visible in each database in the appropriate sys.triggers view in the appropriate database, which is confirmed by the relevant SQL 2012 BoL page sys.triggers as well as by the one you quote.

    It's a pity that the answer references a BoL page for which there's no SQL 20112 version insetad of one which covers all three currently supported releases.

    Tom