Cleanup TempDB tables in a MsDyn365FO sandbox environment

This is my second post about TempDB tables in Microsoft Dynamics 365 for Finance and Operation. In this post I want to share a SQL script with you to cleanup TempDB tables in a MsDyn365FO sandbox environment. The reason behind this process is that a recently noticed that sp_updatestats takes significantly longer depending on the number of TempDB tables in the system. The script you can find behind the following link will drop all TempDB tables that have been created longer than 7 days ago: DropTempDBTables.sql

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s