Salesforce

Truncating an Audit Area or Tablemove Audit Tables fails

« Go Back

Information

 
TitleTruncating an Audit Area or Tablemove Audit Tables fails
URL NameP164421
Article Number000153503
EnvironmentProduct: OpenEdge
Version: 10.1x, 10.2x, 11.0x, 11.1x, 11.2x
OS: All supported platforms
Question/Problem Description
Audit Areas cannot be Truncated and Audit Tables cannot be Tablemoved
Truncating an Audit Area with PROUTIL -C TRUNCATE fails with error 13683
Tablemove Audit schema with PROUTIL -C TABLEMOVE fails error 8605
Audit Area size cannot be reclaimed with PROUTIL utilities.
After AUDITARCHIVE without nodelete is run, the audit area cannot be resized.
Steps to Reproduce
Clarifying Information
User truncating audit area with Audit Archiver privillege
After disabling auditing the audit area still cannot be truncated
AUDITARCHIVE script didn't run resulting in very large audit areas.
After audit data are archived the Audit Areas cannot be reduced in size
PROBKUP volumes are larger than needed due to Audit Area High Water Mark much higher than necessary
Error MessageERROR: The area you are attempting to truncate contains a schema <tbl/idx>: <name>. You must move this <tbl/idx> to another area first before truncating. (13683)
ERROR: The area you are attempting to truncate contains a schema table : _aud-file-policy. You must move this table to another area first before truncating. (13683)
ERROR: The area you are attempting to truncate contains a schema table : _aud-field-policy. You must move this table to another area first before truncating. (13683)
ERROR: The area you are attempting to truncate contains a schema table : _aud-event-policy. You must move this table to another area first before truncating. (13683)
ERROR: The area you are attempting to truncate contains a schema table : _aud-event. You must move this table to another area first before truncating. (13683)
ERROR: The area you are attempting to truncate contains a schema table : _aud-audit-policy. You must move this table to another area first before truncating. (13683)
ERROR: The area you are attempting to truncate contains a schema table : _aud-audit-data-value. You must move this table to another area first before truncating. (13683)
ERROR: The area you are attempting to truncate contains a schema table : _aud-audit-data. You must move this table to another area first before truncating. (13683)
The contents of LOB "_Old-blob-value" will be deleted.
The contents of LOB "_New-blob-value" will be deleted.
The contents of LOB "_Old-clob-value" will be deleted.
The contents of LOB "_New-clob-value" will be deleted.
User aborted truncation of storage area "Audit Data Area"

ERROR - moving table, _aud-audit-data [-300]. (8605)
Defect NumberEnhancement PSC00245376 / OE00222238
Enhancement Number
Cause
Prior to OpenEdge 11.3, Audit Storage Areas (eg "Audit Data" and "Audit Indexes") cannot be truncated or removed after audit data is exported or Auditing disabled.  This is because audit tables are classified internally by the database as 'Schema' tables just like _file, _field, metaschema. OpenEdge utilities will not allow the truncation of areas holding schema tables nor move schema tables to another area. In effect, the Auditing structure cannot be deleted and truncation of an audit area is not allowed. Auditing may be disabled but the auditing schema will remain unless the database is dumped and loaded.
Resolution
To prevent the audit areas from growing disproportionately on any audit enabled database, run PROUTIL AUDITARCHIVE at regular intervals.

Should the Audit Areas need re-structuring, upgrade to OpenEdge 11.3 or later where a new feature: "PROUTIL -C AUDITRECONFIG" allows Audit Data Areas to be reconfigured and physical disk space associated with audit trails to be recovered.

Apart from being able to purge all data from existing Audit Areas, the AUDITRECONFIG utility can also be used to split or combine index and data areas and set new records per block and blocks per cluster values by moving existing audit data and indexes to new TYPE II Storage Areas.  

To re-size the Audit Archive Storage areas with AUDITRECONFIG:

1. Ensure existing audit data is exported with PROUTIL AUDITARCHIVE, otherwise auditreconfig is going to delete all auditing records

2. Create new Type II Storage Areas to associate the audit tables with then use auditreconfig to restructure:
$ proutil <dbname> -C auditreconfig tablearea <new-table-area-name> indexarea <new-index-area-name> -user <Audit Data Archiver>

The operation will delete all auditing data records.
You must archive auditing data first.
Have you archived the data already and do you want to continue? (Y/N) (16987)
y
Auditreconfig started. (16973)
Reconfiguring tables ... (16979)
Auditreconfig completed. (16975)

3. Truncate the former audit data and index areas:
            $ proutil <dbname> -C truncate area <old-table-area-name>

4. Truncate the bi file:
$ proutil <dbname> -C truncate bi

5. Delete the extents on the old audit area(s) until all extents are deleted. Extents will be removed from the last extent to the first extent in the area.
$ prostrct remove <dbname> d "OE Audit Data"
$ prostrct remove <dbname> d "OE Audit Indexes"
 
For further clarification on the AUDITRECONFIG functionality, refer to the Documentation:
OpenEdge Data Management: Database Administration, Auditing, Reconfiguring Audit Areas
Workaround
Prior to OpenEdge 11.3, should the Audit Areas need re-structuring the only way to recover this space is to dump and load the entire database then re-enable auditing.
Notes
Keyword Phrase
Last Modified Date7/4/2024 11:52 AM

Powered by