Adding custom tables


You can define custom tables and load them with your data in the BMC AMI Security Policy Manager database. After you load the data sets, you can query the tables from the compliance rules.

Related topic

To import a custom data set

  1. Create a data set with the SQL data for import. The data set requires the following properties:

    • Sequential data set
    • Fixed-block record format
    • User-defined record length
    • User-defined block size
    • User-defined data set size

    Within this data set, observe the following guidelines:

    • Make sure the SQL lines end with a semicolon (;).
    • Use two hyphens (--) at the beginning of a line to mark a comment.
  2. In the SPMParms parameter group, enter ImportDataset datasetName.
    Replace datasetName with then name of the data set created in the previous step.
    For more information, see Security Policy Manager parameters and IMPORTDATASET.

    Note

    To use the ImportDataset command, make sure that you have READ access (or higher) to the BMC.RSS.SPMIMPRT security management resource, which is in the FACILITY class by default.

The following code displays sample SQL data from a custom data set, as defined in Step 1:

***********************************************************
BEGIN TRANSACTION;

DROP TABLE IF EXISTS customtable;

-- Create a test table
-- to test custom table import
CREATE TABLE customtable ( access CHAR(1) NOT NULL,
 value CHAR(8),
 numeric INTEGER);

INSERT INTO customtable    VALUES( "R", "READ", "3");
INSERT INTO customtable    VALUES( "U", "UPDATE", "5");
INSERT INTO customtable    VALUES( "A", "ALTER", ”6");
INSERT INTO customtable    VALUES( "C", "CONTROL", ”4");
INSERT INTO customtable    VALUES( "N", "NONE", "1");
INSERT INTO customtable    VALUES( "E", "EXEC", "2");
INSERT INTO customtable    VALUES( "T", "TRUST", ”7");

END TRANSACTION;
**********************************************************

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*