SYBASE建SERVER的时候更改字符集!!
时间:2010-03-17 来源:常笑
以sybase用户登录,或
# su – sybase
$ cd init
$ cd sample_resource_files
$ cp srvbuild.adaptive_server.rs /sybase/xxxx_SERV.rs
$ cp srvbuild.backup_servers.rs /sybase/xxxx_SERV_backup.rs
$ cd
修改资源定义文件
$ vi xxxx_SERV.rs
sybinit.release_directory: /sybase
sybinit.product: sqlsrv
sqlsrv.server_name: xxxx_SERV
sqlsrv.new_config: yes
sqlsrv.do_add_server: yes
sqlsrv.network_protocol_list: tcp
sqlsrv.network_hostname_list: PUT_YOUR_HOSTNAME_HERE
sqlsrv.network_port_list: PUT_YOUR_PORT_NUMBER_HERE
sqlsrv.master_device_physical_name:/dev/rmaster
sqlsrv.master_device_size: 100
sqlsrv.master_database_size: USE_DEFAULT
sqlsrv.errorlog: USE_DEFAULT
sqlsrv.do_upgrade: no
sqlsrv.sybsystemprocs_device_physical_name: /dev/rsybproc
sqlsrv.sybsystemprocs_device_size: 100
sqlsrv.sybsystemprocs_database_size: USE_DEFAULT
sqlsrv.sybsystemdb_device_physical_name: /dev/rsybsystem(*)
sqlsrv.sybsystemdb_device_size: 100(*)
sqlsrv.sybsystemdb_database_size: USE_DEFAULT(*)
sqlsrv.default_backup_server: xxxx_SERV_backup
~
~
如果不使用两阶段提交(2pc),可以不创建名为sybsystem的逻辑卷,同时删除以上文件中最后标有(*)的三行。
$ vi xxxx_SERV_backup.rs
sybinit.release_directory: /sybase
sybinit.product: bsrv
bsrv.server_name: xxxx_SERV_backup
bsrv.do_add_backup_server: yes
bsrv.network_protocol_list: tcp
bsrv.network_hostname_list: PUT_YOUR_HOSTNAME_HERE
bsrv.network_port_list: PUT_YOUR_PORT_NUMBER_HERE
bsrv.language: USE_DEFAULT
bsrv.character_set: USE_DEFAULT
bsrv.tape_config_file: USE_DEFAULT
bsrv.errorlog: USE_DEFAULT
~
~
~
$ srvbuildres –r xxxx_SERV.rs
$ srvbuildres –r xxxx_SERV_backup.rs
==========================================================
在HP-UX上,缺省的字符集roman8,通过以下方法改为iso_1。
$ cd /sybase
$ cp init/sample_resource_files/sqlloc.rs sqlloc.rs
$ vi sqlloc.rs
sybinit.release_directory: USE_DEFAULT
sqlsrv.server_name: xxxx_SERV
sqlsrv.sa_login: sa
sqlsrv.sa_password:
sqlsrv.default_language: us_english
sqlsrv.language_install_list: USE_DEFAULT
sqlsrv.language_remove_list: USE_DEFAULT
sqlsrv.default_characterset: iso_1
sqlsrv.characterset_install_list: USE_DEFAULT
sqlsrv.characterset_remove_list: USE_DEFAULT
sqlsrv.sort_order: binary
$ sqllocres –r sqlloc.rs