error altering database collation
Assuming that you have full control over the database and can kick everyone out/close all existing process that are connecting to that database, you can use the following statement to force the database into single user mode with you as the only connection, then make your change, then switch it back to multi user.

The T-SQL to do this is:

--Step 1
USE [foo];
GO;

ALTER DATABASE [foo] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
GO;

--Step 2
ALTER DATABASE [foo] COLLATE &lt;&lt;Colation Name&gt;&gt;;
GO;

--Step 3
ALTER DATABASE [foo] SET MULTI_USER;
GO; 


If you want to be nice and identify the processes that are connected to that database first, you can get that information from sys.dm_exec_sessions:

USE [foo];

SELECT 
    session_id
    ,login_name
    ,host_name
    ,program_name
FROM
    sys.dm_exec_sessions
WHERE
    database_id = DB_ID()
    AND session_id != @@SPID;