Problem Note 68180: The svi-alert service does not start after you apply Hot Fix 4 for SASĀ® Visual Investigator 10.7
After you apply Hot Fix 4, if your deployment configuration is schemaPerTenant, the svi-alert service does not start. It fails because some views that are expected by the svi-alert service have not been created. They are created when your deployment configuration is databasePerTenant.
In the svi-alert log, you see the following error information:
Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException:
Migration TDC-10.7.0.19__IncreaseUserIdColumns.sql failed
---------------------------------------------------------
SQL State : 42P01
Error Code : 0
Message : ERROR: view "tdc_assignment_view" does not exist
Location : db/migration/TDC-10.7.0.19__IncreaseUserIdColumns.sql (/opt/sas/viya/config/tmp/sas-svi-alert/file:/opt/sas/viya/home/libexec/svi-alert-service-12.4.34.jar!/BOOT-INF/classes!/db/migration/TDC-10.7.0.19__IncreaseUserIdColumns.sql)Line : 5
Statement : DROP VIEW svi_alerts_provider.tdc_assignment_view Caused by: org.postgresql.util.PSQLException: ERROR: view "tdc_assignment_view" does not exist
To work around the problem, run the script on the Full Code tab.
For more information about Hot Fix 4, see the release notes.
Operating System and Release Information
SAS System | SAS Visual Investigator | Linux for x64 | 10.7 | | Viya | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
This script is a workaround. Run it against the SAS Visual Investigator database. It will create dummy views so that the svi-alert service will recognize them and start as expected.
DO
$$
DECLARE alert_schema text;
view_name text;
dummy_views text[] := '{tdc_assignment_view,tdc_extended_scenario_fired_event}';
BEGIN
FOR alert_schema IN SELECT schema_name FROM information_schema.schemata WHERE schema_name LIKE 'svi_alert%'
LOOP
FOREACH view_name IN ARRAY dummy_views
LOOP
IF NOT EXISTS (SELECT * FROM information_schema.tables
WHERE table_type = 'VIEW' AND table_name = view_name
AND table_schema = alert_schema) THEN
EXECUTE 'CREATE VIEW ' || alert_schema || '.' || view_name || ' AS SELECT 1;';
RAISE NOTICE USING MESSAGE = 'Creating dummy view ' || view_name || ' in schema ' || alert_schema;
END IF;
END LOOP;
END LOOP;
END;
$$;
Type: | Problem Note |
Priority: | alert |
Date Modified: | 2021-07-27 08:52:53 |
Date Created: | 2021-07-26 15:07:44 |