Prompt Cannot Insert Duplicate Key in Object 'TrailServiceType' in Logs

Publication Date:  2012-07-27 Views:  141 Downloads:  0
Issue Description
Database initialization fails. Check the logs in the C:\HWENGR\logs\logsServer directory and the following message is found:
2008-04-02_18:20:11(CServerConfig.RunCommand)  ERROR:Execute command failed
2008-04-02_18:20:11(CServerConfig.RunCommand)  ERROR:java.lang.Exception: MSSQL bcp executes failed
2008-04-02_18:20:11(CServerConfig.LoadDataTable) ERROR:Load data to VSMDB.TrailServiceType from D:\VSM\server\database/staticdata/chinese\TrailServiceType.dat failed
2008-04-02_18:20:11(CServerConfig.LoadDataTable) ERROR:java.lang.Exception: Failed to import the static data.
2008-04-02_18:20:11(CServerConfigManagement.loadAllStaticDatatable)  ERROR:load static data failed
2008-04-02_18:20:11(CServerConfigManagement.loadAllStaticDatatable)  ERROR:java.lang.Exception: Failed to import the static data .
2008-04-02_18:20:11(CServerConfigManagement.InitializeDatabase) ERROR:Initialize database failed
2008-04-02_18:20:11(CServerConfigManagement.InitializeDatabase) ERROR:java.lang.Exception: Failed to import the static data.
2008-04-02_18:20:11(CServerConfigManagement.InitializeDatabase) ERROR:Error Message is Starting copy...
SQLState = 23000, NativeError = 2627
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Violation of UNIQUE KEY constraint 'UQ__TrailServiceType__114A936A'. Cannot insert duplicate key in object 'TrailServiceType'.
SQLState = 01000, NativeError = 3621
Warning = [Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.

BCP copy in failed
Alarm Information
None.
Handling Process
 Step 1     Run the following commands according to the command prompts:> isql -Usa -Psa's_password -SDBSVR
1> sp_helpsort
2> go
The terminal displays:
Unicode 3.1 UTF-8 Character Set

If UTF-8 is displayed, it indicates that the character set used by the database is Chinese. Otherwise, the database needs to be installed again.
Step 2     Initialize the database again.
Root Cause
The character set used by the Microsoft SQL server database is not Chinese, while that used by the VSM is Chinese.
Suggestions
 None.

END