EN
Español
English
Português
    Restrict Editing of Global Configurations in Multitenant Environments

    CHG-27577-19-300577:

    In multitenant AEMM environments, it is required to restrict customers from being able to edit the settings of Global configurations. This should only be editable by Aranda operations.

    The following script that allows you to update records in the AFW_SETTINGS table for global configurations. Replace the value of the @valorSetting variable with one from the following list:

    A script that allows records to be updated in the AFW_SETTINGS table for global configurations that are handled in AMDM Replace the value of the @valorSetting variable with one from the following list (please put only the name of the parameter and not the description): Application Maintenance Section:

    • DatabaseRecordsKeepingDays: Days to maintain old records in database (minimum value 30, maximum value 120)
    • DeleteOldRegistersDays: Days to delete previous records in database (minimum value 0, maximum value 120)
    • CleanRemainingDaysMetricsDevice: Days to delete previous records from in-database application metrics (minimum value 30, maximum value 120)
    • CleanRemainingDaysHealthDevice: Days to delete previous device status records in database (minimum value 30, maximum value 120)

    Tracking Settings section:

    • AmountTrackingRecords: Number of Tracking Records (minimum value 20, maximum value 200)
    • HighAccuracyDistance: Distance in meters at high precision (minimum value 50, maximum value 10000)
    • HighAccuracyTime: Time seconds in high precision (minimum value 20, maximum value 86400)
    • MediumAccuracyDistance: Distance in meters in medium precision (minimum value 50, maximum value 10000)
    • MediumAccuracyTime: Time in seconds at medium precision (minimum value 20, maximum value 86400)
    • LowAccuracyDistance: Distance in meters at low precision (minimum value 50, maximum value 10000)
    • LowAccuracyTime: Time in seconds at low precision (minimum value 20, maximum value 86400)
    {
    
    DECLARE @valorSetting VARCHAR(80) = '' /* Por favor agregar el valor del setting en esta variable (dentro de las comillas) */
    DECLARE @setting VARCHAR(80) = '' /* Por favor agregar el nombre del setting en esta variable (dentro de las comillas) */
    
    IF(@valorSetting <> '' AND @valorSetting IS NOT NULL AND @setting <> '' AND @setting IS NOT NULL)
    BEGIN
    	UPDATE dbo.AFW_SETTINGS SET sett_value = @valorSetting
    	WHERE sett_key = @setting
    		AND sett_application_id = 33
    		AND sett_value <> @valorSetting
    END
    ELSE
    BEGIN
    	PRINT 'Por favor poner valor a las variables @valorSetting o @setting.'
    END
    
    



    Note: Application monitoring and maintenance configuration data can only be changed by database administrators in multitenant environments.