Manage/Purge Audit Data

ApexSQL Audit provides a form for purging data automatically from the Audit log if you want to manage the size of this table and your database. To open this form click on "Manage Audit Data" from the Outlook Bar, Audit Menu or Toolbar as shown here:

image151.gif

AuditMenu-ManageAuditData.jpg

 

 

image240.jpg

The functionality consists of basically 3 steps: you can delete all audited data, you can delete audited data based on a deletion criteria or you can create and schedule data deletion job.

image249.jpg

I want to Delete All Data now

If you want to delete all your audited data and clean up Audit Storage tables choose this option and hit image63.gif button. This will show a warning dialog:

image389.jpg

After your confirmation all data will be deleted.

I want to Delete Data Now Based on Data Deletion Criteria Below

Choosing this option will enable Data Deletion Criteria in the dialog.

Delete Data by Age option allows you specifying the age of data to be deleted by. You may select a time period: Days, Weeks or Months and input an integer number of the periods.

Delete Data by Log Size option allows you to limit a row count of the Log. The excess rows will be deleted. Data is deleted on a FIFO basis - First In First Out - so only the oldest rows are deleted.

Delete All Data option allows you cleaning up of the Audit Storage tables.

After setting up Deletion Criteria you should hit image150.gif button to start the deletion process.

I want to Create and Schedule a Job to Delete Data Later Based on Data Deletion Criteria Below

To create a schedule job to run your Data Deletion task in the future you need to specify a job name to be created, for example MyJob1.

After you have entered in all of the necessary information - click image145.gif.

image390.jpg

You will see a schedule dialog like this.

image124.jpg

Enter in your desired schedule and click image146.gif.

tip.jpg

 

Tech Tip:

 

The job has not yet been run and will not be run unless it is time to be run by the scheduler or you run it manually through ApexSQL Audit itself.

 

image125.jpg

 We can now see that our new job "MyJob1" has been successfully created:

image391.jpg

Managing Saved Jobs

The Saved Jobs grid lists all jobs found on your server. Let’s choose the created MyJob1 job in the list. We can right click on the job or click the image147.gif button to see the job properties. This is what we will see.

image392.jpg

This dialog shows us the actual SQL that will be run. It is a procedure created when the Architecture profile was run. It has not been run yet so its "Last Run Outcome" property is Unknown.

So let's run the job directly through the application interface. We can right click on the job and select "Run Job" or click image148.gif.

You will see this warning dialog if your SQLAgent is not running on your server:

image393.jpg

In case of enabled SQLAgent you will hopefully see a dialog that indicates the job was run successfully.

image394.jpg

At this point you can check the history of the job by clicking image149.gif. Here you can see when the job was run and any server messages. You can check back over time to monitor the history of a schedule job that may be executed frequently over time.

image250.jpg

Buttons

Button

Description

image63.gif

Deletes all your audited data and cleans up Audit Storage tables. A warning will be displayed before deletion.

 

 

image150.gif

Runs the deletion process. See more information here.

 

 

image145.gif

Creates a job using the selected criteria.

 

 

image64.gif

Displays the History dialog for the selected job.

 

 

image147.gif

Displays the Properties dialog for the selected job.

 

 

image60.gif

Refreshes the whole job list with its status.

 

 

image65.gif

This will schedule the selected job. The Job Scheduler dialog displays.

 

 

image66.gif

This will delete the selected job(s). A warning will be displayed before deletion.

 

 

image148.gif

This will run the selected job.

 

 

image238.gif

This will open the help file.

 

 

image45.gif

This will close the dialog.

 

 

image256.gif

This will cancel performed actions and close the dialog.

 

 

image257.gif

This will delete the job's history. A warning will be displayed before deleting.

 

 

Context Menu

All the buttons in the dialog related to the job list are duplicated in the context menu:

Icon

Name

Description

image255.gif

Run Job

Runs the selected job.

 

 

 

image58.gif

Refresh

Refreshes the whole job list with its status.

 

 

 

 

Schedule

Schedules the selected job.

 

 

 

 

History

Displays the History dialog for the selected job.

 

 

 

image203.gif

Select All

Selects all saved jobs.

 

 

 

image204.gif

Un-Select

Deselects the selected job(s).

 

 

 

 

Properties

Displays the Properties dialog for the selected job.

 

 

 

image205.gif

Delete

Deletes the selected job(s).