Sql-server – Best way to automatically reset sequence/identity once a year

sql server

I need to have a identity/sequence/counter of some sort reset annually. What is the best way of doing this automatically (i.e. I don't want the front end application calling a stored procedure or executing SQL to do this).

If it matters the database will be at least SQL Sever 2012.

I will probably be using an identity column, but if there is a better way to do it with sequences instead, I am certainly open to that.

Best Answer

You could make a SQL Agent Job to use DBCC CHECKIDENT with the RESEED option at the right moment.