T-SQL : find schema modifications which occurred the last day

In SSMS you have the “schema changes history” report. You can have the same (or even more) details from T-SQL. You can use the t-sql statement below in order find schema changes the last day, in a particular database.

SELECT o.name AS OBJECT_NAME,
o.type_desc,
o.create_date,
o.modify_date,

s.name AS schema_name
FROM sys.all_objects o
LEFT OUTER JOIN sys.schemas s
ON ( o.schema_id = s.schema_id)
WHERE create_date > ( GETDATE() - 1) or modify_date > ( GETDATE() - 1);
Share your love