Incorrect Collation

Top  Previous  Next
Solution Installation > TSS Installation > Install TSS on a standard server > Troubleshoot > Microsoft SQL Server

Introduction

 

If SQL server has not been installed with correct collation (Latin1_General_CS_AS), user will experience serious problems to insert/update data. This will also damage integrity of database.

 

Following exception can be encountered on TSS/Console application:

•IptradeNet.Core.Dal.DalDuplicateKeyException

•Violation of PRIMARY KEY constraint 'PK_TABLE. Cannot insert duplicate key in object 'dbo.TABLE '.

 

Requirement

Make sure to back up your database before doing this procedure.

 

 

Resolution

 

a. Reinstall server with correct collation

To resolve this use following procedure (pre-requirement wants you have done database backup before upgrading your TSS/Console application version):

Uninstall TSS/Console

Uninstall SQL Server

Reinstall SQL Server with correct collation (Latin1_General_CS_AS)

Reinstall TSS/Console

 

b. Change server collation

Another solution could be to change collation in live without uninstall SQL Server – TSS/Console still need to be reinstall.

Try following procedure: http://technet.microsoft.com/en-us/library/ms179254.aspx

 

c. Change database collation

alter database [dbname] collate Latin1_General_CS_AS