---
title: "MDS v4.6.6 Hotfix"
canonical: "https://servicedesk.maxgeo.com/space/MDS/1392803854/MDS%20v4.6.6%20Hotfix"
format: markdown
---
> Macro (toc)

# 00_466_udf_ChecksumRemoveSpace

#7229: New MDS internal used SP.

# 01_466_usp_ProcessInComingDataDriver

#6432: Enhanced SP to exclude inactive data masks.

# 02_466_usp_AdminBatchDelete

#6485: Enhanced SP to handle remove tblXRFResultsHeader records.

# 03_466_usp_DataXRFResultsMergingProcess

#6638: Fixed total counts calculation.

# 04_466_tblDHColl

#6824: Enhanced trigger TR_utblDHColl_Max_Depth to handle custom tblDH* table without Hole_ID column

# 05_466_usp_DataAssayQCRuleChecker

#6852: Changed variable @Orig_SampleID data type from NVARCHAR(30) to NVARCHAR(50).

# 06_466_HyperspectralSamp

#6991: New hyperspectral sample/sampQC tables

# 07_466_RptQAQC_MonthlyScatterPlot SPs

#7115/#8565: usp_RptQAQC_MonthlyScatterPlot_BadRpts: Added missing join on GenericMethod and conversion factor roe RepeatResults.  
#7115: usp_RptQAQC_MonthlyScatterPlotSummary: Added missing join on GenericMethod.  
#7115: usp_RptQAQC_MonthlyScatterPlotGrouping: Added missing join on GenericMethod.  
#7115: usp_RptQAQC_MonthlyScatterPlotChart: Added missing join on GenericMethod.

# 08_466_tblDHMetaData

#7158: Fixed logic bug in TR_iutblDHMetaData_Date_Completed on dates comparison.

# 09_466_Hyperspectral_ranking_config

#7175: Fixed ranking configuration for hyperspectral.

# 10_466_usp_DataDesurvey

#7205:  
Enhanced logic to prevent multiple concurrent runs.  
Added option to skip desurvey survey table.  
Added logic to ignore validated holes.

# 11_466_tblSYSObjectGroup

#7412: (This is only applicable for blank base MDS)  
	Added new DS config modules.  
	Reassign existing DS config modules.

# 12_466_ProdTableColumnAllowNull

#7116: Change table columns to allow null  
	tblProdMaterialMovement.Time_Loaded  
	tblProdEquipmentUtilisation.Fuel_Status  
	tblProdEquipmentUtilisation.Supervisor

# 13_466_tblDHGeotechLoadStrengthPT

#7493: Change tblDHGeotechLoadStrengthPT.Site_ID to Hole_ID

# 14_466_tblSYSConfigRelation

Clean up ConfigRelation table for any non-existing table to prevent issue with incoming data driver

# 15_466_tblSYSExtSQLStatement

#7507: Update Extension query MAX035

# 16_466_tblDHLithology

#7535: Fix check constraint CK_tblDHLithology_Lith2_Code definition

# 18_466_uspIC_InterceptCalculator

#7576: Enhanced logic to improve performance when source data (SampleTable) is view

# 19_466_Assay Merging SPs

#7598: Enhanced assay merging process to handle all assay tables, not just tblAssay

# 20_466_DS5_DatePeriodFix

#7994: Fix Date Period filter for DS5

# 21_466_Grant Function Permission

#8054: Grant execute/select permission on functions to DS_SysAdmin and DS_UserPlus

# 22_466_tblDHGeophysicsHeader

#8055: Fixed bug in TR_iutblDHGeophysicsHeader_LAS_Date_Read_Date

# 23_466_tblLSSite

#8063: Fixed bug in TR_utblLSSite_Max_Length

# 24_466__tblPTSamp

#8413: Increased tblPTSamp.Sample_Description column length from 255 to 1000

# 25_466_tblSYSAALAttachment

#8414: New table tblSYSAALAttachment for DS5

# 28_466_tblXRFStandardSamp

#7467: Fixed bug in trigger TR_itblXRFStandardSamp with SourceTable name

# 29_466_Contract_Cost_Code

#9579: Added Cost_Code to contract details

# 30_466_Remove_LL_Geometry_columns

