Symptom
There are multiple obsolete DV% views in the customer DB.
Reproducing the issue
Temporary DV% views are used by various reports and functionalities in SAP Business One. If the process is terminated unexpectedly (for example, intentionally by the user or due to a system crash), the DV% views are not dropped and remain in the customer database. Similarly, redundant DV% views can remain in the database as a result of an application bug (for example, as described in SAP Note 3540375 - Temporary SQL Views persist after using 'Country of Origin - Assignment').
Cause
Multiple DV% views can lead to performance degradation, for example, during the upgrade process or usability issues when working with DB views.
Solution
Scenario:
Use a database with thousands of obsolete DV% views. Check the number of DV% views in the database:
For MS SQL Server:
SELECT * FROM sys.views WHERE name LIKE 'DV%' AND type = 'v';
For SAP HANA:
SELECT * FROM sys.views WHERE view_name LIKE 'DV%' AND view_type = 'ROW' and "SCHEMA_NAME" = current_schema;
System behavior prior to SAP Business One 10.0 2508:
Thousands of DV% views cause performance degradation, slowing down processes like database upgrade or leading to usability issues when working with DB views.
System behavior after upgrade to SAP Business One 10.0 2508:
All obsolete DV% views are removed automatically by the upgrade process, improving overall performance and simplifying user interactions when working with DB views.
Workaround:
Delete temporary SQL views, such as DV%, manually or by executing a database query.