I've just spent too long trying to upgrade EPiServer CMS 5 to SP2 but kept getting the following error:
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
Turns out the problem was that EPiServerManager was pulling the connection string out of my web.config, but it appears it was ignoring the fact it specified an Integrated/Windows connection and was passing an empty SQL username to the database - hence the empty quote marks above. (cheers for your help Steve!)
Solution: Temporarily change the SQL connection string in the site's web.config to use an SQL username/password, perform the update and change the string back.