#9966: Remove LL_geometry from tblDHColl/tblFSSite/tblLSSite/tblPTSite

# 31_466_tblVWProdTruckingCalculated

#10171: Fixed bug with join to tblLIBMachineryFactor

# 32_466_tblSYSAssLabElementAlias_LabElement

#10169: Extend LabElement column length from 25 to 100

# 33_466_tblSYSAss_tables_Is_Active_Sort_Order

#10172: Add Is_Avtive/Sort_Order to tblSYSAssElement/Lab/LabElementAlias/Method/MethodGeneric

# 34_466_usp_DataAssayQCRuleChecker

#11300: Enable capture SampleID for standards rules

# 35_466_usp_DataDesurvey

#7377: Enhanced logic to handle DH/LS table using Depth instead of Depth_From/Depth_To or Length_From/Length_To  
#/8779: Added @UserName for Modified_By for DS5  
#9803: Further enhanced logic to handle config view as the source, assumed one of tblDHColl, tblFSSite, tblLSSite or tblPTSite will be involved in the view

# 36_466_usp_RptDHDrillLogAudit

#11333: Updated to work with MDS 5 new coordinate system  
#11458: Enhanced logic to handle point table like tblDHSurv

# 37_466_usp_DataAssayMergingProcess

#6382: Reworked Total/Merged counts logic  
	SampleCount: Total unique sample counts in all assay and buffer tables combo  
	SampleMerged: Unique sample counts in all assay tables  
	ResultCount: Total unique (SampleID/GenericMethod/Element/Repeat) assay records in all assay and buffer tables combo  
	ResultMerged: assay record count for Preferred=0 (or -1000).  
#6410: de-prefer UP value. If there are UP Values in the re-assay batch these samples need to have a higher preferred and the previous loaded assay (sysAssStatus IS NULL) needs to have a preferred of 0  
#6435: Remove negative preferred records that's due to assay reloading  
#7598: Added handle of other assay tables

# 38_466_usp_ProcessImportData

New SP usp_ProcessImportData required by DS5 (DS5 v3.0 changes)

# 39_466_DS53.1_Changes

DS5 3.1 changes

# 40_466_usp_DataDesurvey

#9803: Fixed bug in determine either config is a table or view

# 41_466_tblSYSAALAttachment

Assign permission to tblSYSAALAttachment for DS5

# 42_466_usp_DataAssayMergingProcess

#11749: Fixed bug with sample/result counts

# 43_466_usp_RptDrillStatus

#11935: Aligned temp table column length with source data length for Hole_ID/Total Drilling Depth/Hole_Status/Prospect/MachineryID

# 44_466_usp_AdminCreateAuditTrigger

#11948: Enhanced logic to improve performance and handle special column name

# 45_466_tblSYSConfigRelation

#14292: Add config relation record for tblXRFResults

# 46_466_usp_AdminRunQuery

#15225: New internal used SP usp_AdminRunQuery for QGIS plugin

# 47_466_tblDHGeotechRMR

#15244: Update tblDHGeotechRMR.Total_Core_Recovery_pct computation formula

# 48_466_tblSYSAssQCResultDetail

#15692: Change tblSYSAssQCResultDetail.Repeat_SampleID length from 30 to 50

# 49_466_tblLIBSampleType

#16966: Remove trigger TR_udtblLIBSampleType_Code

# 50_466_tblPTSite

#16967: Fixed bug in TR_utblPTSite_Site_Depth with referencing Hole_ID instead of Site_ID

# 51_466_tblSYSDSConfig

#16971: Change tblSYSDSConfig.UserName,DisplayName column length from 50 to 100

# 52_466_tblLIBAssay_Dispatch_Group

#7192: New table tblLIBAssay_Dispatch_Group required by LGL

# 57_466_usp_RptQAQC_PBI_Repeats

#15171: New SP usp_RptQAQC_PBI_Repeats

# 58_466_tblSYSQCGroup

#17394: Fixed syntax error in TR_utblSYSQCGroup

# 59_466_usp_DataAssayQCRuleChecker

#10169: Changed LabElement length from 25 to 100

# 60_466_usp_ProcessImportData

#15652: Enhanced usp_ProcessImportData for DS5 3.2.0

