Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 1234»»»

Top 10 Wait State Issues Reporter Expand / Collapse
Author
Message
Posted Wednesday, November 21, 2012 10:45 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 1:39 PM
Points: 312, Visits: 1,102
Comments posted to this topic are about the item Top 10 Wait State Issues Reporter


Post #1387702
Posted Thursday, November 22, 2012 5:16 AM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, August 14, 2014 12:45 PM
Points: 21, Visits: 225
Hi Rudy, excelent script!

but, you have a little bug at the en of the second comment... /* instead */ ;P
Post #1387848
Posted Thursday, November 22, 2012 5:56 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 1:39 PM
Points: 312, Visits: 1,102
Thanks for the comments! :)

Could please tell me where the problem is? i don't see the problem.

Thanks,

Rudy



Post #1387862
Posted Thursday, November 22, 2012 6:05 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 1:39 PM
Points: 312, Visits: 1,102
Hello again,

I found the problem. Change the /* to */ on the second comment at the end of the line. If not the complete code will be commented out.

Sorry for the type-o.

Thanks,

Rudy



Post #1387865
Posted Thursday, November 22, 2012 6:59 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, July 4, 2014 4:32 AM
Points: 152, Visits: 386
I am also delighted, thanks a lot!

here a little correction

'LOCK - Waiting to acquire a Schema Modify lock' WHERE dbo.[#results].[wait_type] = 'LCK_M_SCH_S'

... should be Share.

Post #1387876
Posted Thursday, November 22, 2012 7:15 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 1:39 PM
Points: 312, Visits: 1,102
Arthur Kirchner (11/22/2012)
I am also delighted, thanks a lot!

here a little correction

'LOCK - Waiting to acquire a Schema Modify lock' WHERE dbo.[#results].[wait_type] = 'LCK_M_SCH_S'

... should be Share.




Thanks for looking at the script. The LCK_M_SCH_S section is MODIFY not a SHARE as per Microsoft http://support.microsoft.com/kb/822101 The "_M_" stands for MODIFY.

Please let me know where you have found your information from.

Again thanks for your help,

Rudy



Post #1387884
Posted Thursday, November 22, 2012 7:34 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, July 4, 2014 4:32 AM
Points: 152, Visits: 386
I am sorry,

I trusted Pinal Dave on this one, without crosschecking MS:
http://blog.sqlauthority.com/2011/02/15/sql-server-lck_m_xxx-wait-type-day-15-of-28/

who wrote
"LCK_M_SCH_S - Occurs when a task is waiting to acquire a Schema Share lock."

an correctly it's
SCH_S <=> Schema stability
SCH_M <=> Schema modification
Post #1387894
Posted Thursday, November 22, 2012 7:52 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 1:39 PM
Points: 312, Visits: 1,102
Arthur Kirchner (11/22/2012)
I am sorry,

I trusted Pinal Dave on this one, without crosschecking MS:
http://blog.sqlauthority.com/2011/02/15/sql-server-lck_m_xxx-wait-type-day-15-of-28/

who wrote
"LCK_M_SCH_S - Occurs when a task is waiting to acquire a Schema Share lock."

an correctly it's
SCH_S <=> Schema stability
SCH_M <=> Schema modification


Hi Arthur,

The reason I wrote this script is hopefully clearify the meaning of the wait stats as it can be quite confussing. So I just looked at Microsoft for answers but they too have has some errors in their discriptions too. So you (and Dave) could be right. If you find more information on this, please let me know as I want this script to help DBAs not confuse them.

Really don't understand why this topic has to be so confusing.

Big thanks!

Rudy



Post #1387905
Posted Thursday, November 22, 2012 10:24 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, June 5, 2014 12:21 PM
Points: 78, Visits: 193
I'm not in the same league with you guys as far as what this all means. I apologize for any dumb questions, but is this reporting CURRENT activities or is it a history? If a history, over what time period?







Wallace Houston
Sunnyland Farms, Inc.

"We must endeavor to persevere."
Post #1387948
Posted Thursday, November 22, 2012 10:33 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 1:39 PM
Points: 312, Visits: 1,102
Caruncles (11/22/2012)
I'm not in the same league with you guys as far as what this all means. I apologize for any dumb questions, but is this reporting CURRENT activities or is it a history? If a history, over what time period?


Hey no apologies required!! We are all here to learn and help when we can :)

As for reporting (current or historial), see below as per Microsoft (http://msdn.microsoft.com/en-us/library/ms179984(v=sql.105).aspx)

"Returns information about all the waits encountered by threads that executed. You can use this aggregated view to diagnose performance issues with SQL Server and also with specific queries and batches"

But threads had to have executed so in a sense it is historical.

Hope this help,

Rudy

PS. Please continue to ask question regardless as we all learn from them :)



Post #1387951
« Prev Topic | Next Topic »

Add to briefcase 1234»»»

Permissions Expand / Collapse