Application Name in trace file

  • I performed a trace on a SQL 7 Database. I was wondering where a query would be running if the ApplicationName was Microsoft SQL Server.

    I was also wondering what the ApplicationName would show up as if a query was run from a Web Page.

    Thanks in advance

  • For your first issue, SQL Server does have connections to itself - I imagine these would be those connections (especially if the SPID is < 50).

    The applicationName that SQL profiler can display is not magically determined - it is passed through by the application as part of the connection string using the APPNAME parameter of ODBC for example.  Thus it is up to your website's developer what is passed through as the application name.  For example, if I switch on a debug switch in my app, the application name gets changed to indicate which particular point in the code the app is up to, status flags, etc...

    The hostname that is displayed is populated in a similar way - by the application connection string.

  • According to the Trace properties entry for ApplicationName: it is the client application that created the connection to SQL Server; in addition, what's been displayed can be reset by the application.

  • What I am trying to do is track down a "Select *" query that is being run. The software vendor says there is no way it is in there code. I have some web pages and other code that access the same SQL Server db but I don't use Select * in my queries either. Is there anyway to find out where the queries originated.

    What does a null NtUseraName mean?

    THanks

Viewing 4 posts - 1 through 3 (of 3 total)

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