# 61_466_MGISD21397

#7192: Dispatch related changes for DS5

# 62_466_tblSYSAssDispatchDetails

New column tblSysAssDispatchDetails.Lab_Dispatch_Status for DS5 3.2.0

# 63_466_tblLIBCompany

New column tblLIBCompany.LabCode/Lab_OfficeCode for DS5 3.2.0

# 64_466_tblSYSAssDispatchHeader

New column tblSYSAssDispatchHeader.Lab_WorkOrder for DS5 3.2.0

# 65_466_pXRF_Plugin_v2.2_Upgrade

pXRF plugin v2.2 upgrade for DS5 3.2.0

# 66_466_tblVWSYSDispatchedSamples_CSV_Export

Enhanced tblVWSYSDispatchedSamples_CSV_Export for DS5 3.2.0

# 67_466_usp_AdminBatchDelete

Fixed usp_AdminBatchDelete to handle tblSYSXRFIncomingData

# 68_466_usp_DataAssayMergingProcess

#15667: Added @OverwriteDataSet to handle same sampleID associate with multiple active datasets. When @OverwriteDataSet specified, it will be used as the DataSet for all samples to be processed.

# 69_466_usp_DataAssayMergingProcess

Fixed QCRuleChecker call looping bug

# 70_466_usp_DataXRFResultsMergingProcess

#17888: Added update DataSet based on tblSampleRegister.SampleID

# 71_466_usp_GenerateMasterCalendar

#17889: New usp_GenerateMasterCalendar for PowerBI report

# 72_466_AssayManager_Task13627

#13627: DS5 assay manager config data

# 73_466_pXRF_Importing_References_Task17669

#13627: DS5 assay manager config data for pXRF

# 74_466_Grant_Permission_AllSPFunctions

#17891: Grant permission on all SP,Functions

# 75_466_EnableTrustedFK

#16968: Enable trusted FKs where possible

# 76_466_usp_NDS_LoggingStatistics

#18726: Fixed Hole status and Date_completed

# 77_466_tblDHSampWater

#19196: Fixed bug in TR_iutblDHSampWater_UsingActiveLIBCode

# 78_466_tblSYSConfigRelation

#19197: Add config relation record for tblAssayWater

# 79_466_tblVWDHSurv_Priority

#19201: Grant update permission on tblVWDHSurv_Priority to DS_SysAdmin

# 80_466_tblSYSDSConfig

#19202: Update DSConfig for table/view with From/To columns as DOWNHOLE instead of POINT

# 81_466_usp_ProcessInComingDataDriver

#19202: Added handle of different from/to columns like Length_From/To

# 82_466_usp_ProcessInComingDataDriver 

#19839: Enhanced logic to handle SampleID length less than mask pattern length 

# 83_466_Assay triggers 

#19879: Enhanced assay triggers TR_u*_AssayResultNum_UnitCode_LimitLower_sysAssayStatus_Element to better handle reassay for DS5 on following assay tables:

 tblAssay 

tblAssayHyperspectral 

tblAssayWater 

# 84_466_utf_MXAuditExceptionAppList 

Update utf_MXAuditExceptionAppList to handle LogChiefLite/mxAPI apps 

# 85_466_tblSYSXRFAttachment 

New table tblSYSXRFAttachment for DS5 v3.2.0.1 

# 86_466_MDS.tblSYSMappingAppConfigVal s 

DS5 v3.2.0.0 remove Micromine export config data 

# 87_466_MDS.tblMasterCalendar

New table MDS.tblMasterCalendar used by QAQC PBI report 

# 88_466_ProcessInComingDataDriver 

#19905: Fixed bug with handling overlapping data masks 

# 89_466_tblSYSDSConfig_OrderBy 

#19988: set tblSYSDSConfig.OrderBy to NULL if contains column does not exist

# 90_466_tblContractDetails_Lab_Turnarou nd.enc 


#7192: New column tblContractDetails.Lab_Turnaround required by DS5 

# 91_466_tblSYSXRFAttachment.enc 


Grant permission to tblSYSXRFAttachment for DS5

# 92_466_QAQC_v2.1 

New SP usp_RptQAQC_PBI_SampleSummary_DQ and usp_RptQAQC_PBI_Repeats_DQ for QAQC v2.1 

# 93_466_usp_DataAssayQCRuleChecker 

#20267: Exclude (PASS) element LOI from Repeats check rule 

# 94_466_tblSYSAssMethodPriority 

#20741: Enhance TR_iutblSYSAssMethodPriority_Rerank_Method logic for performance and add handle of other assay tables 

# 95_466_usp_ProcessInComingDataDriver 

#20733/20740: Enhanced usp_ProcessInComingDataDriver logic to only look config related to the @AssayTable and handle mask contains underscore "_"

# 96_466_AssayResult 

#20280: Expand AssayResult column lenght from 20 to 100 on assay tables in MDS 5.0.0, updated usp_DataAssayQCRuleChecker to handle large column length

# 97_466_DS5_v3.2.1.0 

DS5 v3.2.1.0 changes 

# 98_466_usp_PopulateHALData 

New usp_PopulateHALData for Historic Assay Loader extension 

# 99_466_usp_ProcessInComingDataDriver 

#21038: Enhanced logic to apply lab filter on masks when batch is specified

# 100_466_ProcessInComingDataDriver 

#21115: Enhanced logic to handle same sample existing in multiple batches

# 101_466_tblProdSurvey 

#22406: Corrected tblProdSurvey.Site_ID FK

# 102_466_usp_DataAssayMergingProcess 

#22392: Enhanced logic to handle large buffer table without provide @LabCodeBatchNo filter 

# 103_466_tblSYSAssDispatchTemplates 

#22409: Aligned permission on tblSYSAssDispatchTemplates 

# 104_466_Assay table validated triggers

#22416: Enhanced logic for better performance


# 105_466_tblSYSFilter 

#22493: Update filter definition in tblSYSFilter for "Missing Library Entries"

# 106_466_StandardSamp_ValidateTrigger 

#23132: Fixed bug with Source_Type filter for validated trigger on tblStandardSamp/tblStandardSampQC 

# 107_466_PBI_QAQC_v211_SPs 

Updated PBI QAQC v2.1.1 SPs

# 108_466_usp_ProcessInComingDataDriver 

#23706: Added @OverwriteDataSet to handle same sampleID associate with multiple active datasets. When @OverwriteDataSet specified, it will be used as the DataSet for all samples to be processed.

# 109_466_usp_RptQAQC_PBI_SampleSumm ary_DQ 

#24998: Added filter to exclude Repeat 0 from QCCategory result and SUM QCSampleCount as well.

#  110_466_tblSYSConfigRelation 

#25002: Add assays (tblAssay, tblAssayHyperspectral, tblAssayWater, tblXRFResults) RHNORM config relation record if not already exists

# 111_466_usp_DataAssayQCRuleChecker 

#23134/23672: Pass the record if sysResult is 0 and not throw divide by zero error. Also pass the record for repeat rule if Orig_LimitLower is NULL. #25018: Pass the record for ScreenTest when value is on the right edge of the range. For example, when check range is 0-90, pass 90 instead of fail it.

# 112_466_tblSYSFilter 

#25213: Extend tblSYSFilter.Filter_Definition and tblSYSFilterItem.FilterItem_Definition to NVARCHAR(MAX) for DS5 

# 113_466_Assay_Management_SPs 

#25224: Align @Loaded_By/@UserName in usp_DataAssayMergingProcess, usp_DataAssayRankingProcess and ProcessIncomingDataDriver SPs

# 114_466_Prod_View_MachineryFactor 

#26685: Fixed join logic for machinery factor for views: tblVWProdLocationTrucking/tblVWProdReconTrucktoResource/tblVWProdTruckingCalculated #26690: tblVWProdTruckingClaimed - added Default_SG for Tonnage_Calculated

# 115_466_tblVWBudgetsDaily 

#27349: Added dates restriction to prevent error

# 116_466_Validated_Date_Triggers 

#29392: Fixed validation logic bug within Validate_Date triggers and enhanced Validated triggers to allow reset validated flag

# 117_466_tblDHGeotechRMR 

#30489: Fixed missing tblDHGeotechRMR.RQD_Deere_pct updates from 4.6.4 to 4.6.5