Collation Setting Changes

  • Hi

    How to change the collation setting in SQL 2005 server from SQL_Latin1_General_CP850_Bin2 instead of the default server collation SQL_Latin1_General_CP1_CI_AS.

    Please let me know the procedure

    Balavenkatesh

  • The best and safest way is to reinstalling the SQL Server with required collation.

    other step:( FROM MSDN)

    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:

    start /wait setup.exe /qb INSTANCENAME=MSSQLSERVER REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD=test SQLCOLLATION=SQL_Latin1_General_CP1_CI_AI

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

    >>Import all your data.

    "More Green More Oxygen !! Plant a tree today"

  • I recomend the bulk copy out of the data. I had to do this to all our dbs (30+) and tried various methods this was the quickest by a long way once you fine tune it in test it can be a pretty automated task

  • All the above suggestions are assuming you've already installed SQL Server with the wrong collation.

    If you haven't installed it yet, you can change the collation during the install process (assuming you're not using unattended install packages). It actually comes up with a box during install that asks you for all sorts of details, including collation, but you have to watch carefully and not inadvertantly click past it before you've had a chance to change the collation.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • if you have already instsalled SQL, you can change the collation using setup. See BOL under 'how to install sql server 2005 from the command prompt' then section 'To rebuild system databases and specify a new system collation'

    You will then need to re-apply any upgrades you previously had.

    old backups of the system databases will no longer be restorable so script out any logins etc from master.

    have everything backed up\scripted out before you start

    ---------------------------------------------------------------------

  • ALTER DATABASE YourDatabaseName COLLATE SQL_Latin1_General_CP1_CI_AS

    Mehmet GÜZEL

    www.mehmetguzel.net

    MS SQL Server DBA
    www.mehmetguzel.net

  • Yes, as the previous poster just pointed out, in SQL 2005 the Collation can be set at the database and column level as well.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply