Wednesday, August 22, 2007

How To Make Sybase ASE Non-Case Sensitive

Sybase ASE servers are case sensitive by default. This is a server-wide setting driven by the default character set and the sort order. Changing this impacts both object names and data itself so if you have to do this, expect unexpected consequences.

There is no way to change case sensitivity on a per-connection basis, or on a per-database basis. Changing it on an existing server is difficult and involves a lot more steps. But I recently had to make this change on a new install, having no databases and no data. It's much easier in that case.

To make a new Sybase ASE server install non-case sensitive (using it's default English character set), on Linux:

1. After the install, as the Sybase user with the usual permissions, run this (if you just installed the server, then the sa password is empty, specify the -P with no text after):

charset -Usa -P -S nocase.srt iso_1

2. Connect to the server as sa and change the sort order:

isql -Usa -P -S
1> sp_configure 'default sortorder id', 52, 'iso_1'
2> go

3. Shutdown and restart the server. The server will change its sort order and then shut itself down. The server output to the console will show this.

4. Restart the server again, all set.

No comments:

Post a Comment