x

Change default Server Collation - 2005

I have an instance where the default collation is set to Latin1_General_CI_AS, but the user databases are set to SQL_Latin1_General_CPI_CI_AS.

I need to change the default/server collation to SQL_Latin1_General_CPI_CI_AS as well (i.e. same as the user databases) - what's the best way to do this?

more ▼

asked Dec 17, 2009 at 10:14 AM in Default

avatar image

Paul S
21 1 1 3

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

To change the server default you need to rebuild the master db (gulp). If you feel brave enough then here are the steps (from BOL):

Changing the default collation for an instance of SQL Server can be a complex operation and involves the following steps:

  • Make sure you have all the information or scripts needed to re-create your user databases and all the objects in them.

  • Export all your data using a tool such as bulk copy.

  • Drop all the user databases.

  • Rebuild the master database specifying the new collation in the SQLCOLLATION property of the setup command. For example:

    setup.exe /q /ACTION=RebuildDatabase /INSTANCENAME=MSSQLSERVER /SAPWD="sa-pwd" /SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS" /SqlCollation=SQL_Latin1_General_CP1_CI_AI

  • Create all the databases and all the objects in them.

  • Import all your data.

  • Then followed by this, which may be less painful....

    Note:
    Instead of changing the default collation of an instance of SQL Server, you can specify a default collation for each new database you create.

    more ▼

    answered Dec 17, 2009 at 10:24 AM

    avatar image

    Kev Riley ♦♦
    64.2k 48 62 81

    (comments are locked)
    10|1200 characters needed characters left

    There is also a discussion about this in the Forums on SQLServerCentral:

    How to change SQL Server Collation

    more ▼

    answered Dec 17, 2009 at 10:28 AM

    avatar image

    Pavel Pawlowski
    22.7k 10 15 26

    (comments are locked)
    10|1200 characters needed characters left
    Your answer
    toggle preview:

    Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

    Follow this question

    By Email:

    Once you sign in you will be able to subscribe for any updates here

    By RSS:

    Answers

    Answers and Comments

    SQL Server Central

    Need long-form SQL discussion? SQLserverCentral.com is the place.

    Topics:

    x24

    asked: Dec 17, 2009 at 10:14 AM

    Seen: 2257 times

    Last Updated: Dec 17, 2009 at 10:14 AM

    Copyright 2016 Redgate Software. Privacy Policy