Administration Commands

This chapter describes the general purpose commands of Adabas Extended Operation (AEO).


Retrieve and Modify Information Stored in the Configuration Files: adaini

Usage: adaini [DBID=<dbid>] {<add> | <del> | <show>}

<dbid> is a numeric value between 0 and 255. If the DBID parameter is not specified, or if DBID=0 has been specified, the ADABAS.INI file is processed; otherwise the DB<dbid>.INI file is processed.

Adding or Modifying Information in a Configuration File

<add> is used to add or modify one or more items in a configuration file, and has the following syntax:

{ADD | MOD[IFY] } <topic_list> <item_value_list>

Note:
ADD and MOD[IFY] are equivalent; you can also use ADD to modify items and MOD[IFY] to add items.

<topic_list> has the following syntax:

{ TOPIC=<topic> } ...

where <topic> is the name of a topic. If the item(s) to be processed belong to a subtopic, the complete hierarchy of topics to which the item(s) belong must be specified.

Note:
Topic names are converted to upper case.

<item_value_list> has the following syntax:

{ITEM=<item>[=<value>] } ...

where <item> is the name of an item and <value> the value of the item.

Notes:

  1. Items can be defined either with a value or without a value.
  2. Unlike topic names, item names and item values are not converted to upper case.
  3. adaini does not check whether the topics or items specified are really used by Adabas, and whether the item values specified are valid; adaini only guarantees the syntactical correctness of the configuration files.

Example

adaini mod topic=node_parameter topic=analyser item=ACTION=no

This command sets the item ACTION in the topic NODE_PARAMETER, subtopic ANALYSER to no, and hence deactivates AEO.

Deleting Information from a Configuration File

<del> is used to delete one or more items from a configuration file and has the following syntax:

DEL[ETE] <topic_list> <item_list>

<topic_list> is used in the same way as for <add>.

<item_list> has the following syntax:

{ITEM= *} | {ITEM = <item>} ...

where <item> is the name of an item. The specified items are deleted; if you specify '*', all items and the topic to which they belong are deleted.

Notes:

  1. In Unix shells, '*' is a special character, therefore you must precede it by a backslash or put it in quotes or double quotes.
  2. If you specify all items that belong to a topic explicitly, only the items are deleted, but the topic to which the items belong remains as an empty topic in the configuration file. In order to delete the topic as well, you must specify ITEM=*.

Example

adaini dbid=36 del topic=environment item=ADAHYX_4

This command deletes the environment setting for ADAHYX_4 and hence deactivates hyperexit 4.

Showing Information from a Configuration File

<show> is used to show one or more items stored in a configuration file and has the following syntax:

show [<format>] <topic_list> [<item_list>]

<format> has the following syntax:

FORMAT={ BAT | BSH | CMD | CSH}

If you specify FORMAT, statements for the specified shell are generated, which create an environment variable with the item names to be processed as name and the item values as values.

<topic_list> is used in the same way as for <add>.

<item_list> has the same syntax as for <del>. If ITEM=* has been specified, all items belonging to the topic specified are displayed; if <format> has not been specified, they are displayed in the format <item>=<value>, followed by a line feed. If items are specified explicitly by their name, these items are displayed; if <format> has not been specified, only the values of the items are displayed, followed by a line feed.

If <item_list> has not been specified, all items belonging to the topic are displayed; if format has not been specified, they are displayed in the format <item>=<value>. Subtopics are also displayed; the layout is shown in the following example.

Examples

The command

adaini show topic=db_list

might generate the following output:

[DBID_001]
  INI_FILE=C:\Program Files\Software AG\Adabas\db001\DB001.INI
  NAME=V33-DATABASE
  STRLVL=12
[DBID_001-END]

[DBID_002]
  AUTOSTART=V616
  INI_FILE=C:\Program Files\Software AG\Adabas\db002\DB002.INI
  NAME=P289591
  STRLVL=12
[DBID_002-END]

[DBID_003]
  INI_FILE=C:\Program Files\Software AG\Adabas\db003\DB003.INI
  NAME=DEFAULT-DATABASE
  STRLVL=15
[DBID_003-END]

[DBID_004]
  INI_FILE=C:\Program Files\Software AG\Adabas\db004\DB004.INI
  NAME=TEST-ICU
  STRLVL=15
[DBID_004-END]

[DBID_005]
  INI_FILE=C:\Program Files\Software AG\Adabas\db005\DB005.INI
  NAME=ADA618-DB
  STRLVL=15
[DBID_005-END]

[DBID_012]
  INI_FILE=C:\Program Files\Software AG\Adabas\db012\DB012.INI
  NAME=GENERAL_DATABASE
  STRLVL=15
[DBID_012-END]

[DBID_036]
  AUTOSTART=NO
  INI_FILE=C:\Program Files\Software AG\Adabas\db036\DB036.INI
  NAME=GENERAL_DATABASE
  STRLVL=15
