Issue
After using the article: Struxureware Power Monitoring and Power Monitoring Expert - How can I delete a device and all of its data? | Schneider Electric USA (FA210105)
to manually delete a source and all its data using a script in SSMS, the source still exists throughout Web Application (Dashboard, Reports, Trends, etc.) to be selected, even though it has been deleted from the database.
Product Line
Power Monitoring Expert 9.0
Power Monitoring Expert 2020
Power Monitoring Expert 2021
Power Monitoring Expert 2022
Power Monitoring Expert 2023
Power Monitoring Expert 2024
Environment
Web Application - Source selection
Cause
The script provided does not tackle the meta data tables that the Web Application uses to load the source list from because is not based on the device name.
Resolution
After deleting a given source and all its data, it is important to rebuild the device metadata in the Application Modules database to reflect the change.
*WARNING: This direct modification of the database is potentially harmful to your system and can result in the system being inoperative and/or loss of data if the below instructions are followed improperly. Always use extreme caution before executing such actions and make sure to backup the databases before you start.
1) Stop all ION Application Modules services
2) Run the script "ApplicationModules-DeleteAllDeviceMetadata.sql", (attached).
3) From the command prompt, perform an iisreset (run the cmd as administrator)
4) Restart the services stopped at Step 1
Additional Note:
This script is safe to run as the device metadata will be rebuilt with the service restart. It will also not touch the ION_Data and ION_Network database, therefore there is no risk of data loss.