Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

SQL Data and Trx-log files do not change mystery?

Posted on by Microsoft Employee

Hello,

I am dealing with a probably strange situation in a production AX 2012 R3 environment SQL datafiles, which I am trying to understand and would need some help.

The database data (mdf) is about 300 GB and transaction log (ldf) file 700+ GB with low utilization (% used), so last weekend I thought I should shrank the log. So, I was waiting until Friday end for all users to logoff, then I took a transaction log backup and shrank the log file to 256 GB, using the SQL Management Studio GUI.

Everything looks great after that, however today Monday I see both data (mdf) and transaction log (ldf) files size & date unchanged, as of last Friday end-date (for the data file) and Saturday when shrank the log (for the log file)! 

Which comes to a surprise with many users working on the system today/Monday.

How can this be explained? Does it seems normal to you?

Related settings and observations:

- Database recovery model if FULL, and full database backup (once a day), differential backups (every 2 hours) and transaction log backups (every 30 minutes) were all taken without problems today.

- Transaction log utilization (% used) was fluctuating normally during the day and occasionally dropping close to zero due to often log backups. Still, transaction log date stays the same as of last Saturday when shrank.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: SQL Data and Trx-log files do not change mystery?

    Hi Yiannis,

    You could have asked the question also on the SQL server forum as it is not specific to AX only.

    When you want to shrink the log files, you need to create a full database backup. This should be running periodically (daily) already. Can you verify this? If it is setup, then check if it is running without errors. When there is not sufficient disk space for the backup, this will fail, resulting in a growing log file.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: SQL Data and Trx-log files do not change mystery?

    Looks like this is normal behavior sometimes/often (link).

    Restarting Sql services changed file dates, although sizes unchanged.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans