The audit database is stored in tables that use row-level security. Each row is given a label derived from combining the label of the user who is doing the action and the audit categories associated with that user. The label of the user is used so that someone who views the audit data is able to see the original data as well, since what is captured for the operations might contain some of the original data.
Access to the data is restricted by adding in audit categories, which can prevent the user that is doing the action from viewing the audit data. It also allows the audit data to be partitioned among auditors.
There can be two IBM® Netezza® systems, the source system where the audit data is captured, and the target system, where the audit data is stored. These systems can be the same system.
/nz/kit/bin/adm/nzhistcreatedb [options]
| Option | Description |
|---|---|
| -d | --db= [DBNAME] | The name of the history database to create. |
| -n | --host=[HOST] | The host name of the target Netezza system. The host name is also specified in the NZ_HOST variable. |
| -t | --db-type=[DBTYPE] | The type of database to create. You can specify q (or Q or query) to create a query history database, or a (or A or audit) for an audit history database. For more information on query history databases, see the IBM Netezza System Administrator’s Guide. |
| -o | --OWNER=[USER] | An existing database user account which will be made the owner of the history database. The specified user account must have Create Database privilege. The default is NZ_USER. You cannot specify the admin user account. If you specify a different account for the -o and -u arguments (owner and user), the specified owner account must be granted List privileges on the User class. |
| -p | --pwd=[PASSWORD] | User flag that is the password of the user on the target Netezza system. The password is also set in the NZ_PASSWORD variable. |
| -v | --schema=[VER] | The schema version of the history database to be created. Starting
in Netezza Release
4.6, the number is 1. In Release 7.0.3, the version number changed
to 2 to support multiple schemas and other changes. In Release 7.1,
the version number changed to 3 to support scheduler rules and client
information fields. You could create a version 1 or 2 database for
backward compatibility, but it is highly recommended that 7.1 or later
systems use version 3 to capture the most accurate history information. The version must match the version number specified for the active history configuration; otherwise, the loader process will fail. |
| -h | --help | Display the help text. |
| -u | --USER=[USER] | The user name on the target system used to load audit data to the database. The command configures privileges to allow the user to write to the audit database, but not to read from it. |