locked
How to determine system process related to SQL connections or is there a SQL Server process that would be running statement "SELECT rl.name AS [Name] FROM sys.database_principals AS rl WHERE (rl.type = 'R') ORDER BY [Name] ASC" over and over again RRS feed

  • Question

  • Hello,

    How do I determine the system process that is running against an SQL connection?  We have a process that is constantly connecting and running the query:

    •  "SELECT rl.name AS [Name] FROM sys.database_principals AS rl WHERE (rl.type = 'R') ORDER BY [Name] ASC"

    We do not have any Audits defined in our 2005 MS SQL Server and the process is connecting to 3 of our user DBs and the master and tempdb system DBs and running the command.  I see chatter on the internet about auditing but I do not see any audit definitions in the server.

    Thanks,

    Michael 

    Wednesday, May 27, 2015 3:00 PM

Answers

  • Use a trace (Server-side or via the Profiler tool). Hopefully you have something for which yu can determine who it is (loke login, hostname (not reliable, but possibly)).

    Tibor Karaszi, SQL Server MVP | web | blog

    Wednesday, May 27, 2015 5:59 PM