From Sybase Wiki
Jump to: navigation, search

How to built server from 'srvbulidres' utility?

Thease are following given below step to built server from srvbulidres utlity :

  • Allocated Shared max memory
  • Installed SYBASE ASE.
  • Enable environment variable. /*(by default it is in directory where sybase installed. */
  • Loacte sample_resource_file: srvbuild.adaptive_server.rs (by default <DIR>: $SYBASE/$SYBASE_ASE/init/sample_resource_files)
  • Make a duplicate copy of $SYBASE/$SYBASE_ASE/init/sample_resource_files/srvbuild.adaptive_server.rs -- (srvbuild.adaptive_server_Dev1.rs)
  • Pass required parameter in duplicate file for buliding server (in srvbuild.adaptive_server_Dev1.rs)
  • Build server

Allocating Shared Max Memory

Installation [[1]]

Installing SYBASE ASE

Installation [[2]]

Including environment variable

[sybase@localhost ~]$cd sybase
[sybase@localhost ~]$ls -ltr 
drwxrwxr-x   8 sybase sybase 4096 Mar 23 23:43 jre32
drwxr-xr-x   4 sybase sybase 4096 Mar 23 23:43 sybuninstall
drwxr-xr-x   2 sybase sybase 4096 Mar 23 23:43 Sybase_Install_Registry
drwxrwxr-x   3 sybase sybase 4096 Mar 23 23:43 collate
drwxrwxr-x  59 sybase sybase 4096 Mar 23 23:43 charsets
drwxrwxr-x   4 sybase sybase 4096 Mar 23 23:43 locales
drwxrwxr-x   4 sybase sybase 4096 Mar 23 23:45 jutils-2_0
drwxrwxr-x   9 sybase sybase 4096 Mar 23 23:45 jConnect-6_0
drwxrwxr-x   3 sybase sybase 4096 Mar 23 23:45 jutils-3_0
drwxrwxr-x   9 sybase sybase 4096 Mar 23 23:45 jConnect-7_0
drwxrwxr-x  12 sybase sybase 4096 Mar 23 23:45 OCS-15_0
drwxrwxr-x   2 sybase sybase 4096 Mar 23 23:45 config
drwxrwxr-x   3 sybase sybase 4096 Mar 23 23:47 DataAccess
drwxrwxr-x   8 sybase sybase 4096 Mar 23 23:47 shared
drwxrwxr-x   5 sybase sybase 4096 Mar 23 23:47 DBISQL
drwxrwxr-x   6 sybase sybase 4096 Mar 23 23:48 SYSAM-2_0
drwxrwxr-x   6 sybase sybase 4096 Mar 23 23:48 AMCP
drwxrwxr-x  13 sybase sybase 4096 Mar 23 23:48 UAF-2_5
drwxrwxr-x   5 sybase sybase 4096 Mar 23 23:49 ASEP
drwxrwxr-x   8 sybase sybase 4096 Mar 23 23:50 WS-15_0
-rwxr-xr-x   1 sybase sybase 1390 Mar 23 23:50 SYBASE.sh
-rwxr-xr-x   1 sybase sybase 1764 Mar 23 23:50 SYBASE.csh
-rw-r--r--   1 sybase sybase  936 Mar 23 23:50 SYBASE.env
drwxr-xr-x   2 sybase sybase 4096 Mar 23 23:54 log
-rw-rw-r--   1 sybase sybase   76 Mar 31 12:15 interf.old
-rw-rw-r--   1 sybase sybase  155 Mar 31 12:23 interfaces
drwxrwxr-x  19 sybase sybase 4096 Apr 15 13:38 ASE-15_0
drwxrwxr-x   2 sybase sybase 4096 Apr 15 14:59 data
[sybase@localhost ~]$. SYBASE.sh

Loacting sample_resousce_file folde

