tigertoolbox
tigertoolbox copied to clipboard
Error 515 has occurred. Message: Cannot insert the value NULL into column 'objectID',
I am getting errors on a few database servers. Error 515 has occurred. Message: Cannot insert the value NULL into column 'objectID', table 'Tools.dbo.tbl_AdaptiveIndexDefrag_Stats_log'; column does not allow nulls. INSERT fails. (Line Number: 2446)
i am running EXECUTE [dbo].[usp_AdaptiveIndexDefrag] @ignoreDropObj = 1 I also get the error just running EXECUTE [dbo].[usp_AdaptiveIndexDefrag]
Which version, edition and build of SQL Server is this? https://github.com/Microsoft/tigertoolbox/issues/76 seems to be the same issue.
Hi, I don't know if it can help, but I got this kind of issue when a first execution failed, ie when the user hasn't permission to access a sys object. In this case, some lines stayed in tbl_AdaptiveIndexDefrag_Working, and if I try to launch again de program with the good user, I got this error : Error 515 has occurred. Message: Cannot insert the value NULL into column 'statsID', table 'dbo.tbl_AdaptiveIndexDefrag_Stats_log'; column does not allow nulls. INSERT fails. (Line Number: 2158)
Same message but different column. To solve it, I just truncated tbl_AdaptiveIndexDefrag_Working, and execute the program and it works fine.
Regards,
When such happens, given I couldn't repro, a database backup, if shareable, helps to debug. I can provide a secure upload in case you are allowed to share for the purpose of debugging.