[DBID_036-END]

[DBID_062]
  AUTOSTART=NO
  INI_FILE=C:\Program Files\Software AG\Adabas\db062\DB062.INI
  NAME=GENERAL_DATABASE
  STRLVL=16
[DBID_062-END]

The command

adaini dbid=36 show format=bat topic=backup item=BCK001 item=BCK002 item=BCK003

might generate the following output:

set BCK001=C:\Program Files\Software AG\Adabas\db036\BCK001.036
set BCK002=C:\Program Files\Software AG\Adabas\db036\BCK002.036
set BCK003=C:\Program Files\Software AG\Adabas\db036\BCK003.036 

Install Configuration Files: adainst

On PC platforms:

Usage: adainst <dbid>

If <dbid> is missing and ADABAS.INI does not exist in %ADADATADIR%\etc, adainst creates %ADADATADIR%\etc\ADABAS.INI.

The following steps are done by this script:

  • create directory %ADADATADIR%\etc

  • copy the template file %ADAPROGDIR%\ADABAS.INI to %ADADATADIR%\etc\ADABAS.INI if this does not yet exist.

  • if %ADADATADIR%\etc\ADABAS.INI did already exist, check whether it already contains the topic NODE_PARAMETER and the DB_PARAMETER subtopic of the DB_DEFAULTS topic. If not, copy from the template.

  • substitute the following values if required:
    NODE_NAME in topic MISCELLANEOUS
    LOG_FILE in subtopic LOGGING within topic NODE_PARAMETERS.

If <dbid> is specified and the topic DBID_<dbid> does not exist in ADABAS.INI, adainst creates %ADADATADIR%\db<dbid>\DB<dbid>.INI. The following steps are done by this script:

  • read the topic DB_DEFAULTS from ADABAS.INI and copy it to DB<dbid>.INI.

  • search for assign.*sh and adanuc.*sh files in the directory %ADADATADIR%\db<dbid> and copy container definitions into the topic CONTAINER

  • search for adanuc.*sh files in directory %ADADATADIR%\db<dbid> and copy nucleus parameters into the topic NUCPARMS

  • ask for user names in the topic ACTION_DBA

  • display enabled/disabled actions

  • use adarep dbid=<dbid>summary to get the database name and insert the item NAME into the topic DBID_<dbid> of ADABAS.INI

On UNIX:

Usage: adainst <dbid>

If <dbid> is missing and ADABAS.INI does not exist in $ADADATADIR/etc, adainst creates $ADADATADIR/etc/ADABAS.INI.

The following steps are done by this script:

  • create directory $ADADATADIR/etc

  • copy the template file $ADAPROGDIR/ADABAS.INI to $ADADATADIR/etc/ADABAS.INI if this does not yet exist.

  • if $ADADATADIR/etc/ADABAS.INI did already exist, check whether it already contains the topic NODE_PARAMETER and the DB_PARAMETER subtopic of the DB_DEFAULTS topic. If not, copy from the template.

  • substitute the following values in the copied file:
    NODE_NAME in topic MISCELLANEOUS
    LOG_FILE in topic LOGGING (NODE_PARAMETER).

If <dbid> is specified and the topic DBID_<dbid> does not exist in ADABAS.INI, adainst creates $ADADATADIR/db<dbid>/DB<dbid>.INI. The following steps are done by this script:

  • read the topic DB_DEFAULTS from ADABAS.INI and copy it to DB<dbid>.INI.

  • search for assign.*sh and adanuc.*sh in the directory $ADADATADIR/db<dbid> and copy container definitions into the topic CONTAINER

  • search for adanuc.*sh files in directory $ADADATADIR/db<dbid> and copy nucleus parameters into the topic NUCPARMS

  • ask for user names in the topic ACTION_DBA

  • display enabled/disabled actions

  • use adarep dbid=<dbid>summary to get the database name and insert the item NAME into the topic DBID_<dbid> of ADABAS.INI

Kill Database: adakill

Usage: adakill <dbid>

adakill stops the Adabas nucleus for the database <dbid> as follows:

  • (PC platforms:) by sending an interrupt (CTRL/BREAK). The parameter <dbid> must be specified.

  • (UNIX:) with UNIX signal 15. The parameter <dbid> must be specified.

Warning:
This command should only be used if adastop with the option ABORT is not able to stop the nucleus. Adabas will write a memory dump and will perform an AUTORESTART at the next startup.

The following steps are done by this command:

  • get the process ID for adanuc

  • send interrupt

Show Log File: adalog

Usage: adalog [<dbid>] [-t]

adalog displays the Adabas log file.

If <dbid> is specified, all entries for this database are displayed. If <dbid> is not specified, entries of all databases are displayed. If the option -t is used, adalog displays the end of the log file and continuously appends new lines from the log file to the display.

Write A Message To The Log File: adamsg

