Schema Version Control | Database Journal

Schema Version Control

Written By
Tanya Stolyar
Tanya Stolyar
Aug 25, 2000
1 minute read

As a DBA you want to know when database schema has been changed:
a table has been altered,
a new table has been created or
a table has been deleted

The usp_dba_schema_ver_cntrl stored procedure will send e-mail if these schema
changes occurred. The best way to run it is through a scheduled job that will run regularly
once every night. Please replace recipients string with the semicolon-separated list
of the recipients of the mail.

This stored procedure checks the schema_ver and crdate columns in the system table
sysobjects. According to the BOL, the schema_ver value gets incremented every time the schema
for a table changes. The crdate column stores the date when a table been created. Checking
the crdate value prevents anyone from dropping and recreating a table with the same name but
different schema.

Download usp_dba_schema_ver_cntrl

Database Journal Logo

DatabaseJournal.com publishes relevant, up-to-date and pragmatic articles on the use of database hardware and management tools and serves as a forum for professional knowledge about proprietary, open source and cloud-based databases--foundational technology for all IT systems. We publish insightful articles about new products, best practices and trends; readers help each other out on various database questions and problems. Database management systems (DBMS) and database security processes are also key areas of focus at DatabaseJournal.com.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.