Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Profiling particular ASP.Net User Session

Author  Topic 

vgr.raju
Yak Posting Veteran

95 Posts

Posted - 2006-09-13 : 10:51:30
Hi All,
I am doing the perfomance tuning of the Web Application.
The application connects to the SQL Server with ASP.NET account Credentials.How can capture the Trace Events for single User actions in the Web Application[single users actions in UI]?.
I used the DatabaseID filter to narrow down.Still this does not solve my problem.
Any Help would be appreciated!

Thanks!
Raju

Thanks!
Raju
http://www.trickylife-trickylife.blogspot.com/

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-09-13 : 11:57:20
Use the DBUserName just like you use DatabaseID.
Go to Top of Page

vgr.raju
Yak Posting Veteran

95 Posts

Posted - 2006-09-13 : 13:15:45
When I use the DB UserName,all the events from ASP.NET user account
captured.I just want to capture my events in the UI.
Basically I looking for capturing single user actions(my actions)
in the UI Page.
Any help would be really appreciated

Thanks!
Raju
http://www.trickylife-trickylife.blogspot.com/
Go to Top of Page

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-09-13 : 16:31:26
If you're wanting to capture UI actions then SQL Server isn't going to help you - you need to write code in the event handlers of your application for the events that you want to capture.

You can create a table in a database to record the events and then insert a row in each event handler but don't use SQL Profiler to try and capture the events.

.NET has a Trace class (not to be confused with ASP.NET tracing) that lets you create a trace listener, which can capture information that you write out with the Trace class methods, have a look at System.Diagnostics.Trace.
Go to Top of Page

vgr.raju
Yak Posting Veteran

95 Posts

Posted - 2006-09-14 : 02:28:35
I am sorry about not clearly spelling out my requirements.
We have the web application ,where user Enters loginName and Password then navigates through the application.
I am trying to fine tune the SQL queries.
In the Test Environment,other people are using the same web application simultaneously and I am not able to exactly capture one particular user actions.(It captures all the events associated with that particular application).
So I was not able to determine,all the I/O statistics,SP_Recompile,stmtrecompile,logicalreads,writes,cachehits,cachemiss,etc.
Is there any way I can capture the SQL Events specific to one user
connected to the application with loginname and password.
Loginname and password is not stored in our server.It goes to different server,once authenticated,they are allowed to use our application.
I am kinna of stuck at this point and spending lot of time to cull through everybody's event.
Any help would be greatly appreciated!
Thanks!
Raju

Thanks!
Raju
http://www.trickylife-trickylife.blogspot.com/
Go to Top of Page

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-09-14 : 11:08:03
Then there isn't much you can do because SQL Server has no knowledge of which application user a query is running for. The queries all run under the ASPNET account, so SQL Server just sees all those queries coming from the ASP.NET application and there is nothing in them to indicate which user is on the other side of the web application.

You have to have something in your queries that you can filter on, SQL Server isn't psychic
Go to Top of Page

vgr.raju
Yak Posting Veteran

95 Posts

Posted - 2006-09-14 : 14:11:53
Thanks for your reply snSQL.I am wondering does any one face this kind of issue and I want to know how they handled it.
Any help would be really useful as it will save lot of time and effort.
Thanks!
Raju

Thanks!
Raju
http://www.trickylife-trickylife.blogspot.com/
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2006-09-14 : 18:10:00
The easiest way I can think of is to have your ADO connection string pass an "APP=myAppName" key and make the "myAppName" part different for the user you want to trace. Then you can set a filter on ApplicationName in your trace to monitor just that name.
Go to Top of Page

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-09-14 : 18:41:30
quote:
The easiest way I can think of is to have your ADO connection string pass an "APP=myAppName" key and make the "myAppName" part different for the user you want to trace. Then you can set a filter on ApplicationName in your trace to monitor just that name.


Sounds like a pretty good idea, although it will effectively turn off connection pooling so the overall web app performance will degrade if it is a busy app in production, so be aware of that. Like any potential solution it will require a change to your application.
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2006-09-14 : 18:59:16
He's profiling SQL Server performance, connection pooling won't affect his results. And I didn't say to change ALL the connection strings, just the one he wants to profile. It can always be fixed after the testing is done.
Go to Top of Page

vgr.raju
Yak Posting Veteran

95 Posts

Posted - 2006-09-14 : 19:27:41
Thanks for your input.It really solves my problem as I am interested in Tuning SQL Server Side Perfomance.



Thanks!
Raju
http://www.trickylife-trickylife.blogspot.com/
Go to Top of Page
   

- Advertisement -