SHUTDOWN

The SHUTDOWN UNIX program type shuts down Applications Manager, runs the specified program, then restarts Applications Manager. This program type is useful for doing backups.

The SHUTDOWN UNIX program type was designed to let you run backups with Applications Manager. The program type shuts down Applications Manager, runs the specified program, then restarts Applications Manager. This sequence of events is illustrated below.

The SHUTDOWN program type shuts down Applications Manager before it executes its program.

The table below describes what happens at each point in time shown above.

Time Point Description

0

Applications Manager is running.

1

Applications Manager starts the SHUTDOWN task which runs the SUSOSHUT program type script.

2

SUSOSHUT stops Applications Manager.

3

SUSOSHUT starts its program script and waits for the program script to finish. A typical program script may shut down the database, run a backup program, then restart the database.

4

The program script finishes and the SUSOSHUT script can now issue additional commands.

5

SUSOSHUT restarts Applications Manager.

6

The SUSOSHUT task is finished and Applications Manager moves the record of the completed task to History.

Program Type Parameters

The SUSOSHUT program type parameters are listed below.

Parameter Value

Type

SUSOSHUT

Command Path

/exec

Description

Database Shutdown

Param format

#d

Default varname

not applicable

File extension

none

Host command

SUSOSHUT

Program Type Script

$ cat -n SUSOSHUT

   1  #copyright 1993-2006 by Automic Software GmbH

   2  # $Date: 2008-05-31 15:31:22 -0700 (Sat, 31 May 2008) $
      $Author: kak $ $Rev: 20676 $

   3  echo In $0

   4  if [ -f $AW_HOME/c/callscript ]

   5  then

   6          $AW_HOME/c/callscript $SQLOPER_HOME/bin/stopso all

   7  else

   8          $SQLOPER_HOME/bin/stopso all

   9  fi

  10  arg=`$SQLOPER_HOME/exec/ONELINE $par`

  11  echo Switching to user

  12  echo Running $SQLOPER_HOME/c/SURUN -user $program $arg

  13  $SQLOPER_HOME/c/SURUN -user $program $arg

  14  err=$?

  15  if [ -f $AW_HOME/c/callscript ]

  16  then

  17          $AW_HOME/c/callscript $SQLOPER_HOME/bin/startso all

  18  else

  19          $SQLOPER_HOME/bin/startso all

  20  fi

  21  exit $err

Explanation of the Script

The key elements of the script are described below.

Lines Description

6, 8

Stops the automation engine and agent processes

10

Arranges arguments on a single line

12

Runs the specified program with the user of the script (usually a backup)

14

Captures errors

17, 19

Starts the automation engine and agent processes