也谈Sybase ASE15.x在Windows下的静态安装(silent install)

Sybase ASE数据库的图形界面安装,虽然比较顺利,但是也让中文用户很不爽,那就是字符集的选择,似乎没有余地,只能Customize选择,还不一定一次能选对。

比如,你一路安装的时候, ASE sql server创建的时候,很难从界面里头选择语言和字符集。

还好,ASE15.x提供了silent install的方式。

1. 安装并生成silent install的配置文件

运行setupconsole.exe -options-record c:\ase1503_silentinstall.txt,这一路你只安装软件,可选择完全安装,但别装数据库服务。

这样得到了样本配置文件:ase1503_silentinstall.txt

注意一边这几项内容即可:

-P installLocation="D:\sybase" ## 你可以到时候改为你想要的目录

-W installSoftwareLicenseType.type=developer

-W sysamLicense.proceedWithoutLicense=false
-W sysamLicense.useExistingLicenseServer=false
-W sysamLicense.licenseFile=


-W askConfig.configureAse=false
-W askConfig.configureBackup=false
-W askConfig.configureMonitor=false
-W askConfig.configureXp=false
-W askConfig.configureJobScheduler=false
-W askConfig.configureSelfManagement=false
-W askConfig.configureUnifiedAgent=false


这样安装完,你会得到一套没有数据库服务的Sybase ASE15.x. 如果你将其卸载,接着,运行:
setupConsole.exe -silent -options c:\ase1503_silentinstall.txt -W SybaseLicense.agreeToLicense=true -G replaceExistingResponse="yesToALL"

即可实现silentinstall。

2. build ase server

限于篇幅,这里以ASE的主server: sybase sqlserver为例,进入目录:

%SYBASE%\%SYBASE_ASE%\bin, 有个命令sybatch.exe,这个命令长期不见之于文档,不知道什么原因,它就是windows版的sqlbuilder,用于创建各个服务的。

输入资源配置文件在哪儿呢?从%SYBASE%\%SYBASE_ASE%\samples\server里头把sybatch_ase.res文件复制到c:\sybatch_ase.res

修改一下里边的内容,不然,肯定大多会失败:

改的地方:

1). 安装目录,保持一致

sybinit.boot_directory: D:\Sybase
sybinit.release_directory: D:\Sybase

所有的C:\**什么的,都得调成你现在安装的位置,包括数据文件。

2) sysprocs.dat文件大小,132太小,改成至少136

sqlsrv.do_create_sybsystemprocs_device: yes
sqlsrv.sybsystemprocs_device_physical_name: D:\Sybase\data\sysprocs.dat
sqlsrv.sybsystemprocs_device_size: 150
sqlsrv.sybsystemprocs_db_size: 150
sqlsrv.sybsystemprocs_device_logical_name: sysprocsdev

3) 字符集,这个是大家比较关心的:

sqlsrv.sort_order: binary
sqlsrv.default_characterset: utf8
sqlsrv.default_language: us_english

默认的是iso_1, english

4)下边三个值你可以改成你想要的

sqlsrv.server_name: SYBASE
sqlsrv.sa_password:
sqlsrv.sa_login: sa

这里帖出一个由sybatch.exe创建Sybase SqlServer服务的结果:运行sybatch.exe -r c:\sybatch_ase.res

结果如下:

D:\sybase\ASE-15_0\bin>sybatch.exe -r d:\SOFT\sybatch_ase.res
CONNECTIVITY ERROR: Open Client message: 'ct_connect(): network packet layer: in
ternal net library error: Net-Lib protocol driver call to connect two endpoints
failed
Failed to connect to the server - Error is 10061 由于目标机器积极拒绝,无法连接
。

