简体   繁体   中英

Track Query in SQL Profiler C#

We are currently in an open beta with a app that we supply the backend API for the UI

Long story short we dont have a PROD copy of the BETA in an isolated DEV that we can work with a SQL iNjection issue that we are tyying to resolve.

Currently the backend API uses an worker process account to do all of the work NO kerberos etc as it is a commercial public APP.

What ways can we track our requests in Porfiler amongst the 200+ beta users that we have on the system @ the moment.

(NOTE: We are moving to get a Isolated PROD copy in DEV aka TEST enviroment)

Can we attach IP's to the request that we could see in backend easily ??

Use application name in the connection string. See: http://johnnycoder.com/blog/2006/10/24/take-advantage-of-application-name/

Note it would reduce performance by preventing pooled SQL connection reuse though.

Inherent in the trace definition, no, you can't track the source IP address of a client connection. If all of your database connection objects are instantiated from a common class/method, you can set the application name to be something unique to each client. That'll let you trace it back to the source client that originated the SQL request.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM