We have a SQL Server 2005 database that is used by various programs developed over the years. Most of these programs access the database using the sa login. My job is to figure out what system uses the database for what purpose so we can start creating logins with appropriate permissions or otherwise manage access.
I want to know, for a given connection, what IP logged in and what statements were executed. How can I get this information, and can I do it without significantly slowing the database server?