Summary
This article describes how to change collation settings in SQL Server 2005/2008.
International deployments may use collations that are not compatible with the standard U.S. collation (SQL_Latin1_General_CP1_CI_AS).
Solution
Follow this steps to update an existing database to the desired collation.
STEP 1 - Perform a full backup of the database
- Log in to the SQL Server host using an administrator account (if required).
- Open SQL Server Management Studio (SSMS).
- Connect to SQL Server using a login with sysadmin privileges.
- Expand Databases, then right-click the target database.
- Select Tasks > Back Up...
- Set Backup Type to Full.
- Select or add the backup destination (the .bak file path).
- Click OK to start the backup.
- Verify that the backup completed successfully and confirm that the .bak file exists.
STEP 2 - Finding the current collation settings
Use the steps below to view the current collation settings in SQL Server:
- Open SQL Server Management Studio (SSMS) and connect to the server using the sa account.
- Open a new query window.
- Copy and run the following SQL query:
SELECT CONVERT(char, SERVERPROPERTY('collation'))List available collation settings
To view all available collation settings in SQL Server, run the following query:
SELECT * FROM ::fn_helpcollations()To find collations that match specific regional or language requirements, you can filter the results. For example, to find Korean collations that are case-insensitive and accent-sensitive, use:
SELECT * FROM ::fn_helpcollations() WHERE name LIKE '%Korean%' AND name LIKE '%CI%AS%';
STEP 3 - How to execute AlterCollations.exe
- Locate and double-click the AlterCollations.exe file.
- In the Server field, enter the SQL Server instance name.
- In the Database field, enter the database name (for example, skfuser, if different).
- In the Collation field, enter the desired collation setting.
- Click Script Only to generate the SQL script for changing the database collation (see Figure 2).
Figure 1 - Change collation
Figure 2 - Change collation - result box
-
Click in the results pane and copy all content using the following shortcuts:
Ctrl + A – Select all
Ctrl + C – Copy to clipboard
Figure 3 - Select and copy all contents
STEP 4 - How to implement a new collation on the Analyst Database (AlterCollations.exe)
- Close AlterCollations.exe.
- Open SQL Server Management Studio (SSMS).
- Close all existing connections, including any open query windows.
- Connect using the SA (admin) account.
- Click New Query to open a new SQL query window.
- Paste the generated script (see Figure 4).
Figure 4 - Paste all contents
STEP 5 - Modify the database mode from multi-user to single user
- Right-click the skfuser database (see Figure 5) and select Properties.
- In the Database Properties window, select Options from the left panel.
Figure 5 - skfuser DB
- Under the Options list in the right panel, locate.Restrict Access and set it to SINGLE_USER (see Figure 6).
- Click Execute to apply the change.
- Do not interrupt the process until it is complete.
Figure 6 - Database properties
Process Explanation
The generated script performs the following steps in sequence:
- Switches the database to single-user mode.
- Disables all triggers.
- Drops existing constraints.
- Drops indexes.
- Updates the database to the selected collation.
- Alters database columns to DATABASE_DEFAULT, so they inherit the new collation.
- Recreates the indexes.
- Recreates the constraints.
- Re-enables the triggers.
- Sets the database back to multi-user mode.
Contacting SKF Technical Support Group
For further assistance please open a support case using the Technical Support group's self-help portal at www.skf.com/cm/tsg. Once your support case is submitted, a technician will contact you to begin working on your issue. For urgent issues we are available at these times by phone:
- Monday through Friday, 5:00 a.m. to 4 p.m. Pacific Time -
Phone: +1 800 523 7514 within the US or +1 858 496 3627 outside the US. - Monday through Friday, 8:00 a.m. to 4:00 p.m. Central European Time -
Phone: +46 31 337 65 00. - Monday through Friday, 7:30 a.m. to 4:30 p.m. India Standard Time -
Phone: +60 16 699 9506.
Comments
0 comments
Please sign in to leave a comment.