Nice tip, but two things come to mind:
- sys.traces is marked for deprecation
- I believe this would return values as long as the necessary information is available in the default trace. Once the default trace overflows and the information is overwritten, this query would no longer yield the required resutls
The safe approach here would be to have DDL triggers defined on objects of interest.
commented on Jun 7 2012 1:39PM