Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to use application from other Country and it needs Sql Server collation in binary Mode only...I have installed sql server 2008 SP1 with default settings and while I run my application it gives me error Message " The Dataase sort order must be "binary" Please run TRANSACT-SQL command sp_helpsort to check the current database short order"

What I have tried:

I tried to uninstall and reinstall SQL Server 2008 SP1 but i couldn't find Collation mode selection while installing...

Kindly help me to change it to "binary" Mode

Thanks
Yasin Sindhi
Posted
Updated 29-Aug-18 10:15am

1 solution

MS Docx: Set or Change the Database Collation[^]

SQL
-- Supported Collations:
--  SELECT * FROM sys.fn_helpcollations()   WHERE name LIKE 'SQL%'

USE [Master]
GO  

ALTER DATABASE [DatabaseName]
  COLLATE SQL_Latin1_General_CP437_BIN2
GO  


Addendum
The above command is at the Database level, and will not affect tables that have already been created. You can use the GUI in SSMS to apply at on a per-column basis via ALTER TABLE
MS DOCs: Set or Change the Column Collation[^]
SQL
ALTER TABLE dbo.MyTable
  ALTER COLUMN
    CharCol  VARCHAR(10)  COLLATE SQL_Latin1_General_CP437_BIN2 NOT NULL;
GO
 
Share this answer
 
v3
Comments
Richard Deeming 30-Aug-18 10:30am    
Probably worth calling attention to the caveat in the documentation:
This statement does not change the collation of the columns in any existing user-defined tables. These can be changed by using the COLLATE clause of ALTER TABLE.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900