Wednesday, 20 April 2011

ASE : How to change ASE sort order

I recently tried to merge a system requiring case insensitive with a system using case sensitive sort order which is the default setting for Sybase ASE. Here are the steps

- check what sort order is being used
- try to change it to the new order
- sp_configure ‘default sortorder id', new_sort_order_value
- If you get error like this

1> sp_configure 'default sortorder id', 52
2> go
Msg 5824, Level 16, State 4:Server 'SNAP_PROD', Procedure 'sp_configure', Line 777:Cannot reconfigure server to use sort order ID 52, because the row for itsunderlying character set (ID 1) does not exist in syscharsets.
(return status = 1)

Then exit from isql and run like this
$SYBASE/bin/charset -Psa_pw -Sservername iso_1

then recycle the instance, the instance will be down automatically once conversion is done.
Start the instance again
Run sp_helpsort to verify

No comments:

Post a Comment