• to apply this script to every database on the server try using this and modify the script as appropriate:

    http://www.sqlservercentral.com/scripts/Metadata/65453/