Solved

Sort order in SQL-server 7

Posted on 2000-04-10
10
238 Views
Last Modified: 2008-03-03
How do I change the sort order in SQL-SERVER 7.0? I want to have the Scandinavian sort order where the extended characters (Ø, Å, Ä, and Ö) are sorted after Z.
0
Comment
Question by:polksolk
  • 5
  • 3
  • 2
10 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2699437
You can't change this setting, you need to reinstall SQL Server.
In order to maintain your data, you need to do the following:
1) Backup Your databases
2) Re-Install SQL Server (using binary sort order)
3) Restore Your Databases
4) Backup Your Databases
5) Re-Install SQL Server (using scandinavian Sort order)
6) Restore Your Databases

Steps 2-4 can be done on another server.
Hope this helps
0
 

Author Comment

by:polksolk
ID: 2699522
I suspected that. But before I do this I´d like to know when and where I specify the sort order so I don´t end up doing this in vain.
0
 
LVL 7

Expert Comment

by:simonsabin
ID: 2699543
I will be amazed if that works.

Backups are sort order dependant. and so a backup on one sort order cannot be restored to another.

The standard practice is BCP the data out and then Re-Install the server using the required sort order and then BCP the data back in.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2699572
simonsabin: check up your doc, it says you can restore a database if either the backup or the server a in BINARY sort order (wink)
BTW, I got already point for another question in EE with exactly this problem (smile)
0
 
LVL 7

Expert Comment

by:simonsabin
ID: 2699585
Well you learn something every day.

Everywhere I have read says you need to go the BCP route. I suppose its probably quicker?

1 ALL
:)
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2699604
It IS quicker, but you need to script the BCP and you shouldn't forget a table (grin).
On the other hand, you need to create the databases, tables, views, sp, users, rules, defaults.... in any case, so the backup/restore procedure is much safer...
BCP then is creating a bulk of files, whereas the Backup/restore only procudes one file, which may be handled easier.
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 50 total points
ID: 2699619
polksolk:
This settings is asked you during setup or SQL Server, one of the Wizard forms ask you to specify SortOrder, CodePage ...
Again, this setting has to be chosen carefully, as you can't change it without reinstalling SQL Server
BTW, AFTER reinstalling SQL Server, don't forget to review all your server-side settings like auditing, sqlmail, dtc, security, thus reviewing these items BEFORE uninstalling SQL Server.
0
 

Author Comment

by:polksolk
ID: 2700433
I couldn´t attach the database after I re-installed the SQL-server because the database and the server had different sort order. Luckily I had a backup on MSDE from which I could import the database instead.

Are you absolutely sure you can't change sort order without reinstall SQL-server?

0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2700586
sure.
But it may be that some SQL Server developer/hacker knows how to change it, but there will be problems for your indexes that will be corrupt or at least invalid after that operation.
0
 
LVL 7

Expert Comment

by:simonsabin
ID: 2700605
Yes positive. You try giving a japanese book to an english man and say read that. It is very similar.

0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now