Database connection trigger

  • Is there a way to create a trigger that will fire when ever a user tries to connect to a database? I am trying to audit connections to databases. I attempted this with a logon trigger but this logs the master database and not the database that the user is logging into. any help or a point into the right direction would be much appreciated.

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • I don't think you can do it with a trigger, but you can use a server-side trace to audit login's and that shows the database.

    Jack Corbett
    Consultant - Straight Path Solutions
    Check out these links on how to get faster and more accurate answers:
    Forum Etiquette: How to post data/code on a forum to get the best help
    Need an Answer? Actually, No ... You Need a Question

  • Thanks Jack, that is what I figured would be needed just wanted second opinion.

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply