Discussion:
Unable to restore database - Different charset
(too old to reply)
Willy
2008-05-12 14:49:02 UTC
Permalink
Hi,

I am trying to restore a database on a newly built db server but
getting below message:

Backup Server: 6.28.1.1: Dumpfile name 'mydb0813307690' section number
1
mounted on byte stream
'compress::/sybase_backup/dmp/mydb_080512_08:25.dmp::00'

Msg 3120, Level 16, State 1:
Server 'MY_SRVR', Line 1:
The database you are attempting to LOAD was DUMPed under a different
sort order ID (52) or character set ID (1) than the ones running on
this server (SortOrd =50, CharSet = 1). If the sort orders differ, at
least one of them is
non-binary.

I understand that its failing due to different sort id/charset but I
am having problems changing the default character set on new server
(as what I have on source server).

I am using this resource file to change the charset

sybinit.release_directory: /home/sybase/sybase12.5.4_64bit
sqlsrv.server_name: MY_SRVR
sqlsrv.sa_login: sa
sqlsrv.sa_password:
sqlsrv.default_language: USE_DEFAULT
sqlsrv.language_install_list: USE_DEFAULT
sqlsrv.language_remove_list: USE_DEFAULT
sqlsrv.default_characterset: cp852
sqlsrv.characterset_install_list: USE_DEFAULT
sqlsrv.characterset_remove_list: USE_DEFAULT
sqlsrv.sort_order:noaccents

But I get a message that Character set 'cp852' is not installed in
/home/sybase/sybase12.5.4_64bit/charsets.

Please suggest.
Willy
2008-05-12 14:53:37 UTC
Permalink
select charset = c.name, charid = c.id, descr = c.description from
master..syscharsets c , master..sysconfigures f where f.value = c.id
and f.name = 'default sortorder id'

Above query on source server retursn:

charset charid
descr
------- -----------
-----
nocase_iso_1 52 Case-insensitive dictionary
sort order for use with several Western-European languages including
English, French, and German. Uses the ISO 8859-1 character
set.
nocase_eucjis 52 General-purpose case-
insensitive dictionary
ordering
nocase_sjis 52 General-purpose case-
insensitive dictionary
ordering
nocase_deckanji 52 General-purpose case-
insensitive dictionary
ordering
nocase_eucgb 52 General-purpose case-
insensitive dictionary
ordering
nocase_cp936 52 General-purpose case-
insensitive dictionary
ordering
nocase_gb18030 52 General-purpose case-
insensitive dictionary
ordering
nocase 52 General-purpose case-
insensitive dictionary ordering

and on target server, it returns:

charset charid
descr
------- -----------
-----
bin_iso_1 50 Binary ordering, for the
ISO 8859/1 or Latin-1 character set (iso_1).
Willy
2008-05-12 15:56:52 UTC
Permalink
unixhost% charset -Usa -P -SMY_SRVR nocase.srt iso_1
Loading file 'nocase.srt'.

Found a [sortorder] section.

This is Class-1 sort order.

Character set for the sort order is already in the Syscharsets table.

Finished loading file 'nocase.srt'.

1 sort order loaded successfully

Ok, I have sorted it out as I was trying with wrong character set. I
used above step to install sort id 52.

Loading...