Step 4 – SQL Server database cleanup

  1. Launch SQL Server Management Studio from any location where you can open a session of your SQL Server instance.
  2. Connect to your instance with a sysadmin-enabled account. You can also use a Windows or an SQL Server authentication.
  3. Verify that you know the name of the database used for this Sage X3 solution. You can check that in your Sage X3 Console configuration.
  4. Open a new query. Then copy and paste the following SQL Script.
  5. Replace the second FOLDER_NAME by your folder’s name and the db_name by the name of your database like in the screenshot beneath.
  6. Then launch the request by clicking Execute or hitting F5.
    This takes some time and might use quite a lot of CPU and I/Os to clean up.
  7. At the end it should display the Commands completed successfully message like below:
  8. You can now close the query manager.