martes, 7 de julio de 2009

Change collation for SQL 2008 Instance

In order to change the Default Engine Collation in SQL Server 2008 you will need to stop the (ALL) MSSQL Server instance(s) and execute the following command from the SQL Server setup media:

setup.exe /q /ACTION=RebuildDatabase /INSTANCENAME=MSSQLSERVER /SAPWD="" /SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS" /SqlCollation=Latin1_General_CI_AI
Bear in mind that by using the above command you are to all intents erasing and recreating your SQL Servers MASTER database, you will invalidate an previous MASTER backups (as they will contain the previous Collation Settings) and the major knock on effect is that your Current Login and Security configuration will also disappear couple that with the fact your existing Databases will be detached from the server. There are other issues such as backup stats being lost – so be VERY careful when using the above command.

No hay comentarios:

Publicar un comentario