C.9 SQL Expiration Command Variables

The following table lists the variables that can be used with expiration commands in the MySQL Channel object’s SQL Expiration Commands property. For information on the SQL Expiration Commands property, see MySQL Channel Object.

IMPORTANT:When using SQL expiration command variables, remember the following:

  • SQL expiration command variables are case sensitive.
  • All variable strings must be preceded by a dollar sign ($).

Variable

Description

Novell Audit Custom Variables

T

Novell Audit’s default table schema.

l

The table name defined in the MySQL Channel object configuration.

e

The CREATE TABLE Options defined in the MySQL Channel object configuration.

Date Formatting

The date format can be tied together (for example, $Y$M$D).

Y

Year (four digit)

y

Year (two digit)

M

Month (two digit)

D

Day (two digit)

h

Hour (two digit)

m

Minute (two digit)

s

Second (two digit)

n

Now. This value displays as yyyymmdd.

C.9.1 Sample SQL Expiration Command Script

In the following example scripts, note that l is the letter L as in lion.

Creating and Renaming a Table

create table newtable ($T) $e;RENAME TABLE $l TO l$n, newtable TO $l

This script does the following:

  1. Creates a new table using the CREATE TABLE Options.
  2. Renames the current table so it includes the date and time in decimal.
  3. Renames the new table with the default table name.

Deleting the Contents of a Table

truncate table $l;

This script deletes the contents of the table.