SQL Server 2008 r2 high cpu usage

We running a photo sharing website in Windows Server 2008 r2 ent edition & SQL Server 2008 r2 ent edition. Server configuration is xeon 5620 with 48GB RAM & 4 x 450GB 15k Scsi Hdd's.

we have about minimum 50 and max 500 active connections on DB as per last month average. Now also the average is same. 1 Month back our sql server cpu usage is less then 1% but now it's using minimum 25% and upto 100% always. This problem we are facing from last 8 days. From this last 8 days anwards our CPU usage is increasing always when we start SQL Service & when we stop it's normal only. I request you can any one tell me how to solve this problem.

Answers


agreed with TomTom, you have to get to the bottom of it. Good guess is lack/inaccurate indexing, it very often results with high CPU w/o high number of sessions. Check the information in your DMV's ( be careful though, they're just hints from SQL engine, should be analyzed by a trained professional ) :

SELECT
  migs.avg_total_user_cost * (migs.avg_user_impact / 100.0) * (migs.user_seeks + migs.user_scans) AS improvement_measure,
  'CREATE INDEX [missing_index_' + CONVERT (varchar, mig.index_group_handle) + '_' + CONVERT (varchar, mid.index_handle)
  + '_' + LEFT (PARSENAME(mid.statement, 1), 32) + ']'
  + ' ON ' + mid.statement
  + ' (' + ISNULL (mid.equality_columns,'')
    + CASE WHEN mid.equality_columns IS NOT NULL AND mid.inequality_columns IS NOT NULL THEN ',' ELSE '' END
    + ISNULL (mid.inequality_columns, '')
  + ')'
  + ISNULL (' INCLUDE (' + mid.included_columns + ')', '') AS create_index_statement,
  migs.*, mid.database_id, mid.[object_id]
FROM sys.dm_db_missing_index_groups mig
INNER JOIN sys.dm_db_missing_index_group_stats migs ON migs.group_handle = mig.index_group_handle
INNER JOIN sys.dm_db_missing_index_details mid ON mig.index_handle = mid.index_handle
WHERE migs.avg_total_user_cost * (migs.avg_user_impact / 100.0) * (migs.user_seeks + migs.user_scans) > 10
ORDER BY migs.avg_total_user_cost * migs.avg_user_impact * (migs.user_seeks + migs.user_scans) DESC

Need Your Help

TextFieldParser with not parsing last line

c# asp.net sql csv

I am importing .csv file in my sql database. I am using TextFieldParser.

Netbeans re produce Makefile when change options in c/c++ developing

c++ netbeans makefile netbeans6.7 netbeans-plugins

I create new c/c++ project in Netbeans and change Makefile and add -lpthread for work with pthread and run my project .also I need to add some runtime argument from project properties/Run/Arguments .