Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

DBCC Checkdb with MAX_DOP > 1 using Resource Governer?

Hi experts,

   Someone taught me a technique to run checkdb with MAX_DOP > 1 using resource governer. I  tried it but failed. what's wrong?

---

CREATE RESOURCE POOL [zCHECKDB] WITH(min_cpu_percent=0,

                    max_cpu_percent=100,

                    min_memory_percent=0,

                    max_memory_percent=100,

                    AFFINITY SCHEDULER = AUTO

)

GO

CREATE WORKLOAD GROUP [ZCHECKDB] WITH(group_max_requests=0,

                    importance=Medium,

                    request_max_cpu_time_sec=0,

                    request_max_memory_grant_percent=25,

                    request_memory_grant_timeout_sec=0,

                    max_dop=16) USING [zCHECKDB]

GO

CREATE FUNCTION dbo.classify_zCHECKDB() RETURNS sysname

WITH SCHEMABINDING AS

BEGIN

    DECLARE @grp_name sysname

      IF (APP_NAME() LIKE '%Studio%')

          SET @grp_name = 'zCHECKDB'

    RETURN @grp_name

END;

GO

ALTER RESOURCE GOVERNOR WITH (CLASSIFIER_FUNCTION= dbo.classify_zCHECKDB);

GO

ALTER RESOURCE GOVERNOR RECONFIGURE;

GO

dbcc checkdb('TCD')

---

Not what you were looking for? View more on this topic or Ask a question