Log successful login and logout

Posted on 2007-10-02
Last Modified: 2012-08-14
How can I configure SQL Server 2000 to log successful login and logout?
Question by:sepknow
    LVL 5

    Expert Comment

    login and logout from what? database?

    Author Comment

    LVL 10

    Expert Comment

    Are you using Windows Auth, SQL Auth, or Mixed Mode?
    LVL 5

    Expert Comment


    There is no log out trigger, can you catch it at your application?

    Author Comment

    Mixed Mode.

    In SQL 2005, it can be done in the server setting,
    but I am using SQL Server 2000.
    LVL 6

    Accepted Solution

    you could turn on the SQL trace for that.
    DBCC TRACEON (4013)

    `This trace flag writes an entry to the SQL Server error log when a new connection is established. If you set this option, your error log can fill up quickly. For each connection that occurs, the trace flag writes two entries that look like this:

    Login: sa saSQL Query Analyzer(local)ODBCmaster, server
    process ID (SPID): 57, kernel process ID (KPID): 57.
    Login: sa XANADUsaSQL Query Analyzer(local)ODBCmaster,
    server process ID (SPID): 57, kernel process ID (KPID): 57.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
    Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now