Back in the day, Sybase used an install program called sybinit which worked really well .. then, the next generation Java-based installers happened; they are really sweet to look at, but are not efficient/intuitive nor easy to get running (requires X window system with Java which is now an Oracle product!).
Those of us preferring simple terminal-based installers can leverage srvbuildres, which accepts a resource file name as a parameter.
Here's a sample shell script which calls srvbuildres.
#!/bin/bash
#
# Script needs 1 parameter: resource_filename
#
. /opt/sybase/product/15.0.3/SYBASE.sh
echo $SYBASE_ASE
sleep 2
rfile=$1
lfile=${rfile}.$$.log
srvbuildres -s $SYBASE -I /opt/sybase/interfaces -r $rfile | tee $lfile
Here's a sample resource file.
a) Be sure that the host (MONTANA in this example) is ping-able.
b) If using raw devices, check: /dev/rawctl, /etc/sysconfig/rawdevices, /etc/udev/rules.d/60-raw.rules
sybinit.release_directory: USE_DEFAULT
sybinit.product: sqlsrv
sqlsrv.server_page_size 8K
sqlsrv.server_name: HAMILTON
sqlsrv.new_config: yes
sqlsrv.do_add_server: yes
sqlsrv.network_protocol_list: tcp
sqlsrv.network_hostname_list: MONTANA
sqlsrv.network_port_list: 4154
sqlsrv.application_type: USE_DEFAULT
sqlsrv.server_page_size: 8192
sqlsrv.force_buildmaster: yes
sqlsrv.master_device_physical_name: /sybase/dev/raw/HAMILTON_mst_1g_001
sqlsrv.master_device_size: 1024
sqlsrv.master_database_size: 128
sqlsrv.errorlog: USE_DEFAULT
sqlsrv.do_upgrade: no
sqlsrv.sybsystemprocs_device_physical_name: /sybase/dev/raw/HAMILTON_ssp_1g_001
sqlsrv.sybsystemprocs_device_size: 1024
sqlsrv.sybsystemprocs_database_size: 512
sqlsrv.sybsystemdb_device_physical_name: /sybase/dev/raw/HAMILTON_ssd_1g_001
sqlsrv.sybsystemdb_device_size: 1024
sqlsrv.sybsystemdb_database_size: 128
#sqlsrv.tempdb_device_physical_name: /sybase/dev/raw/HAMILTON_tmp_4g_001
#sqlsrv.tempdb_device_size: 4096
#sqlsrv.tempdb_database_size: 2048
sqlsrv.default_backup_server: HAMILTON_backup
#sqlsrv.addl_cmdline_parameters: PUT_ANY_ADDITIONAL_COMMAND_LINE_PARAMETERS_HERE
sqlsrv.do_configure_pci: no
sqlsrv.sybpcidb_device_physical_name: PUT_THE_PATH_OF_YOUR_SYBPCIDB_DATA_DEVICE_HERE
sqlsrv.sybpcidb_device_size: USE_DEFAULT
sqlsrv.sybpcidb_database_size: USE_DEFAULT
sqlsrv.do_optimize_config: no
sqlsrv.avail_physical_memory: USE_DEFAULT
sqlsrv.avail_cpu_num: USE_DEFAULT
When executed using srvbuildres, the resulting ASE server will be ready for further configuration.
Note that the default (binary) sort order will be configured; it you want to change the sort order, you'll need to run (for example,)
charset -Usa -Pmontana -S HAMILTON dictiona.srt iso_1
#or
charset -Usa -Pmontana -S HAMILTON nocasepr.srt iso_1
#or
charset -Usa -Pmontana -S HAMILTON noaccent.srt iso_1
and then .. in isql
sp_configure 'default sortorder id',51,'iso_1'
-- or
sp_configure 'default sortorder id',53,'iso_1'
-- or
sp_configure 'default sortorder id',54,'iso_1'
Next, backup server needs to be built, using srvbuildres .. here's a sample resource file.
srvbuild.release_directory: /opt/sybase/product/15.0.3
srvbuild.product: bsrv
srvbuild.server_name: HAMILTON_back
srvbuild.new_config: yes
srvbuild.do_add_backup_server: yes
srvbuild.do_upgrade: no
srvbuild.network_protocol_list: tcp
srvbuild.network_hostname_list: MONTANA
srvbuild.network_port_list: 3262
srvbuild.language: USE_DEFAULT
srvbuild.character_set: USE_DEFAULT
srvbuild.tape_config_file: USE_DEFAULT
srvbuild.errorlog: /opt/sybase/product/15.0.3/ASE-15_0/install/HAMILTON_back.log
srvbuild.addl_cmdline_parameters:
Next steps ..
Setting the sort order
Build a second resource file, with the desired sort order .. here's a sample resource file.
sybinit.release_directory: USE_DEFAULT
sqlsrv.server_name: KANSAS
sqlsrv.sa_login: sa
sqlsrv.sa_password: chiefs123
sqlsrv.default_language: english
sqlsrv.language_install_list: spanish,german
sqlsrv.language_remove_list: USE_DEFAULT
sqlsrv.default_characterset: cp437
sqlsrv.characterset_install_list: mac,cp850
sqlsrv.characterset_remove_list: USE_DEFAULT
sqlsrv.sort_order: dictionary
or
sqlsrv.sort_order: nocase
or
sqlsrv.sort_order: altnoacc
-- Then run this command
sqllocres -r filename.rs
Next steps ..
- Set device # max (e.g. 32), then create devices
- Alter tempdb, should be 20% of full data/db size
- Create user-defined tempdbs
- BCP in syslogins, to tempdb, if migrating from another server. Then insert into master..syslogins as needed.
- Create Databases, and set DB options
- Create Roles
- Load databases (if migrating)
- Bind applications / logins to tempdb's .. use: sp_tempdb 'show'
- Set Max Memory
- Create cache's
- Bind tempdb's to cache's
- .. see other config/post installation steps on this site