Cleaning up the History Table - Teradata SQL Assistant

Teradata® SQL Assistant for Windows User Guide

Product
Teradata SQL Assistant
Release Number
16.20
Published
October 2018
Language
English (United States)
Last Update
2020-01-03
dita:mapPath
gfk1537201040714.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2430
Product Category
Teradata Tools and Utilities

Delete specific History rows by highlighting them in the History window and pressing Delete.

Use the Cleanup History dialog to delete a large number of rows. Specify which rows to delete based on criteria such as the date on which the query was executed and the data source against which the query was executed.

If multiple criteria are entered, only the rows matching all the criteria are deleted.

The Cleanup History dialog can also be used to delete all duplicate rows from the History table. Rows are considered to be duplicate if both the data source and the SQL text are an exact match. This option is independent from the criteria specified above.

This function can take a long time if there are many rows in the History table.

The current history database will be saved as OldHistory.mdb before any rows are deleted. If rows were unintentionally deleted, the deleted rows can be restored by:
  • Closing SQL Assistant
  • Deleting SQLHistory.mdb
  • Renaming OldHistory.mdb to SQLHistory.mdb

Refer to the File Paths tab of the Options dialog to locate the history files.

  1. Right-click in the History window and select Cleanup History.
  2. Set the cleanup criteria as needed.
    Option Description
    Date

    Enter a date or click the down arrow to display a calendar to select.

    Place a filter operator (>, <, =) in the operator box.

    Data Source Enter a data source name.
    User Name Enter a user name.
    SQL Text

    Enter text that appears within the SQL Text of the rows to be deleted.

    See also Using Wildcard Characters with the History Filter.

    Notes

    Enter text that appears within the Notes of the rows to be deleted.

    See also Using Wildcard Characters with the History Filter.

    Queries that failed Select this check box to delete all rows that display an error code.
    Rows with an empty Notes column Select this check box to delete all rows that do not have a Note assigned.