Sybase 12.4.2 manual 350

Models: 12.4.2

1 536
Download 536 pages 20.34 Kb
Page 370
Image 370

International language and character set tasks

You do this using the Collation utility. The output is a collation file.

For example, the following statement extracts the 1252LATIN1 collation into a file named mycol.col:

dbcollat -z 1252LATIN1 mycol.col

3Edit the custom collation file.

Open the collation file (in this case mycol.col) in a text editor.

4Change the name of the collation.

The name of the collation is specified on a line near the top of the file, starting with Collation. You should edit this line to provide a new name, The name you need to change is the second word on the line: in this case 1252LATIN1.

The other entries on this line are descriptive only, and do not need to be changed.

5Change the collation definition.

Make the changes you wish in the custom collation file to define your new collation.

For information on the collation file contents and format, see “Collation internals” on page 339.

6Convert the file to SQL scripts.

You do this using the dbcollat command-line utility using the -dswitch.

For example, the following command line creates the mycustmap.sql file and mycustom.sql files from the mycol.col collation file:

dbcollat -d mycol.col mycustmap.sql mycustom.sql

7Add the SQL scripts to the scripts in your installation.

The scripts used when creating databases are held in the scripts subdirectory of your Adaptive Server IQ installation directory. Append the contents of mycustmap.sql to custmap.sql, and the contents of mycustom.sql to end of custom.sql.

The new collation is now in place, and can be used when creating databases.

8Restart the database.

350

Page 370
Image 370
Sybase 12.4.2 manual 350