Collation Informationen feststellen…

--Collation der DB/DBs feststellen:
Select name, compatibility_level, collation_name 
from sys.databases db 
--where db.database_id = DB_ID()


--Collation aller Spalten feststellen (Nur für: char, varchar, ... Nicht für: int, long, datetime, ...)
SELECT TABLE_NAME, COLUMN_NAME, COLLATION_NAME , DATA_TYPE, *
FROM INFORMATION_SCHEMA.COLUMNS 
where COLLATION_NAME is NOT NULL
order by TABLE_NAME asc, ORDINAL_POSITION asc
--3440 Sätze (hier noch die Systemtabellen und u.a.)

Select o.name, c.name, c.collation_name, t.name
from sys.all_objects  o
	INNER JOIN sys.columns c ON o.object_id = c.object_id
	inner join sys.types t ON t.user_type_id = c.user_type_id  
where type = 'U'
	and c.COLLATION_NAME is NOT NULL
order by o.name asc, c.column_id asc
--2770