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

Get Top Queries Taxing SQL Server CPUs Expand / Collapse
Author
Message
Posted Monday, March 12, 2012 9:15 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, July 21, 2014 11:32 AM
Points: 372, Visits: 414
Comments posted to this topic are about the item Get Top Queries Taxing SQL Server CPUs

Prakash Heda
Lead DBA Team - www.sqlfeatures.com
Video sessions on Performance Tuning and SQL 2012 HA
Post #1265292
Posted Monday, March 12, 2012 11:54 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Yesterday @ 1:56 AM
Points: 1, Visits: 202
Hello Prakash,

Hope this reply finds you well...
Thank you very much for the post, by the way I am getting below error.
Please help me out to correct the same........
Is ther any setting from my SQL Server SMO to be done ?

Msg 102, Level 15, State 1, Line 14
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 37
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Line 49
Incorrect syntax near ' '.
Post #1265702
Posted Tuesday, March 13, 2012 3:24 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, July 21, 2014 11:32 AM
Points: 372, Visits: 414
What is the version of SQL server you are using?

Try commenting the "queryexecuted" column code and run same

Check this article for how to use this script:


Prakash
www.sqlfeatures.com


Prakash Heda
Lead DBA Team - www.sqlfeatures.com
Video sessions on Performance Tuning and SQL 2012 HA
Post #1265767
Posted Tuesday, March 13, 2012 3:29 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, July 21, 2014 11:32 AM
Points: 372, Visits: 414
Also update declare variable part like below:

declare @ServerTime datetime , @ConvertMiliSeconds bigint
, @FilterMoreThanMiliSeconds bigint
, @FilterHours bigint, @execution_count bigint
, @debugFlg bit
select @ServerTime = getdate(),@ConvertMiliSeconds = 1000
,@FilterMoreThanMiliSeconds = 1,@FilterHours = 2
,@execution_count = 2,@debugFlg bit = 0


Prakash Heda
Lead DBA Team - www.sqlfeatures.com
Video sessions on Performance Tuning and SQL 2012 HA
Post #1265773
Posted Tuesday, March 13, 2012 5:42 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, July 21, 2014 11:32 AM
Points: 372, Visits: 414
I was able to reproduce the issue

Seems when one copy the code and run it, it has special character get added due to HTML, invisible though but in windows 2003 notepad and SQL 2012 SSMS editor I was able to see and replace it and than it works, not able to see that character in win7 notepad though.

let me know if you this doesn't work...


Prakash Heda
Lead DBA Team - www.sqlfeatures.com
Video sessions on Performance Tuning and SQL 2012 HA
Post #1266425
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse