Rebuild Sage 100 Premium Tables
Description
  • Back up the MAS_XXX database
  • Back up the table
  • Drop (delete) the table
  • Recreate the table
  • Insert the records back in
  • When recreating the table, use a demo company or standard installation
  • If using another installation, use the same version
  • Prepare the script first so you know you have it handy

The example below is using SO_SalesOrderHistoryDetail table. You can use any table as needed. 
These are standard SQL commands, but the SQL DBA could use other methods.

Cause
Resolution


[BCB:2:Database warning:ECB]

  1. Open SQL Management Studio to access SQL Server databases for Sage 100 Premium.
  2. Double-click on the Server name in the Object Explorer to the left of the screen in SQL Server.
  3. Double-click on Databases to expand the database tree to see all databases for Sage 100 Premium.
  4. Double-click on the Database that you’re correcting (MAS_XXX or MAS_SYSTEM).
  5. Double-click on Tables to expand the table tree.
  6. From the Toolbar, click the New Query button.
  7. Enter the following Statement to copy the data over to a new temporary table. We’re using Sales Order History in this example.
    • SELECT * INTO HistoryDetailBackup FROM SO_SalesOrderHistoryDetail.
  8. Execute or F5 to run the script you created. 
  9. From the Toolbar, click the New Query button.
  10. Find the table that you’re replacing. We’re using Sales Order History in this example.
  11. Right-click on SO_SalesOrderHistoryDetail > Script Table As > Drop and Create To > New Query Editor Window. 
  12. Execute or F5 to run the script. This will delete the table and replace it with a brand new blank table.
  13. From the Toolbar, click the New Query button.
  14. Enter the following Statement to copy the data over to the new table. We’re using Sales Order History in this example.
    • INSERT SO_SalesOrderHistoryDetail SELECT * FROM HistoryDetailBackup.
  15. Execute or F5 to run the script created to copy data back to the new table.

Attachment: 245_20230425124001_sql.txt

[BCB:155:Chat 100 US:ECB]

 

Steps to duplicate
Related Solutions

Rebuild Key Files in Sage 100