Audit Login and Logout

  • If my application cannot Login into the database (due to various reasons like cannot authenticate the username), does it show a Audit Logout duration of 0 sec in the profiler trace??.....How do i actually track where the Login failed???

    Any suggestions???

  • Did you happen to check the event viewer log. You might get what you are looking.

    M&M

  • Login failure can be seen from sql server error log files.

    Ryan
    //All our dreams can come true, if we have the courage to pursue them//

  • Depending on settings those failures may not appear anywhere..

    However, if login failures are configured to be recorded they will be in the errorlog and likely the Event Log. Also if an audit or trace is running it would probably be there.

    CEWII

  • Thanks i was actually able to catch the login Failure in the profiler...But couldn't figure out which part of application is causing the login failure event.....How do i actually trace it out(I picked Remote Procedure calls(RPC Starting and Completed but couldn't much help from there)

    The application was actually able to login into the sql server using same account(for some of the cases) but it fails in some of the cases(i couldn't quiet figure out which part of the application)

  • A login failure does not usually EVER involve your user code.. A login success is basically good username/password and I was able to set your default DB and language. Your code doesn't affect that UNLESS you are doing LOGON triggers which can be interesting.

    There is a login failure event, you can see it if you select show all events from the profiler.

    CEWII

  • Here is the exact error message i get

    Login failed for user 'xyz'. Reason: Password did not match that for the login provided. [CLIENT: client ipaddress]

    It sounds pretty weird.... In some of the cases(for the same user and for the same application) the login is successful and in some of the cases login fails(for the same application)

  • THe only difference i notice(from profiler trace) is failed Login's has a Database Name of master and successful Login attempt has the correct database Name....(Somehow sql server is using Master database...kind of confusing)

  • Do you have more than one place where the connection string is stored? Could that user have insufficient rights to master?

    CEWII

Viewing 9 posts - 1 through 8 (of 8 total)

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