June 2, 2004 at 9:00 pm
Hi everyone,
I just installed SQL Server 2000 Standard version and during the installation, there was no option for me to pick the type of collation that I'd like to use. Does anyone know how to change the collation after the installation? I guess one should be able to change collation in Analyser Query but I dont know how to do this. Please help anyone.
Thank you
June 2, 2004 at 11:01 pm
Hi,
This is the information provided from BOL:
Collation settings, which include character set, sort order, and other locale-specific settings, are fundamental to the structure of all Microsoft® SQL Server™ 2000 databases. To change one or more of these settings, you must rebuild the master and user databases.
How to rebuild the master database (Rebuild Master utility)
So, if you have not created any user databases, then it is sufficient to rebuild the master database by changing to your required collation preferences. The process for rebuilding the master database is as follows:
To rebuild the master database
Initially, the default collation settings are shown, but these may not match the collation selected during setup. You can select the same settings used during setup or select new collation settings. When done, click OK.
The Rebuild Master utility reinstalls the master database.
Note To continue, you may need to stop a server that is running.
When you rebuild the master database, only the collation of the master database, the model database, and the msdb database is changed. The collation of the user databases is not changed. To change the collation of an existing user database or to create a new database with the appropriate collation, use the ALTER DATABASE command, and then use DTS or the bcp utility to transfer the data to the new database.
Note If you use the ALTER DATABASE command in SQL Server 2000 to change the collation of a database, the collation of the columns in the tables is not automatically changed. To change the collation of the columns, use the ALTER TABLE command and the ALTER COLUMN command. If you are using DTS, you can create the table and the columns with the appropriate collation before you transfer the data or you can use the Use Collation option. If you are using DTS and the table with the appropriate collation already exists, make sure to disable the Drop Existing Objects First option before you run the package.
Hope this suffices your requirement to change the collation.
Lucky
June 4, 2004 at 1:07 am
Just for future reference, when you install SQL Server 2000 you must choose "custom installation" to be able to choose a collation.
As Lucky has posted, you can either rebuild master, specify the collation when you create database/tables or completely reinstall. My preference is to reinstall as I've had problems trying to rebuild master in the past (and it's more fiddling around than a reinstall if you have nothing on your server yet).
If you specify the collation when you create a database or a table, you must be careful when using tempdb (such as temp tables) as tempdb will use the default server collation and you may recieve an error.
Cheers,
Angela
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply