Q

Problem attaching databases because of different sort orders

This Content Component encountered an error
I am facing a problem of attaching a database from another SQL Server to my SQL Server using the stored procedure sp_attach_db in the SQL query analizer:
 sp_attach_db 'metal' , 'c:mssql7datametal_Data.MDF','c:mssql7datametal_log.lDF'
But when I execute the above procedure, I recieve the message below.
 Server: Msg 1816, Level 16, State 1, Line 1 Could not attach the database because the character set, sort order, or Unicode collation for the database differs from this server. Server: Msg 1816, Level 16, State 1, Line 1 Could not attach the database because the character set, sort order, or Unicode collation for the database differs from this server. Warning: sort order 52 in database differs from server sort order of 146. Warning: sort order 52 in database differs from server sort order of 146.
I don't know why. Please advise.

Under SQL Server 7.0 all databases must have the same sort order as that which you selected when you installed it. And it appears your servers have been installed with different sort orders. To check use sp_helpsort on each server. To fix you may need to script the objects and transform the data from server to server using DTS.

This has changed in SQL Server 2000 and now databases can have differing sort orders.

 

For More Information

This was first published in September 2002

Dig deeper on Microsoft SQL Server Installation

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchBusinessAnalytics

SearchDataCenter

SearchDataManagement

SearchAWS

SearchOracle

SearchContentManagement

SearchWindowsServer

Close