FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

33
FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance

Transcript of FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Page 1: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

FireRMS SQL Audit, Archiving & PurgingPresented by Laura Small

FireRMS Quality Assurance

Page 2: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Control Your Data

SQL Audit: Track who made changes in FireRMS, when the changes were made, and view the History trail.

SQL Archive: Keep your Database running fast while retaining copies of old data.

SQL Purge: Delete obsolete records if required to meet State or Local Requirements

Page 3: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

SQL Audit

FireRMS SQL Audit lets you track changes made to the Database including:

• Logons and Logouts

• Record Creation

• Record Updates

• Record Deletes

Page 4: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

SQL Audit Setup

Launch SQL Utils

Select your Database and Lock it. The Audit Management tab – fifth tab from the left -- will become available.

Page 5: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

SQL Audit Setup

On the Audit Management tab, enter the path for where the Audit Database should be created and stored.

Do not enter a database name, the name will be automatically set based on your current FireRMS database name.

Click Create Audit Database when ready.

Page 6: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

SQL Audit Setup

After the Audit database has been created, the tab will display Options related to the Audit Function.

Page 7: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

SQL Audit Options

To audit every change and update made in the FireRMS database, click on the Enable Auditing checkbox on the Audit Mgt. tab in SQL Utils.

To audit only fields that are important or required for your agency, enable the the System Setting ‘Audit by Field’ in FireRMS and then select the fields to be audited.

You may enable the Audit by Field option in FireRMS before setting up Auditing in SQL Utils.

Page 8: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

The Audit By Field option

There are two methods you can use to designate which fields will be audited when using this option:

Method 1: Use Design Mode. While in design mode, right click on each field you want to audit, then click on the Audit Field checkbox

When all fields have been selected in FireRMS, return to SQL Utils and click on the Update Audit Fields button.

Page 9: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

The Audit By Field option

Method 2: Select the fields per Table in SQL Utils.

On the Audit Management tab, click on Audit Field Chooser to open the Table view

Select the table to show a list of all fields (columns) in that table. Click on the checkboxes to select each field to be audited. This example is a list of fields in the Apparatus table.

When all fields have been selected, click on the Update Audit Fields button located on this tab.

Page 10: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Viewing Audit Records

The SQL Audit Viewer program is available as a free Add On option for FireRMS.

The install program is included with the FireRMS CD-Rom or you may request a copy from Customer Support.

To view your audited Data, install the program to your FireRMS program directory, then run the program SQLAudit to bring up the Audit Viewer.

When you launch the program, it will use the current ODBC connection for your FireRMS database to determine the proper name and location of the Audit Database to access.

You must have a valid FireRMS logon to access the Audit Viewer.

Page 11: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

The Audit Viewer

Page 12: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Changes in FireRMS

Users will make changes to Incidents or Other data in FireRMS. In this example, a user is changing the Incident Type code from 111 – Building Fire to 113- Cooking Fire

Page 13: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Show in the Audit Viewer

Select any row from the Grid to view the History of the change – what changed, who changed it – and when.

Page 14: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

The Audit ViewerAfter selecting any row, click on Display History Trail to view the Audit History.

Record 1 shows the original value (111). Record 2 shows the new value (113).

The ID of the user who made the change was ‘LS’ and the change was made on 4/29/2011.

Page 15: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Selecting Records to Review

Filter the list of audit records by selecting specific tables and fields you want to review.

In this example, the Incident Type field from the Incident Table has been selected.

Page 16: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Filter Options

After selecting the filter options, click Find Matching Audit Entries to update the grid to show only changes to the Incident Type field:

Page 17: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Saving Audit Records

You may choose to export your Audited Data to other programs for further analyses and review. Use the Export option to choose your format and fields.

If you have Filtered the data to display only certain types of updates, only the Filtered results will be included in the export.

Clear all filters, then click the ‘Find Matching Entries’ button to export all records in the Audit databse.

Page 18: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Clearing Audit Records

Over time, your audit database will grow. It will hold data from previous years that may no longer be relevant. Searches will take longer. You can archive and/or remove old Audit data if desired.

The File Management option on the Audit Mgt tab in SQL Utils allows you to Save, Remove or Retrieve data from the Audit Database.

Data saved to a file is formatted so that it may be re-imported into the Audit Database if there is a need to review it again in the future

Page 19: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

What is SQL Archive

The SQL Archive option allows you to save or move copies of FireRMS Records to another database that you can access as a read only version of the data.

