December 5, 2002 at 12:27 am
I'm sure this has been answered before but I can't find anything on the forums..
Simple question: How can I tell if a view has been modified with enterprise manager? I don't want to take away developers rights from being able to create views but I need some way of knowing when a view has changed.
any ideas?
December 5, 2002 at 5:29 am
The crdate tells you when it was created and the schema_ver increments every time a change is made. You would need to hold this information somewhere and check if it changes.
You hoever won't be able to tell how the change was made.
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
http://www.amazon.co.uk/exec/obidos/ASIN/1904347088
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
December 5, 2002 at 7:01 am
This is another slight flaw in SQL Server, no "modified" date. You have to rely on discipline to track when changes are made. Personally, I script the data base using EM every night and archive it. It's a manual process but at least I have a record of when something changed.
December 5, 2002 at 7:05 am
I use the method of keeping track of the last crdate and schema_ver to identify when things are changed.
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples
Gregory A. Larsen, MVP
December 5, 2002 at 9:22 am
I created a table and altered a column. The resulting schema_ver value is 16. All subsequent changes incremented the value by 16. Can I assume that is the "marker" for changes?
Be great!
Michael
Be great!
Michael
December 5, 2002 at 9:28 am
What about when the base_schema_ver is higher than schema_ver?
Be great!
Michael
Be great!
Michael
December 5, 2002 at 9:30 am
What about when the base_schema_ver is higher than schema_ver?
Be great!
Michael
Be great!
Michael
December 5, 2002 at 9:48 am
Note that when you delete and recreate a object the schema_ver gets reset to 0 and then starts incrementing again with every change.
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples
Gregory A. Larsen, MVP
December 5, 2002 at 9:52 am
Not exactly sure that base_schema_ver is. Since BOL says it is reserved for internal use, I guess I might not consider using it, since it use might change. Of course I guess this might also be true for other system table columns as well.
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples
Gregory A. Larsen, MVP
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply