Database Manual

Oak Ridges Moraine Groundwater Program

Appendix G.32

G.32 Automated Scripts (Listing and Calling Times)

A variety of automated updates are performed against the database on a weekly basis (beginning on Saturday and ending on Sunday; note that the start times, listed subsequently, are relative to midnight Saturday.) These can be broken into the following general groups:

The following scripts are called (listed in order of processing)

This is repeated for each geologic model being evaluated (currently WB2018 and YT32011). This will have a similar naming structure as listed above.

The ASSIGNED_UNIT is then populated for each geologic model (upd_difa_au.bat).

The thicknesses for each aquifer unit for each geologic model is then determined for each interval/location using the following scripts

This is repeated for each geologic model and their associated aquifers (WB2018: ORAC, Thorncliffe and Scarborough; YT32011: ORAC, Thorncliffe, Scarborough and Channel Sands). These will have a similar naming scheme to the above.

The values of specific capacity (SC_LPMM), transmissivity (T) and hydraulic conductivity (K) can then be calculated (upd_difa_calc_tk.bat). The associated fields will be updated.

The D_INTERVAL_FORM_ASSIGN_FINAL table can be updated, including

G.32.2 Update D_LOCATION_SUMMARY (location by area)

Each partner conservation area and region is examined and the associated records have their CA_AREA_ID, REG_AREA_ID and SWP_AREA_ID fields updated in D_LOCATION_SUMMARY. In addition, the field ORMGP_AREA is updated to mark those locations currently found within the ORMGP study area (with buffer) and having ‘valid’ coordinates (refer to V_SYS_FILTER_LOC_COORDS and V_SYS_FILER_LOC_COORDS_DOCS for details). This is determined using the following scripts:

Note that the starting time was adjusted from 00:00 (to 02:30) on 2023-10-16.


Records and fields found in D_INTERVAL_SUMMARY (DIS) are now updated (in order of processing)

Note that the starting time was adjusted from 02:00 (to 01:00) on 2023-10-16.


Records and fields found in D_LOCATION_SUMMARY (DLS) are now updated (in order of processing)

Note that the starting time was adjusted from 02:30 (to 01:30) on 2023-10-16.


Records and fields found in D_LOCATION_GEOM (DLG) are now updated (in order of processing)

Note that an update of the D_LOCATION_GEOM table has been shifted (from 03:00) to run before many of the other update scripts.

G.32.6 Miscellaneous updates

A variety of checks and updates are performed here (in a number of tables, in order of processing)

G.32.7 Update all W_GENERAL_* tables

The contents of all the W_GENERAL_* tables are removed and the tables re-populated:


Records are added to the D_VERSION_STATUS table capturing the status of the database (note that this is only run on the 27th day of the month rather than weekly). This includes:

G.32.9 Database backup (and restore)

Each of the following are processed (in turn) to backup the master database and make available the OAK_20160831_WEEKLY database. This includes

G.32.10 Miscellaneous daily updates

Each of the following is processed, in turn:

G.32.11 Update D_GEOLOGY_LAYER

This is similar to the procedure outlined in G.32.1. In this case, though, it applies to the D_GEOLOGY_LAYER table. The fields GEOL_ASSIGNED_UNIT, GEOL_TLAYER and GEOL_BLAYER are populated (or updated) based upon a single geologic model (in this case, WB2021). These are generally to be used as a reference, only.

Last Modified: 2023-10-16