Record types that may be archived include: Rosters*, Incidents, Training and Other Entries.

Unlike creating a SQL backup which has to be restored to access the data, saving records to the Archive Database means they are always available to members of your staff for instant access and review.

All records saved to the Archive Database are saved as read only records.

The archive database may be accessed by users who should not have change/write access or just as a handy method to review older data.

(*) Rosters are archived with Incidents, based on the date range selected.

Page 20: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

When creating the Archive, or on any scheduled basis, you may choose to either Copy or Archive (remove) the completed records from your Live FireRMS database tables.

Archiving records does not remove them from your database, it moves them from the active tables to a set of Z_Archive tables as exact copies of the original table data.

The option to Archive data is primarily useful in departments with records that go back 10 years or more, allowing them to save off data older than 10 years into the read only database, for example, while keeping the more current records in the active database.

The option may also be useful for departments that have a high volume of incidents – allowing them to keep current only data available for updates while saving historical data as read only records.

What does SQL Archive Do?

Page 21: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Using SQL Archive

Use the default path or set your own. Do not add any database name. The archive database will use it’s own automated naming structure – which is, simply, the name of your current database with an added “_Archive” extension. Click on Enable to start up the option.

Page 22: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Remove or Copy?

To archive/remove records from the current database, access the Archive Tab & enter a number of years worth of data to keep in your active production database tables. Completed records from previous years will be archived (removed) from the current database tables if any value is entered in the Year box shown below.

To make a read only copy of the completed records while still leaving all records available in the ‘live’ database tables, set the Year box value to 0.

Page 23: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

SQL Archive Schedule

After setting the date range for each record set, use the Archive Management tab to create the Archive job. Select your desired schedule, then click on Create Schedule Job. The job will update the Archive database with new records based on the timeframe you select.

Page 24: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Use the DSN Changer program or update the ODBC System DSN to change the FireRMS program to use the Archive Database.

Users who should always have read only access should have the archive database set as their default

Using the Archive Database

Page 25: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Archived Database View

The Archive Database looks exactly like the Live Database except it includes the word Archive next to the Department Name.

All records display exactly the same – except that no updates, changes, adds or deletes are saved.

Page 26: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Upgrading the Archive DB

Re-run the archive job after Upgrading to a new Version of FireRMS or your archive users may see the error shown above.

When the archive job runs after an upgrade is done on the live database, it will update the version information for the Archive Database.

You do not need to use SQL Utils to upgrade the Archive Database – it will happen automatically the next time the Archive Job Runs.

Page 27: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Reporting on Archived Data

Once Data has been removed from the Active Tables in FireRMS, the standard reports will no longer show the data that was moved to the archive database.

If you will be using the Archive Function and need to run reports against historical data, either use the Copy only option, or be prepared to update your Crystal Reports locally to include data not only from the production tables (e.g. dbo.incident), but also from the archive tables (e.g. dbo.archive.incident).

You can also run reports from the Archived database, but those reports will, of course, only return data from the archived record range.

Page 28: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Purge Old Data

SQL Purge: “Destroy your (Old or Obsolete) Data”

Most states require records on Fire Incidents, EMS Encounters & Personnel Training records to be kept for a certain number of years.

At the same time, Some states require that certain data is destroyed after a specified amount of time. If you are required to remove data from your FireRMS database, the Purge Option can handle this for you with no need to learn or write SQL Scripts.

The Purge option should only be used if there is a State Mandate that requires it or if you are sure you have a proper backup available.

Page 29: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Purge Old Data

The Purge Tab in SQL Utils is used to remove archived records you are no longer allowed or required to maintain, or just to remove them from the Databases you access daily.

The Purge process may be used for Incidents & Rosters, Training and/or Other Entries

Page 30: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Be sure you want to Purge

You must enter your FireRMS User name and password before you can purge data. This information will be saved to confirm who initiated the action.

You will also receive two prompts – are you SURE you want to do this?.

Page 31: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

Purge Results

After a purge operation has been run, the grid on the purge form will display the name of the FireRMS User, the Module and dates used for the purge and when the action was taken.

Page 32: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.

• The Purge Process removes records from both your production database as well as your archive database if they are both online when the process runs.

• Once you have purged data from Incidents, Rosters, Training or Other Entries, you will no longer be able to run reports against those records.

• To keep a permanent copy of your old records, create a backup of either your Production or Archive Database (or both!) prior to running the Purge process.

• Database backup files may be stored on your local system or offsite. The purge process does not affect backup files.

Purge Process Notes

Page 33: FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.