[sybase@localhost ~]$cd $SYBASE/$SYBASE_ASE/init/sample_resource_files
[sybase@localhost sample_resource_files]$ ls -ltr
total 104
-rw-r--r--  1 sybase sybase  868 Jan  6  1998 sqlloc.rs
-rw-r--r--  1 sybase sybase  179 Jan 14  2000 sqlupgrade.backup_server.rs
-rw-r--r--  1 sybase sybase  294 Jan 14  2000 sqlupgrade.monitor_server.rs
-rw-r--r--  1 sybase sybase  401 Jan 26  2000 srvbuild.xp_server.rs
-rw-r--r--  1 sybase sybase  671 Jul 14  2004 srvbuild.text_server.rs
-rw-r--r--  1 sybase sybase  959 Apr 13  2005 srvbuild.job_scheduler.rs
-rw-r--r--  1 sybase sybase  621 Mar  5  2009 srvbuild.backup_server.rs
-rw-r--r--  1 sybase sybase  283 Jun 28  2009 sqlupgrade.adaptive_server.rs
-rw-r--r--  1 sybase sybase 1822 Sep  1  2009 srvbuild.adaptive_server.rs  It is SYBASE ASE resource server file. 
-rw-r--r--  1 sybase sybase  562 Feb 21  2010 srvbuild.monitor_server.rs
-rw-r--r--  1 sybase sybase 3658 Aug 26  2010 auditinit.res
-rw-rw-r--  1 sybase sybase  825 Mar 31 12:12 PRDO_ASE.rs
-rw-r--r--  1 sybase sybase  547 Mar 31 12:23 srvbuild.backup_server.rs_new

Copying Resource server file

[sybase@localhost sample_resource_files]$ cp srvbuild.adaptive_server.rs srvbuild.adaptive_server.rs_DEV1

Viewing resource Server file information (Before Editing)

[sybase@localhost sample_resource_files]$ cat srvbuild.adaptive_server.rs_DEV1
sybinit.release_directory: USE_DEFAULT
sybinit.product: sqlsrv
sqlsrv.server_name: PUT_YOUR_SERVER_NAME_HERE
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.application_type: USE_DEFAULT
sqlsrv.server_page_size: USE_DEFAULT
sqlsrv.force_buildmaster: no
sqlsrv.master_device_physical_name: PUT_THE_PATH_OF_YOUR_MASTER_DEVICE_HERE
sqlsrv.master_device_size: USE_DEFAULT
sqlsrv.master_database_size: USE_DEFAULT
sqlsrv.errorlog: USE_DEFAULT
sqlsrv.do_upgrade: no
sqlsrv.sybsystemprocs_device_physical_name: PUT_THE_PATH_OF_YOUR_SYBSYSTEMPROCS_DEVICE_HERE
sqlsrv.sybsystemprocs_device_size: USE_DEFAULT
sqlsrv.sybsystemprocs_database_size: USE_DEFAULT
sqlsrv.sybsystemdb_device_physical_name: PUT_THE_PATH_OF_YOUR_SYBSYSTEMDB_DEVICE_HERE_OR_REMOVE_THIS_LINE
sqlsrv.sybsystemdb_device_size: USE_DEFAULT
sqlsrv.sybsystemdb_database_size: USE_DEFAULT
sqlsrv.tempdb_device_physical_name: PUT_THE_PATH_OF_YOUR_TEMPDB_DEVICE_HERE_OR_REMOVE_THIS_LINE
sqlsrv.tempdb_device_size: USE_DEFAULT
sqlsrv.tempdb_database_size: USE_DEFAULT
sqlsrv.default_backup_server: PUT_YOUR_BACKUP_SERVER_NAME_HERE
#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
# If sqlsrv.do_optimize_config is set to yes, both sqlsrv.avail_physical_memory and sqlsrv.avail_cpu_num need to be set.
sqlsrv.do_optimize_config: no
sqlsrv.avail_physical_memory: PUT_THE_AVAILABLE_PHYSICAL_MEMORY_FOR_ASE_IN_OPTIMIZATION
sqlsrv.avail_cpu_num: PUT_THE_AVAILABLE_NUMBER_CPU_FOR_ASE_IN_OPTIMIZATION

Viewing resource Server file information (After Editing)

