I suspect tracking is the most reliable option. Some things (like LINQ-to-SQL) let you log queries, but of course not all. But you have more security that the trail will catch everyone.
Note that "minor differences in syntax" will be very painful to compare, of course
source
to share