• Lee Linares (8/7/2015)


    Thanks for taking the time share your script.

    Expanding on Gary's points you could eliminate all the JOINS by using something like this:

    'SELECT

    db_name() as Database_Name,

    name as Trigger_Name,

    OBJECT_NAME(parent_id) as Associated_Table_Name,

    is_ms_shipped,

    OBJECT_DEFINITION(object_id) AS [Trigger Text]

    FROM

    [sys].[triggers]

    WHERE

    is_disabled = 1;' --disabled

    Thanks again.

    Lee

    Thanks for the improvements.