SQL logs clean up

Alex Corovin 46 Reputation points
2020-11-01T16:34:23.86+00:00

Hi ,

Coud you help me please how I can properly remove SQL logs, I notices the Log folder size is 191GB

36575-image-2020-11-01-113353.png
thank you,

SQL Server | Other
0 comments No comments
{count} votes

Accepted answer
  1. Erland Sommarskog 121.5K Reputation points MVP Volunteer Moderator
    2020-11-01T22:24:08.617+00:00

    Seems like your SQL Server instance produces stack dumps ever so often.

    Just remove those *.mdmp files.. Next, install Service Pack2 for SQL Server 2016 and also apply the most recent Cumulative Update. You are way behind on updates, so it is not of interest why get these crashes. Rhey may very have been resolved in later builds.

    Would the .mdmp files reappear, it is time to take a closer look.

    1 person found this answer helpful.
    0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Erland Sommarskog 121.5K Reputation points MVP Volunteer Moderator
    2020-11-01T19:58:38.523+00:00

    Open the folder and see where the space is spent. You can always delete as much log files you feel like - but then you may regret if you are asked about the contents. (These are errorlogs, stack dumps, not the transaction log.) So let's first sort out what is hiding there.

    But it may be an idea to investigate where they are coming from, so the problem does not reoccur.

    By the way, what does "SELECT @@version" retiurn?

    0 comments No comments

  2. Alex Corovin 46 Reputation points
    2020-11-01T22:12:11.403+00:00

    Hi, thank you for your help see below there are thousands of files like SQLDumpr****.mdmp

    36686-2020-11-01-17-04-10-terminals-401-files-store.png

    See below what retiurn "SELECT @@version"

    Microsoft SQL Server 2016 (RTM-GDR) (KB4019088) - 13.0.1742.0 (X64) Jul 5 2017 23:41:17 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows Server 2016 Standard 6.3 <X64> (Build 14393: ) (Hypervisor)

    0 comments No comments

  3. Alex Corovin 46 Reputation points
    2020-11-01T22:23:01.157+00:00

    Hi,

    I'm not good with SQL but see below how many logs there almost 2M, is it normal ?

    36648-2020-11-01-17-20-38-1921681648-remote-desktop-conn.png

    thank you very much.

    0 comments No comments

  4. Alex Corovin 46 Reputation points
    2020-11-01T22:40:54.79+00:00

    got it , thank you very much for your help

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.