Thursday, April 8, 2010

How to Change Collation of SQL Server?

For this you need to rebuild your master db and you will lose all user databases so before that backup every thing.

 

Run following command on command prompt:

 

start /wait \\172.19.19.6\"sql dump on 10.105.98.68"\"SQL 2005 64bit CD1"\setup.exe /qn INSTANCENAME=MSSQLSERVER REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD=XXXXXX SQLCOLLATION=SQL_Latin1_General_CP1_CI_AS

 

 

Where

\\172.19.19.6\"sql dump on 10.105.98.68"\"SQL 2005 64bit CD1”\  === Path of SQL Server Setup

INSTANCENAME= Name of SQL instance for default instance use MSSQLSERVER

SAPWD= Password for sa login

SQLCOLLATION= desiered collation needs to get set.

 

Note:

Before running this backup all your user database and also generate the scripts for all objects and save the data of tables in CSV.

After running command restore the user dbs and alter their collation.

 

No comments:

Post a Comment