I have very interesting collation problem. If my database is not the same collation as the server, when I try to create a temporary stored procedure, I get 'Cannot resolve collation conflict for equal to operation' error when compare stored procedure parameters to constants. Below is a sample script that produces the error. If I remove the database collation override or create not temporary stored procedure, the error is not produced.USE masterCREATE DATABASE coll_test COLLATE Japanese_CS_ASGOUSE coll_testCREATE TABLE tab_test (fid INT, fvar1 varchar(255), fvar2 nvarchar(255))INSERT INTO tab_test values (1, 'Test 1', N'Unicode Test 1')INSERT INTO tab_test values (2, 'Test 2', N'Unicode Test 2')INSERT INTO tab_test values (3, 'Test 3', N'Unicode Test 3')INSERT INTO tab_test values (4, 'Test 4', N'Unicode Test 4')INSERT INTO tab_test values (5, 'Test 5', N'Unicode Test 5')GOCREATE PROCEDURE tempdb..proc_test @Param1 varchar(255) = '', @Param2 nvarchar(255) = N''ASSELECT * FROM tab_test WHERE (@Param1='' OR fvar1 = @Param1) AND (@Param2=N'' OR fvar2 = @Param2)GOEXEC #proc_testDROP PROCEDURE #proc_testGOUSE masterDROP DATABASE coll_test