• Dear its nice article, but I face One issue here.

    When I run proc_FilltblIndexUsageInfo sp then I get following error.

    Msg 8134, Level 16, State 1, Procedure proc_FilltblIndexUsageInfo, Line 5

    Divide by zero error encountered.

    The statement has been terminated.

    I thing this message is generated against Statement

    Cast(

    (user_seeks+user_scans+user_lookups+user_updates)/

    dbo.Uf_GetindexSize(si.index_id,so.object_id) As decimal(10,2))

    As IndexUsagetoSizeRatio.

    Please review the Code because I cant Proceeded further unless this error is removed.

    Thanks

    Azhar Iqbal