Starting a server without RUNSERVER
In a Unix environment, can we start the Sybase database server without the use of RUNSERVER file, which is in the install directory? If so, how?

    Requires Free Membership to View

    When you register, my team of editors will also send you resources covering Linux administration and management; integration and interoperability between Linux, Windows and Unix; securing Linux and mixed-platform environments; and migrating to Linux.

    Margie Semilof, Editorial Director

    By submitting your registration information to SearchEnterpriseLinux.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchEnterpriseLinux.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

The short answer is yes, but not conveniently. First, we need to understand what a RUNSERVER file is and what information it contains:

ASE's RUNSERVER file is a static file that is used for feeding information to the ASE's startup program. Each ASE has its own RUNSERVER file. By default, the RUNSERVER file is located under directory $SYBASE/$SYBASE_ASE/install. The RUNSERVER file is created by the ASE's server creation program called srvbuild. This file holds information about the server.

The naming convention used for RUNSERVER file is as follows:

RUN_ < SERVER_NAME >

For example, the RUNSERVER file for a server called lon_gen_sql_tst4 would be RUN_lon_gen_sql_tst4. The information contained in a RUNSERVER file is as follows:

  • The main binary startup program (dataserver)
  • The server name as in the interfaces file
  • The ASE page size
  • The location of the master device
  • The location of the errorlog
  • The location of the configuration file
  • The location of the shared memory file for this server

An example of RUNSERVER file is shown below:

cat RUN_lon_gen_sql_tst4
#!/bin/sh
#
# Adaptive Server name: lon_gen_sql_tst4
# ASE page size (KB):   8k
# Master device path:   /data2/lon_gen_sql_tst4/master.dat
# Error log path:       /apps/sybase/sqlserver/15/ASE-15_0/install/lon_gen_sql_tst4.log
# Configuration file path:      /apps/sybase/sqlserver/15/ASE-15_0/lon_gen_sql_tst4.cfg
# Directory for shared memory files:    /apps/sybase/sqlserver/15/ASE-15_0
#
/apps/sybase/sqlserver/15/ASE-15_0/bin/dataserver 
-slon_gen_sql_tst4 
-d/data2/lon_gen_sql_tst4/master.dat 
-e/apps/sybase/sqlserver/15/ASE-15_0/install/lon_gen_sql_tst4.log 
-c/apps/sybase/sqlserver/15/ASE-15_0/lon_gen_sql_tst4.cfg 
-M/apps/sybase/sqlserver/15/ASE-15_0 

In the above file, dataserver program is used to invoke an ASE. This executable can be invoked at the command line or embedded in (invoked from) a RUNSERVER file for ease of use.

To start ASE, you need to use the command line program startserver, located in the same install directory as the RUNSERVER file. The startserver executable is passed to a RUNSERVER file as an argument. Then, startserver reads the RUNSERVER file. This file, in turn, provides the executable with the information it needs. You typically start ASE as follows:

startserver –f RUN_<SERVER_NAME>

For example, to start a server called lon_gen_sql_tst4 you do the following:

startserver –f RUN_lon_gen_sql_tst4

In summary, you can start an ASE without using a RUNSERVER file by typing everything in the RUNSERVER file (dataserver -s ..), but I would not recommend it.

This was first published in January 2006