What's the most efficient way to find out which logins connect to a Database in SQL server 2005

  • Hello, sql server experts.

    We're going to be migrating one of our main production servers to sql server 2012.

    It's running:Microsoft SQL Server 2005 - 9.00.4035.00 (X64) Standard Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2).

    Before we do this, we need to see which applications, logins, etc. access this database, so we're sure we fully test everything in sql server 2012.

    Would a logon trigger with AFTER LOGON clause be able to find out database name by running select db_name()?

    FOR LOGON always returns master.

    If not, would a sql trace with event 180(database object accessed) be the most efficient way to do this?

    I'd really appreciate any insights and suggestions you have.

    I was able to do this very simply with sybase auditing, but am concerned that sql server trace may possibly impact server performance, and want to minimize any impact.

  • A server-side trace has minimal impact and would be the way I'd recommend going about it on SQL 2005.

    All DDL triggers, including LOGON triggers are AFTER triggers, so changing from FOR LOGON to AFTER LOGON actually doesn't change anything.

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

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