Disabling the Audit Trail package activity in ClearQuest

Technote (FAQ)


Question

How can you disable the logging activity of the Audit Trail package in IBM® Rational® ClearQuest®?

Cause

There are some situations where the Audit Trail field needs to be disabled. This includes a situation where "bad" data, such as characters that are outside of the code page, need to be removed without the Audit Trail log recycling the offending characters. This might also be desired if there is a performance problem with your schema.

As described in the AuditTrail and eSignature packages user guide on IBM developerWorks, this package cannot be removed from a ClearQuest schema after it is applied. However, there is an available customization for disabling the capture of Audit Trail data.

It is recommended that these operations are performed in test or clone environment before attempting with production.

Note: While this does provide a way to stop auditing of new and existing records, it does not delete the audit trails already in the database. This means if you have a record with large audit trail, there will still be a performance impact when loading the entity even after the package is disabled. AuditTrail records are loaded (like History) every time an action is performed on the parent record.


Answer

The 1.0 version of the Audit Trail has information on disablement in the package in the Commit hook of the at_Base BASE action. A Perl global script named at_IsDisabled with a function atCust_SuppressAuditTrailRecord must be created based on these instructions:

  1. Create a new Global script in the Perl Folder called at_IsDisabled.
  2. Copy the contents of the at_IsDisabled script below, place it in the new Global script.
  3. The return value controls if the Audit Trail is disabled or not. Returning 1 will disable the package, returning 0 will not.
  4. Check in your schema and upgrade . The Audit Trail feature will then be disabled if you have appropriately coded the script.

1.0 - at_IsDisabled script

 sub atCust_SuppressAuditTrailRecord {

     my($session, $entity) = @_;
     return 0;
  }


Disabling the Audit Trail field with 1.0 was known to be problematic. The updated Audit Trail 1.1 package introduced two new extensions to the package, eSigCust_Disable_eSignature and atCust_Disable_AuditTrail. This new package is only available for the ClearQuest 7.0 release or higher.

To disable the Audit Trail package, create a new global script using the following steps:
  1. Create a new Global script in the Perl Folder called my_IsDisabled.
  2. Copy the contents of the updated my_IsDisabled script below, place it in the new Global script.
  3. Check in your schema and upgrade . The Audit Trail feature will then be disabled.
  4. This is essentially the same as the code provided in the at_IsDisabled Script. To re-enable the package, change the return value from 1 to 0.

The edited code is as follows:

Updated my_IsDisabled script for Audit Trail 1.1+

# Start of Global Script my_IsDisabled
# To disable the package, add this function in a global hook within the

# schema :
  sub atCust_Disable_AuditTrail {
      return 1;
  }

 {
  my $disabled = 0;
  eval {
      $disabled = atCust_Disable_AuditTrail();
  };
  return $disabled;
 }
 # End of Global Script my_IsDisabled


Note: It is also possible to exclude specific from AuditTrail data capture. See the AuditTrail and eSignature packages user guide on IBM developerWorks for more information.



BACKING UP FILES

Always make new database back-ups of your schema repository and user databases prior to making schema changes and performing database upgrades. Failure to create back-up copies can limit your ability to recover from a an upgrade failure, design change issues or other unforeseen failures.

Disclaimer

All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.


Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Rational ClearQuest
Designer - Packages

Software version:

7.0, 7.0.0.1, 7.0.0.2, 7.0.0.3, 7.0.0.4, 7.0.0.5, 7.0.0.6, 7.0.0.7, 7.0.1, 7.0.1.1, 7.0.1.2, 7.0.1.3, 7.0.1.4, 7.0.1.5, 7.0.1.6, 7.1, 7.1.0.1, 7.1.0.2, 2003.06.00, 2003.06.13, 2003.06.14, 2003.06.15, 2003.06.16

Operating system(s):

Windows

Reference #:

1252712

Modified date:

2009-09-25

Translate my page

Machine Translation

Content navigation