Note that the error message speaks of a limit of 249 nonclustered indices or column statistics per table.
If you run ‘sp_statistics’ on the Item table, I suspect you will find that a large number of column statistics have been created for the table, in addition to the defined indexes.
Column statistics can be created automatically by SQL server as part of its query optimization, or someone may have run ‘sp_createstats’ on the database for some reason.
You will probably need to use DROP STATISTICS … to reduce the number of column statistics on the table, in order to add the two new keys.
These “strange” statistics are created when the db option “Auto. Create Statistics” is enabled. I recommend to disable this opion (and “Auto. Update Statistics”) and maintain the statistics by a SQL Server Agent Job, executing this code:
Thanks to all. It appears that statistics get created for fields (columns) automatically when users try to filter on any field. I “dropped” these additional stats and all was well.