TSQL to print the content/inside of stored proc, definition of view and tables?
-
hello TSQL to print the content/inside of stored proc, definition of view and tables? The idea is to automate detection of any changes to stored proc or view/table schema. Thanks
dev
Uhm it's called source control and there are a vast number of systems built to meet this need. And they almost all cost money. Otherwise you can look into the system tables and possibly the schema views, all the procedure scripts are in there. You can write then out or copy them to another table where you could simply do a != comparison on the relevant fields.
Never underestimate the power of human stupidity RAH
-
hello TSQL to print the content/inside of stored proc, definition of view and tables? The idea is to automate detection of any changes to stored proc or view/table schema. Thanks
dev
You may use 1.
information_schema.columns
for columns 2.information_schema.tables
for tables 3.sp_helptext 'sp_procedurename'
for SP Text