web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

How to shrink the database size on our Tier-2 sandbox environment

(1) ShareShare
ReportReport
Posted on by 1,461

I need to get our UAT environment (tier-2 sandbox) to 50GB max to be able to export it to refresh our development environments.

I ran a bunch of the clean-up features including the database log and the data management history cleanup.

The database grew instead of shrunk. Which means there must be a lot of empty space.

I just upgraded the UAt environment via LCS in the hopes that the pre-servicing and post-servicing steps would have taken care of the fragmentation. But it didn't.

So do I need to log a ticket with Microsoft to run something to get rid of the blank space to get the actual size of the database or is there something that we can run ion UAT to fix it ourselves?

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    303,730 Super User 2026 Season 1 on at

    Hi Retha,

    You can't manage the database size yourself. I would suggest you creating a ticket for Microsoft Support.

  • AR-01121610-0 Profile Picture
    4,971 Moderator on at
    Hy,
    we have the same issue as production DB is ~ 1,5 TB.
    After DB refresh we delete and truncate a lot of not needed stuff, but DB size keeps as it as and the DB size will not decrease.
    In Devboxes we could reduce DB size to 600 GB. 
    Did you get responce from the MS about one time shrink of Tier 2 dbfiles?
     
    kr, Andreas
  • Martin Dráb Profile Picture
    239,040 Most Valuable Professional on at
    You can connect to the database through SSMS (after enabling access) and I'd assume that you can shrink the database from there. But maybe there is a problem that I'm not aware of André is.
     
    Also, the growth after deleting the data may be caused by Full recovery model. With this model, all changes are stored in the transaction log (therefore deletion of data increases the size of the log) until you backup the log.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 616

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 460 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 331 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans