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 2005 Forums
 SQL Server Administration (2005)
 find problem with profiler

Author  Topic 

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-12-27 : 04:17:48
we have portal,and some users complaint that some pages in portal is not working.
how can i know if the DB is right or how can i see it in SQL profiler?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-27 : 18:23:34
What is meant by "is not working"? Is there an error? Or is it just slow?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-12-28 : 05:50:41
it is not slow, i mean ,when i click on the button than sometimes
i can see the forms and some times i can not see.



Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-28 : 13:08:10
That doesn't sound like a SQL Server problem. Forms are an application problem.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-12-29 : 06:25:06
thanks tkizer ,

how can i prove that is not DataBase Problem?
my manger want some prove,
(the company who develop application said ,that is not application
problem).
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2009-12-29 : 06:58:31
Hi inbs.

Is the problem intermittent?
Can you sometimes see the same form one time but then not the next or do some 'forms' always not work?

Do you get any kind of error message at all?

If this is through a browser then maybe you are timing out.

How long does it take for you to know that there is a problem when you click a button? If it's a while then you could try running

EXEC sp_who2

on the database in management studio to see if there are any blocking jobs.

I'm with Tara though -- I think this will be an application problem,


Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-12-29 : 07:28:19
hi Transact Charlie

1.the problem is intermittent.
2.sometimes i can see the same form one time but then not the next.
3.in this problem i do not have a problem (buy i have another
problem that i get an error)
4.i do nto think that i have timing out ( i always in the system)
5.i know immediatly when the problem occure, but i do not know when
it will be show again
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2009-12-29 : 07:51:26
quote:
Originally posted by inbs

hi Transact Charlie

1.the problem is intermittent.
2.sometimes i can see the same form one time but then not the next.
3.in this problem i do not have a problem (buy i have another
problem that i get an error)
4.i do nto think that i have timing out ( i always in the system)
5.i know immediatly when the problem occure, but i do not know when
it will be show again




OK

1 & 2) It's not a data issue then. The same data works sometimes and not other times. So the basic query to the database must *work*. Whether it is too slow or not will be another issue.

3) ??? I'm not sure what you are telling me.

4) The problem is immediate then? as soon as you click the button then something happens? If there is a thread made to bring back data from the database then that thread could be timing out and your session could still be active.

5) HOW do you know IMMEDIATELY when the problem happens. what alerts you to the fact of the problem?

------------------------------

If you start a trace in profiler and track sp:start / sp:completes / sql statement:start / sql statement: completed then you can see what the application is doing on the database.

I'm thinking that the worker thread that pulls back the information for the form is timing out. You should be able to see that in profiler if there is either an sp call that doesn't finish or an ad hoc call that doesn't finish.

Is there any other activity on the database at all or is the application the sole worker on it?

NB: edited because I lost any control of the English language

Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-12-29 : 08:55:05
sorry of my english.(i do not know well to write)

5. i do not get any alerts, i know ,when i click on the button.how can i find the sp that doesn't finish or an ad hoc call that doesn't finish in the profiler ( i get thousand of rows)
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2009-12-29 : 09:36:08
well that's going to be hard. Profiler will give you a lot of information.

The first thing to do is set up the trace.

Take away all the default trace flags ( the easiest way is to right click on the bold section headers like "Security Audit" and choose "deselect Event Category) Once you've got everything deselected then you can choose the flags I mentioned earlier:

I'd recommend only 4 flags:

Stored Procedures:
-----------------------------
-- SP: Completed
-- SP: Starting

TSQL
-----------------------------
-- SQL:stmtStarting
-- SQL:stmtCompleted

This should cut down on all the rows for things like RPC calls that you probably didn't want.

You can choose to store the data in a database table -- it should be a table in another database than the one that you are profiling. Then run the trace until you see a problem. As soon as you do stop the trace. the problem should be in the most recent lines. You can either look through the trace manually or you can start writing scripts to query the data.

BUT -- Even if the problem is down to a database query then that query must still be part of the application logic so the company that wrote the application would be responsible for fixing it.

The only way I can see that this is your issue is if that database is used for other things than this one application. Or if you were responsible for maintainabing the index health or some other housekeeping that hasn't been done.

Good luck


Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-12-31 : 02:20:54
can you give me a example how can i recognize a problems in the trace?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-31 : 02:24:22
If your application is not generating a SQL Server error associated with those missing objects on the page, then it is highly doubtful that SQL Profiler will show you anything. Add the Exception event which can be found in the Errors and Warnings collection.

You really need to go into debug mode from your application though to track this down.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -