I have a situation where a client is using software that writes to a SQL table. The program has been running fine with no issues prior to today.
Today, they began receiving errors inserting NULL into the ID field. Upon going in and looking at the tables, the column "ID" which is an identity field, was set to 'NO' for "is identity".
My question is, how could this change on its own? As far as the client and I am aware, nothing has been changed recently that would cause this.
Could this happen for another reason without manually going in and changing it?
ALTER TABLE dbo.SomeTable ALTER COLUMN [ID] bigint not null
will actually blow away the identity property of the column. Any chance this is 2008R2? Anything in the schema changes history report regarding that table (assuming the def trace hasn't rolled)? – Kris Gruttemeyer Nov 13 '18 at 21:27create_date
andmodify_date
onsys.objects
for the affected table. Just a shot in the dark, but I'd guess someone recreated the table (incorrectly) or altered the column (incorrectly). – AMtwo Nov 13 '18 at 22:02