Over time SQL Planner repository database may grow significantly and it is recommended to delete older data (6 days or as per your requirement) to keep its storage under control, to purge data Create an SQL Agent Job to delete older data from SQL Planner database :
– Connect to SQL Planner host machine using Management tudio, Create an agent job in Agent Service
– Under General tab- Give Job a name as “SQLPlanner DB Cleanup”
– Under Step , Click New > Define Step name as Cleanup , Type to be selected as T-SQL , Run as admin or user have privilege to execute SP in SQL Planner db.
-In Command add below command (–Here 6 is a number in Days, it says to proc to delete all data older than 6 days, this number you can retain your data as per your requirement)
exec [SQLPlanner].dbo.usp_purge_old_monitoring_data 6
-Click ok and Under Schedule , you can schedule this job at every 2 days midnight at 12:00 AM
Click Ok twice to save Job.