'Edited values are Bold'
sybase@localhost sample_resource_files]$ cat srvbuild.adaptive_server.rs_DEV1
sybinit.release_directory: /opt/sybase/15
sybinit.product: sqlsrv
sqlsrv.server_name: DEV1
sqlsrv.new_config: yes
sqlsrv.do_add_server: yes
sqlsrv.network_protocol_list: tcp
sqlsrv.network_hostname_list: localhost
sqlsrv.network_port_list: 8000
sqlsrv.application_type: USE_DEFAULT
sqlsrv.server_page_size: USE_DEFAULT
sqlsrv.force_buildmaster: no
sqlsrv.master_device_physical_name: /opt/sybase/ASE/data/master_DEV1.dev
sqlsrv.master_device_size: USE_DEFAULT
sqlsrv.master_database_size: USE_DEFAULT
sqlsrv.errorlog: USE_DEFAULT
sqlsrv.do_upgrade: no
sqlsrv.sybsystemprocs_device_physical_name: /opt/sybase/ASE/data/sysprocdev_DEV1.dev
sqlsrv.sybsystemprocs_device_size: USE_DEFAULT
sqlsrv.sybsystemprocs_database_size: USE_DEFAULT
sqlsrv.default_backup_server: PROD_ASE_BS1
sqlsrv.do_configure_pci: no
sqlsrv.do_optimize_config: no

Checkout srvbuildres command version

[sybase@localhost sample_resource_files]$ srvbuildres -v
srvbuildres/15.5 ESD #2/P/Linux Intel/Linux 2.6.9-55.ELsmp i686/EBF 18159 SMP/OPT/Wed Aug 25 12:18:43 PDT 2010
Confidential property of Sybase, Inc.
Copyright 1997 - 2010
Sybase, Inc.  All rights reserved.
Unpublished rights reserved under U.S. copyright laws.
This software contains confidential and trade secret information of Sybase,
Inc. Use, duplication or disclosure of the software and documentation by
the U.S. Government is subject to restrictions set forth in a license
agreement between the Government and Sybase, Inc. or other written
agreement specifying the rights of the Government to use the software
and any applicable FAR provisions, for example, FAR 52.227-19.
Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA.

Building server from srvbuildres command

[sybase@localhost sample_resource_files]$ srvbuildres -r srvbuild.adaptive_server.rs_DEV1
/opt/sybase/ASE/data is not a directory. /*Common Error -- Directory is not created*/
/opt/sybase/ASE/data is not a directory.   /* Common Error -- Directory is not created */
[sybase@localhost sample_resource_files]$ mkdir /opt/sybase/15/ASE  /*Creating Directory*/
[sybase@localhost sample_resource_files]$ mkdir /opt/sybase/15/ASE/data /*Creating Directory*/
[sybase@localhost sample_resource_files]$ srvbuildres -r srvbuild.adaptive_server.rs_DEV1
Building Adaptive Server 'DEV1':
Writing entry into directory services...
Directory services entry complete.
Building master device...
Master device complete.
Writing RUN_DEV1 file...
RUN_DEV1 file complete.
Starting server...
Server started.
Building sysprocs device and sybsystemprocs database...
sysprocs device and sybsystemprocs database created.
Running installmaster script to install system stored procedures...
installmaster: 10% complete.
installmaster: 20% complete.
installmaster: 30% complete.
installmaster: 40% complete.
installmaster: 50% complete.
installmaster: 60% complete.
installmaster: 70% complete.
installmaster: 80% complete.
installmaster: 90% complete.
installmaster: 100% complete.
installmaster script complete.
Creating two-phase commit database...
Two phase commit database complete.
Installing common character sets (Code Page 437, Code Page 850, ISO Latin-1,
Macintosh and HP Roman-8)...
Character sets installed.
Setting server name in Adaptive Server...
Server name added.
Server 'DEV1' was successfully created.

Running Server status

sybase@localhost sample_resource_files]$ showserver
F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD
0 S sybase    7960  7959 16  75   0 - 44840 -      21:31 ?        00:00:02 /opt/sybase/15/ASE-15_0/bin/dataserver -sDEV1 - 
d/opt/sybase/15/ASE/data/master_Dev1.dev -e/opt/sybase/15/ASE-15_0/install/DEV1.log -c/opt/sybase/15/ASE-15_0/DEV1.cfg - 
M/opt/sybase/15/ASE-15_0

Log-in to new created server

[sybase@localhost sample_resource_files]$ isql -Usa -SDEV1
Password:
1> select @@Servername,getdate()
2> go
------------------------------------------------------------
        --------------------------
DEV1
               Apr 17 2012  11:34PM