Usage: adamsg DBID=<dbid> PID=<process ID> UTILITY=<utility name> MESSAGE=<message ID> TEXT=<message text>

The following message IDs are supported:

  • ABORTED

    For this message ID, TEXT contains the abort reason.

  • INCNUCP

    For this message ID, TEXT=nucleus parameter=<parameter>, current size=<current size>, new size=<new size>. This option is used in the action ada_inuc (increase nucleus parameter).

  • INP

    For this message ID, TEXT=parameter assignment.

  • STARTED

    For this message ID, TEXT is empty.

  • TERMINATED

    For this message ID, TEXT is empty.

adamsg is the interface from batch files to the Adabas log file. Every batch file (as well as AEO actions) may use this interface to log messages. The order of the parameters is free, except that the TEXT parameter must be last in the parameter list. All parameter values except the TEXT parameter will be converted to upper case.

Example:

adamsg DBID=77 PID=4711 UTILITY=my_uti MESSAGE=ABORTED TEXT=file abc is empty

will generate following message line at the end of the log file:

004711 <date + time> 00077 <user name> %my_uti-F-ABORTED, file abc is empty

Furthermore, the ID of the current user (if available) is inserted into the ACTION_DBA topic.

Define Default Database: adaset

Usage (PC platforms): [CALL] adaset <dbid>

Usage (UNIX): adaset <dbid>

adaset defines the following environment variables:

  • ADADBID=<dbid>This is the default database ID.

  • (PC platforms:) ADADBDIR=%ADADATADIR%\db<dbid>
    (UNIX:) ADADBDIR=$ADADATADIR/db<dbid>This is the database working directory of the default database.

On PC Platforms

In addition, adaset expands the PATH variable as follows:

PATH=%ADAPROGDIR%;%ADAPROGDIR%\tools;%PATH%

Note that the CALL command must be used when adaset is executed from a batch file rather than from a command prompt.

On UNIX

In addition, adaset expands the PATH variable as follows:

PATH=$ADAPROGDIR:$ADAPROGDIR/tools:$PATH

In a C shell context, adaset is an alias that is created by a call of adaset.csh. In a Bourne shell context, adaset is a function that is created by a call of adaset.bsh. Before you use adaset, you must issue one of the following commands:

. $ADATOOLS/adaset.bsh  (Bourne shell)
source $ADATOOLS/adaset.csh (C shell)

These statements are already executed by adaenv.bsh (Bourne shell) or adaenv.csh (C shell).

Show Database(s): adashow

Usage: adashow [<dbid>] [-a]

adashow displays the following information for the database <dbid>:

  • Database ID : the value specified by ADADBID

  • Name : NAME in the topic DBID_<value in ADADBID>

  • Version : Obsolete

  • Config. File : INI_FILE in the topic DBID_<value in ADADBID>

  • Status : either ONLINE, OFFLINE or ERROR

If <dbid> is missing, adashow displays the information for the default database specified by the environment variable ADADBID.

If the option -a is used, adashow displays the database ID, name, version and status for all configured Adabas databases on this node which are found in section DB_LIST in Adabas.INI.

Start Database: adastart

Usage: adastart [<dbid>]

adastart starts the Adabas database <dbid>. The first time it is called, it creates the nucleus log file adanuc.log, on subsequent calls the nucleus log is saved with a time stamp, i.e. adanuc.log.timestamp.

On PC platforms:

The following steps are performed by this script:

  • check if the nucleus is already online

  • start the nucleus using the utility named Adabas which reads the nucleus parameters from DB<dbid>.INI

  • wait until the nucleus is online or an Adabas error occurs.

On UNIX:

The following steps are performed by this script:

  • read the nucleus parameters from DB<dbid>.INI and write them into the file $ADADBDIR/nucparms.<dbid>

  • check if the nucleus is already online

  • if the environment variable ADANUCLOGOLD is defined as "COPY", and the nucleus log of the previous session exists (file name $ADADATADIR/db<dbid>/adanuc.log), the nucleus log is copied to $ADADATADIR/db<dbid>/adanuc.log.old.

  • if the environment variable ADANUCLOGOLD is defined as "APPEND", and the nucleus log of the previous session exists (file name $ADADATADIR/db<dbid>/adanuc.log), the nucleus log is appended to $ADADATADIR/db<dbid>/adanuc.log.old.

  • start the nucleus using the parameter file $ADADBDIR/nucparms.<dbid>

  • wait until the nucleus is online or an Adabas error occurs.

Stop Database: adastop

Usage: adastop [<dbid>]

adastop stops the database <dbid>. If <dbid> is missing, adastop stops the default database specified by the environment variable ADADBID.

The following steps are done by this script:

  • check if the nucleus is online or offline

  • read the topic definition TERMINATE_ADANUC from DB<dbid>.INI

  • take the defined shutdown options as defined in the topic and wait for the defined time intervals for the nucleus to stop