Query to find LOGON triggers from any SQL Server Instance

sourav dutta 231 Reputation points
2023-12-04T09:27:32.67+00:00

I have created Logon Triggers in SQL server instances.

How can I get the logon trigger name using t-sql(query) in SQL server.

Thank you in Advance.

Developer technologies | Transact-SQL
SQL Server | Other
{count} votes

Accepted answer
  1. Olaf Helper 47,436 Reputation points
    2023-12-04T10:06:04.8566667+00:00

    You get it from DMV server_trigger

    select *
    from sys.server_triggers
    
    
    2 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Christoph Muthmann 181 Reputation points
    2023-12-04T09:59:12.5933333+00:00

    Try this one

    Use master
    go
    SELECT * -- [name]
    FROM sysobjects
    WHERE type = 'P'
      AND OBJECTPROPERTY(id, 'ExecIsStartUp') = 1;
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.