We recently moved our database from our SQL Server 2005 server to our SQL Server 2008 server. Everything moved over fine, however now we are finding that we are getting col
Further to Owais Iqbal's answer rewritten the code by edosoft and put it in a loop to execute the actual T-SQL statements, you can grab the default collation from the database
-- **************** BEGIN INPUT **********************
USE [YourDBName]
-- **************** END INPUT ************************
-- **************** BEGIN GET DB COLLATION ***********
DECLARE @collation NVARCHAR(128)
SELECT @collation = collation_name
FROM sys.databases WHERE database_id = DB_ID()
PRINT 'Default database collation: ' + @collation
PRINT ''
-- **************** END GET DB COLLATION *************
-- **************** BEGIN LOGIC **********************