Use the DADB utility to convert the run-time version of an autoaction database into its source-file (text) format. This utility is most commonly used when you need to make a change to your database, but no longer have a copy of its source file.
DADB:
Recreates the source file for an autoaction database.
Adds useful comments, such as mapping the positions of the pattern tokens.
Adds source syntax you did not specify but for which BADB used defaults (such as token text).
Provides a debugging aid to ensure that what you entered was correctly stored in the autoaction database.
DADB Input
Input to DADB is the run-time version of an autoaction database. The run-time version of this file has the file extension .asp for an SP-AMS database, .acp for a CP-AMS database, and .ams for a SMART AMS database.
DADB Output
The output produced by DADB is the text version of your autoaction database. By default, the text version of this file has the file extension .bld. Text files produced by DADB do not contain comments that were included in the original source. However, it can add its own comments as described in Appendix E.2. DADB cannot re-create empty groups or the text associated with PASSWORD actions.
After DADB terminates, you can check its exit status for errors. When DADB has executed without errors, its exit status is zero. One or more errors cause the exit status to be nonzero. Warnings do not affect the exit status.
DADB errors and warnings are described in Appendix E.
Starting DADB
From the Windows Start menu, select Programs, Operations Sentinel x.y.z, Automation Tools, Dump AMS Database.
A command prompt window appears, positioned to the folder containing the DADB program (installation-folder\spo\bin). Abbreviated instructions for calling DADB are displayed in this window.
At the command prompt, enter the following command:
dadb [option...] database-name [outfile]
where option can include any of the following:
-c[0|1|2]
adds comments to the output file that provide information about token numbering and message delimiters. The optional n specifies the level of comments to add. Level 1 is the default and provides information about token numbering and message delimiters. Level 2 also dumps database objects in hexadecimal format.
-h
adds comments to the output file with information about the database name, internal revision level, and last update time.
-l
produces a listing. This causes DADB to write commands to the standard output device instead of to the outfile file. The command window is the standard output device, unless you redirect the output to a printer or an alternate file.
-s[nnnn]
sets the maximum length of DADB output lines. nnnn is a decimal number between 70 and 3000 that specifies the maximum number of characters to allow per line. When you include the -s option without specifying a number, the default value is 3000 characters. If you do not specify the -s option, the line length defaults to 128 characters.
database-name
[SP-AMS]
a legal database name is 1 to 128 characters, and cannot include slashes, backslashes, and a space or any character not allowed in a file name. SP-AMS database names are case sensitive.
AMS uses the database name as part of the file name for the database. When you define your database name, use only characters that are valid in a file name.
[CP-AMS] a legal database name is 1 to 255 characters, and cannot include characters not allowed in a file name. CP-AMS database names are case-insensitive.
[SMART AMS] a legal database name is 1 to 8 characters (letters, digits, and hyphens). SMART AMS database names are not case sensitive.
outfile
is the name of the file where the BADB commands are written. DADB does not add an extension to this file name if you do not specify one. If you do not specify outfile, DADB writes the BADB commands to a file with the same name as database-name, but with the .bld extension.
Examples of DADB Processor Calls
When the command prompt window is positioned at the folder that contains the DADB executable, you can execute DADB with a command like this:
dadb -c -h -s -1 c:\mypath\testdb
To execute DADB outside the folder that contains it, set the environment variable PATH to the folder containing DADB, then call DADB without specifying the path containing it. For example:
PATH=C:\spo\spox.y.z\spo\bin
dadb -cu -1 testdb
where x.y.zis the Operations Sentinel level.
In the following example, DADB examines the SP-AMS database in the file testdb.asp and produces an output text file, testdb.bld, containing BADB commands:
dadb testdb.asp
In the following example, DADB writes all output to the standard output device, including the database header, comments, and command syntax for all patterns defined for database testdb.asp. In this example, DADB does not create an output file.
dadb -l -h -c testdb.asp
In the following example, DADB writes all output to the file TestDatabase.bld. DADB ensures that no output lines are longer than 80 characters.
dadb -s80 TestDatabase
In the following example, for all patterns defined in the CP-AMS database in file test.acp, DADB writes output to a file named out.
dadb -c test.acp out
Example Using DADB
The following example shows how to use DADB. The database specified is a sample database created from BADB commands.
>dadb -c -s80 test Dump AMS DataBase (DADB) -- I0004: Maximum output line size set to 80 characters (s option). I0002: Writing BADB command syntax to file 'test.bld'. END of Dump AMS Database (DADB) Errors - 0 Warnings - 0
Use a text editor to examine the contents of the new file test.bld created by DADB:
DEFINE VARIABLE "Severity" TYPE STRING DEFAULT "" END /* Messages for group "UNIX-EVENTS" */ DEFINE "UNIX-EVENTS" 1 MESSAGE "Alert on/off" /* --1--*--2--- */ TYPE ANY-SENDER OTHER PRIORITY 128 TOKEN KEYWORD 1 "ALERT" CONSTRAINT (^\_TOKEN2\ = "ON" │ ^\_TOKEN2\ = "OFF") IF ^\_TOKEN2\ = "ON" SET severity = "major" ELSE SET severity = "clear" ENDIF ACTION EVENT-REPORT \ "TYPE = AL │ CLASS = host │ INSTANCE = \_HOSTID\ │ " \ "SEV = \severity\ │ APPL = sp-ams-database │ APPLQUAL = spastart │ " \ "ALERTID = alert1 │ TEXT = Alert from spastart database" END
DEFINE "UNIX-EVENTS" 3 MESSAGE "Log message" /* -1-*---2--- */ TYPE ANY-SENDER OTHER PRIORITY 128 TOKEN KEYWORD 2 "MESSAGE" TOKEN FIXED 1 "LOG" ACTION EVENT-REPORT \ "TYPE = LG | CLASS = host | INSTANCE = \_HOSTID\ | " \ "APPL = sp-ams-database | APPLQUAL = spastart |" \ "TEXT = log message from database spastart" END