|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 2:20 PM
Points: 306,
Visits: 1,014
|
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Today @ 7:56 AM
Points: 15,
Visits: 137
|
|
Hi Rudy, excelent script!
but, you have a little bug at the en of the second comment... /* instead */ ;P
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 2:20 PM
Points: 306,
Visits: 1,014
|
|
Thanks for the comments! :)
Could please tell me where the problem is? i don't see the problem.
Thanks,
Rudy
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 2:20 PM
Points: 306,
Visits: 1,014
|
|
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
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Today @ 8:16 AM
Points: 105,
Visits: 320
|
|
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.
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 2:20 PM
Points: 306,
Visits: 1,014
|
|
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
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Today @ 8:16 AM
Points: 105,
Visits: 320
|
|
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
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 2:20 PM
Points: 306,
Visits: 1,014
|
|
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
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Friday, May 03, 2013 2:29 PM
Points: 55,
Visits: 150
|
|
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."
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 2:20 PM
Points: 306,
Visits: 1,014
|
|
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 :)
|
|
|
|