Assuming you have locate installed/setup:

locate database.inc | grep "database/database.inc" | xargs grep "\$data "

Will output any copies of database.inc that are not patched.

Topics