Using edbstart and edbstop
--------------------------
The edbstart and edbstop utilities use the edbtab file to determine which instances 
of Advanced Server should start when the operating system boots, and stop when the 
host is shut down.

  The edbstart utility starts a database cluster; if you do not provide a command-line 
  argument, edbstart starts each cluster listed in the /etc/edbtab file.  

  The edbstop utility stops a database cluster; if you do not provide a command-line 
  argument, edbstart stops each cluster listed in the /etc/edbtab file.

The edb_autostart script invokes edbstart to automatically start each cluster listed in 
/etc/edbtab when your host computer boots.


Configuring Automatic Startup/Shutdown
-----------------------------------------------------
Perform the following steps to configure an Advanced Server host to autostart or autostop: 

1) Create a file named edbtab in the /etc directory; you can create a new file, or 
   use the provided file as a template.  Entries within the file should take the form:

    <edbhome>:<datadir>:Y/N

  Add a separate entry for each Advanced Server cluster.

2) Copy the edb_autostart script to /etc/init.d.

3) Copy edbstart and edbstop to <edbhome>

4) Adjust the permissions of the scripts to make them executable:

    chmod +x edbstart
    chmod +x edbstop
    chmod +x /etc/init.d/edb_autostart

5) Use the following commands to arrange for Advanced Server to start 
   automatically when the host boots.

  Linux Users:

    chkconfig --level 2345 edb_autostart on
    chkconfig --add edb_autostart

  Solaris Users: Please perform the following steps for each level (the following example
                 demonstrates level 2):

    ln -s /etc/init.d/edb_autostart /etc/rc2.d/S99edb_autostart 
    ln -s /etc/init.d/edb_autostart /etc/rc2.d/K03edb_autostart

6) Reboot the Advanced Server host.


Manually Invoking the Scripts
-----------------------------
You can manually invoke the edb_autostart script by passing start or stop as an argument; 
you can also manually invoke the individual edbstart or edbstop scripts.  To invoke the 
scripts, you must log in as the cluster owner.   

Optionally, specify a data directory as an argument when invoking edbstart or edbstop as 
shown in the following example:
      
      edbstart /opt/PostgresPlus/<version>/data

Where <version> is the version of Advanced Server (e.g., 9.3AS).
  
If you provide a data directory, edbstart or edbstop will start or stop the cluster
that corresponds to that directory.
  
If you do not provide an argument when invoking the edbstart or edbstop script, the utility 
will start or stop all clusters specified in the edbtab file.

NOTE: The script edb_autostart assumes that the database superuser is named "enterprisedb" 
and the default installation path is "/opt/PostgresPlus/9.3AS". If you have a different 
database superuser or a non-default installation path, modify the "EDBUSER" and "prefix" 
variables in the edb_autostart script accordingly. 

