I want to apply a specific rule when somebody create new column in SQL Server 2016 Enterprise.
For example:
NR_NameColumn = int
IS_Deleted = bit
DT_update = Date
ID_User = int
and etc...
How can I apply it?
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
Sign up to join this communityI want to apply a specific rule when somebody create new column in SQL Server 2016 Enterprise.
For example:
NR_NameColumn = int
IS_Deleted = bit
DT_update = Date
ID_User = int
and etc...
How can I apply it?
Most of that can be accomplished with something such as DDL triggers, but that's heavy handed. Ideally anything such as this would be committed and gone through a code review or have automated tooling search and blame the committer.
There is Policy Based Management but in this case it's a fancy GUI which would end up making DDL triggers behind the scenes, so that's an option if you want a GUI for it.