'.
CONNECTIVITY ERROR: Initialization of auditinit connectivity module failed.
Running task: update Sybase Server entry in interfaces file.
Task succeeded: update Sybase Server entry in interfaces file.
Running task: create the master device.
Building the master device
......Done
Task succeeded: create the master device.
Running task: update Sybase Server entry in registry.
Task succeeded: update Sybase Server entry in registry.
Running task: start the Sybase Server.
waiting for server 'SYBASE' to boot...
waiting for server 'SYBASE' to boot...
waiting for server 'SYBASE' to boot...
waiting for server 'SYBASE' to boot...
waiting for server 'SYBASE' to boot...
Task succeeded: start the Sybase Server.
Running task: create the sybsystemprocs database.
sybsystemprocs database created.
Task succeeded: create the sybsystemprocs database.
Running task: install system stored procedures.
Installing system stored procedures : 10% complete...
Installing system stored procedures : 20% complete...
Installing system stored procedures : 30% complete...
Installing system stored procedures : 40% complete...
Installing system stored procedures : 50% complete...
Installing system stored procedures : 60% complete...
Installing system stored procedures : 70% complete...
Installing system stored procedures : 80% complete...
Installing system stored procedures : 90% complete...
Installing system stored procedures : 100% complete...
Task succeeded: install system stored procedures.
Running task: set permissions for the 'model' database.
Task succeeded: set permissions for the 'model' database.
Running task: set local Adaptive Server name.
Task succeeded: set local Adaptive Server name.
Running task: set the XP Server for the Adaptive Server.
Task succeeded: set the XP Server for the Adaptive Server.
Running task: update XP Server entry in registry.
Task succeeded: update XP Server entry in registry.
Running task: create temporary database.
Task succeeded: create temporary database.
Running task: set the default character set and/or default sort order for the Ad
aptive Server.
Setting the default character set to utf8
Installing character set 'utf8'
.Done
Sort order 'binary' has been successfully installed.
Sort order 'binary' has been successfully set to the default.
Waiting 15 seconds for the operating system to reclaim resources before rebootin
g.
waiting for server 'SYBASE' to boot...
waiting for server 'SYBASE' to boot...
waiting for server 'SYBASE' to boot...
waiting for server 'SYBASE' to boot...
waiting for server 'SYBASE' to boot...
Task succeeded: set the default character set and/or default sort order for the
Adaptive Server.
Running task: set the default language.
Setting the default language to us_english
Language 'us_english' is already the default.
Task succeeded: set the default language.
Running task: install sybsystemdb database.
sybsystemdb database extended.
Task succeeded: install sybsystemdb database.
Running task: set the Backup Server for the Adaptive Server.
Task succeeded: set the Backup Server for the Adaptive Server.
Running task: shutdown the Sybase Server.
Waiting 15 seconds for the operating system to reclaim resources before rebootin
g.
Task succeeded: shutdown the Sybase Server.
Running task: start the Sybase Server.
waiting for server 'SYBASE' to boot...
waiting for server 'SYBASE' to boot...
waiting for server 'SYBASE' to boot...
waiting for server 'SYBASE' to boot...
waiting for server 'SYBASE' to boot...
Task succeeded: start the Sybase Server.
Configuration completed successfully.
Running task: optimize ASE.
Optimize Configuration procedures : 10% complete...
Optimize Configuration procedures : 20% complete...
Optimize Configuration procedures : 30% complete...
Optimize Configuration procedures : 40% complete...
Optimize Configuration procedures : 50% complete...
Optimize Configuration procedures : 60% complete...
Optimize Configuration procedures : 70% complete...
Optimize Configuration procedures : 80% complete...
Optimize Configuration procedures : 90% complete...
Optimize Configuration procedures : 100% complete...
Task succeeded: optimize ASE.
Running task: shutdown the Sybase Server.
Waiting 15 seconds for the operating system to reclaim resources before rebootin
g.
Task succeeded: shutdown the Sybase Server.
Running task: start the Sybase Server.
waiting for server 'SYBASE' to boot...
waiting for server 'SYBASE' to boot...
waiting for server 'SYBASE' to boot...
waiting for server 'SYBASE' to boot...
waiting for server 'SYBASE' to boot...
Task succeeded: start the Sybase Server.
Configuration completed successfully.
Exiting.
The log file for this session is 'D:\sybase\ASE-15_0\init\logs\log0418.003'.
关于c:\sybatch_ase.res, 其内容如下,仅供参考:

