• Just a little off the main topic, but I found the enumeration script for table and views really helpful when trying to determine which objects had triggers associated with them. I modified the original to suit as follows:

    SELECT ISNULL(tbl.name, vue.name) AS [schemaName]

    , trg.name AS triggerName, ISNULL(tbl.tblname, vue.vuename) AS [tablename]

    FROM sys.triggers trg

    LEFT OUTER JOIN (SELECT tparent.object_id, ts.name, tparent.name AS tblname

    FROM sys.tables tparent

    INNER JOIN sys.schemas ts ON TS.schema_id = tparent.SCHEMA_ID)

    AS tbl ON tbl.OBJECT_ID = trg.parent_id

    LEFT OUTER JOIN (SELECT vparent.object_id, vs.name, vparent.name AS vuename

    FROM sys.views vparent

    INNER JOIN sys.schemas vs ON vs.schema_id = vparent.SCHEMA_ID)

    AS vue ON vue.OBJECT_ID = trg.parent_id

    ORDER BY tablename, trg.name

    Thanks to davidfail!!!