tigertoolbox icon indicating copy to clipboard operation
tigertoolbox copied to clipboard

usp_AdaptiveIndexDefrag QUOTENAME(@dbName) issue

Open d-moloney opened this issue 6 years ago • 1 comments

When @DebugMode =1 you have a few commands that contain QUOTENAME(@dbName) which are causing errors Error 911 has occurred while determining row modification counter. Message: Database '[WAREHOUSE_STAGE]' does not exist. Make sure that the name is entered correctly. (Line Number: 1)

The QuoteName is unnecessary because its already quoted when stored in the tbl_AdaptiveIndexDefrag_Stats_Working table

There are 9 occurrences of these that cause problems.

d-moloney avatar Dec 02 '19 14:12 d-moloney

This problem occurs regardless of the @debugmode setting. I ran an extended event to capture errors with @debugmode=0 and the process throws the same Error 911. Back to Ola's solution I guess since this appears to be an ongoing problem.

jgiercyk avatar Jan 03 '20 18:01 jgiercyk