#
# --- This is a "sybatch.exe" sample resource file. ---
#
# This sample resource file will configure a new
# 2k pagesize Adaptive Server "SYBASE".
#
sybinit.boot_directory:                         D:\Sybase
sybinit.release_directory:                      D:\Sybase
sqlsrv.do_add_server:                           yes
sqlsrv.network_hostname_list:			sql9xp
sqlsrv.network_port_list:                       5000
sqlsrv.network_protocol_list:                   tcp
sqlsrv.notes:
sqlsrv.connect_retry_delay_time:                5
sqlsrv.connect_retry_count:                     5
sqlsrv.new_config:                              yes
#
sqlsrv.server_name:                             SYBASE
sqlsrv.sa_password:                             
sqlsrv.sa_login:                                sa
sqlsrv.server_page_size:                        2k
#
# --- Set up master ----
#
sqlsrv.master_device_physical_name:             D:\Sybase\data\master.dat
sqlsrv.master_device_size:                      200
sqlsrv.master_db_size:				13
sqlsrv.disk_mirror_name:
#
# --- Set up sybsystemprocs ----
#
sqlsrv.do_create_sybsystemprocs_device:         yes
sqlsrv.sybsystemprocs_device_physical_name:     D:\Sybase\data\sysprocs.dat
sqlsrv.sybsystemprocs_device_size:              150
sqlsrv.sybsystemprocs_db_size:                  150
sqlsrv.sybsystemprocs_device_logical_name:      sysprocsdev
#
# --- Set up sybsystemdb ----
#
sqlsrv.do_create_sybsystemdb:			yes
sqlsrv.do_create_sybsystemdb_db_device:		yes
sqlsrv.sybsystemdb_db_device_physical_name:	D:\Sybase\data\sybsysdb.dat
sqlsrv.sybsystemdb_db_device_physical_size:	50
sqlsrv.sybsystemdb_db_size:			50
sqlsrv.sybsystemdb_db_device_logical_name:	systemdbdev
#
sqlsrv.errorlog:                                D:\Sybase\ASE-15_0\install\sybase.log
sqlsrv.sort_order:                              binary
sqlsrv.default_characterset:                    utf8
sqlsrv.default_language:                        us_english
#chinese
sqlsrv.preupgrade_succeeded:                    no
sqlsrv.network_name_alias_list:
sqlsrv.resword_conflict:                        0
sqlsrv.resword_done:                            no
sqlsrv.do_upgrade:                              no
sqlsrv.characterset_install_list:
sqlsrv.characterset_remove_list:
sqlsrv.language_install_list:
sqlsrv.language_remove_list:
sqlsrv.shared_memory_directory:
sqlsrv.addl_cmdline_parameters:
sqlsrv.eventlog:                                yes
sqlsrv.atr_name_shutdown_required:              yes
sqlsrv.atr_name_qinstall:                       no
#
sybinit.charset:                                utf8
sybinit.language:                               us_english
sybinit.resource_file:
sybinit.log_file:
sybinit.product:                                sqlsrv
#
sqlsrv.default_backup_server:                   SYBASE_BS
#
# optimize ASE
#
sqlsrv.do_optimize_config:			yes
sqlsrv.avail_physical_memory:			300
sqlsrv.avail_cpu_num:				1
sqlsrv.tempdb_device_physical_name:		D:\Sybase\data\tempdb.dat
sqlsrv.tempdb_device_size:			100
sqlsrv.tempdb_database_size:			100

sqlsrv.application_type:			MIXED

至于Backupserver, xp server, monitorserver在samples目录下边都能找到样例资源配置文件,不再缀述。 这个工具,现在的Sybase文档里头反而不再提及了。只要知道能用就行了。


你可能感兴趣的:(也谈Sybase ASE15.x在Windows下的静态安装(silent install))