I am working in a SQL Server 2014 environment where there are multiple databases where the table structure (column names, data types, sizes) matches. However, the indexes do not necessarily match. For instance one database might have a clustered index on table X, but the next database does not, there may be clustered indexes in one and not in the other, non-clustered indexes may exist in one place where all columns are part of the index key columns while other cases have a mix with included columns, etc.
What I am in need of is a script which will allow me to level set indexes, without removing indexes which exist on the "target" database but not in the "template", while minimizing duplicate and overlapping indexes. In lieu of such a script, some suggestions or guidance in creating one would be a viable option.