11Audit Vault IBM DB2 (AVDB2DB) Utility Commands

Use the Audit Vault IBM DB2 Database (AVDB2DB) command-line utility to manage the relationship between Oracle Audit Vault an IBM DB2 source database and DB2 collector. When you run these commands, remember the following:

Enter the command in lowercase letters. The commands are case-sensitive.

On UNIX systems, when you open a new shell to run a command, first set the appropriate environment variables. See Section 2.2.2 and Section 2.2.3 for more information.

On Microsoft Windows systems, do not set any environment variables. Instead, run the command from the Audit Vault Server or collection agent ORACLE_HOME\bin directory.

Oracle Audit Vault creates a log file of AVDB2DB command activity. See Section A.1 and Section A.2 for more information.

Table 11-1 describes the AVDB2DB commands and where each is used, whether on the Audit Vault Server, on the Audit Vault collection agent, or in both places.

Issuing an AVDB2DB command generates the following log file: $ORACLE_HOME/av/log/srcname-db2db-#.log. The # is a generation number that starts from 0 (zero) and increases once the file size reaches the 100 MB limit.

11.2add_collector

The avdb2db add_collector command adds a collector for the given IBM DB2 source database to Oracle Audit Vault. Oracle Audit Vault verifies the source database for the collector requirements.

Where to Run This Command

Audit Vault Server:

UNIX: Set the appropriate environment variables, as described in Section 2.2.2.

Enter the source database name for which the collector is to be added. Remember that the source database name is case-sensitive.

Typically, the host is the fully qualified domain name or IP address of the server on which the IBM DB2 source database is running, and the port number is 50000.

-agentnameagentname

Enter the name of the collection agent that was created when you ran the avca add_agent command. (In most cases, this is the agent that you created when you installed the Audit Vault collection agent, as described in Oracle Audit Vault Collection Agent Installation Guide.)

If you are not sure of the agent name, then you can find it as follows: Log in to the Audit Vault Console, click the Configuration tab, and then click the Agent tab to display the Agents page. The name of the agent is displayed in the Agent column.

-collnamecollname

Create a name for the DB2 collector. Optional. If you do not create a name, Oracle Audit Vault names the collector DB2_Coll.

-descdesc

Enter a brief description of the collector. Optional.

Usage Notes

Run any collector-specific preparation scripts before you execute the avdb2dbadd_collector command.

The avdb2db add_collector command prompts for a user name and password. This user account must have privileges to run the IBM DB2 db2audit command (for example, a user who has the sysadmin privilege).

Example

The following example shows how to add an DB2 collector to Oracle Audit Vault on Linux and UNIX platforms.

Enter the name of the source database to which this collector belongs. Remember that the source database name is case-sensitive.

-collnamecollname

Enter the name of the collector to be modified.

attrname=attrvalue

Enter the attribute pair (attribute name, new attribute value) for mutable collector property and attributes for this collector type. This argument is optional.

Enclose the attribute value in double quotation marks. For multiple values, enclose the entire set in double quotation marks and separate each value with a space. For example:

...="value1 value2 value3"

Usage Notes

You can modify one or more collector attributes at a time. Table 11-2 lists the collector attributes, whether the parameter is mutable, its default value, and a brief description. You can enter these settings in any case; they not case sensitive.

Table 11-2 DB2 Collector Attributes

Attribute

Description

Mutable

Default Value

DESCRIPTION

The description for this collector

Yes

NULL

DBCONNECTION

Number of connections to the database

No

1

DELAY_TIME

The delay time (in milliseconds) of the collector

Yes

20000

NO_OF_RECORDS

The maximum number of records to be fetched by the collector

Yes

1000

SINGLE_FILEPATH

The location of the directory where the DB2 collector will look for files to collect audit records from, or the location to which the DB2 extraction utility writes the text files. Enter an absolute path only, not a relative path.

Yes

NULL

Examples

The following example shows how to alter the NO_OF_RECORDS attribute and the collector description for the DB2Collector collector in Oracle Audit Vault:

Enter the name of the source database to be modified. Remember that the source database name is case-sensitive.

attrname=attrvalue

Enter the attribute pair (attribute name, new attribute value) for mutable source properties and attributes for this source type. This argument is optional. Separate multiple pairs by a space on the command line. See Table 11-3 for more information.

Usage Notes

Table 11-3 lists the source database attributes, a brief description of the attribute, whether the attribute is mutable, and the default value. You can modify one or more source attributes at a time.

Table 11-3 Source Attributes

Attribute

Description

Mutable

Default Value

SOURCETYPE

The source type name for this source database. The default name is DB2DB.

No

NULL

NAME

The name for this source database.

No

NULL

HOST

The source database host name.

No

NULL

HOST_IP

The source database host IP address.

No

NULL

VERSION

The source database version.

Yes

NULL

DESCRIPTION

A new description for this source database.

Yes

NULL

PORT

A new port number for this system where the source database audit data resides

Yes

None

Example

The following example shows how to alter the DESCRIPTION attribute for the source database named db2db4 in Oracle Audit Vault:

Enter the name of the source database to which the collector (specified in the -collname argument) belongs. Remember that the source database name is case-sensitive.

-collnamecollname

Enter the name of the collector to be dropped from Oracle Audit Vault.

Usage Notes

The drop_collector command does not delete the collector from Oracle Audit Vault. It only disables the collector. The collector metadata is still in the database after you run the drop_collector command. If you want to recreate the collector, create it with a different name.

Example

The following example shows how to drop a collector named DB2Collector from Oracle Audit Vault:

Enter the name of the source database to be dropped from Oracle Audit Vault. Remember that the source database name is case-sensitive.

Usage Notes

The drop_source command does not delete the source database from Oracle Audit Vault. It only disables the source database definition in Oracle Audit Vault. The source database metadata is still in the database after you run the drop_source command. If you want to re-create the source database definition, create it with a different name.

You cannot drop a source database if there are any active collectors for this source. You must drop all collectors associated with the source database before you can run the drop_source command on it.

Example

The following example shows how to drop the source named db2db4 from Oracle Audit Vault:

Enter the source database connection information: host name and port number, separated by a colon.

Typically, the host is the fully qualified domain name or IP address of the server on which the IBM DB2 source database is running, and the port number is 50000. The database_name setting refers to the name of the DB2 source database.

Usage Notes

The avdb2db verify command checks the following:

Whether the version of the database is supported: Versions 8.2 through 9.5

Whether the source user has the required privileges in the source database that is to be registered with Oracle Audit Vault

Whether auditing is enabled in the source database

Whether the operating system on which the source database is running is supported

If you installed the collection agent on a Microsoft Windows computer and want to run the avdb2db verify command from there, run it from the ORACLE_HOME\bin directory. For UNIX or Linux installations, set the appropriate environment variables before running this command. See Section 2.2 for more information.

The avdb2db verify command prompts for a user name and password. This user account must have privileges to run the IBM DB2 db2audit command (for example, a user who has the sysadmin privilege).

Example

The following example verifies that the source database is compatible with the DB2 collector on a Linux or UNIX system.