"Microsoft SQL Server" foldere size increasing day by day unnaturally.

Poorna106 21 Reputation points
2022-06-01T18:53:00.067+00:00

207594-screenshot-2022-06-01-204540.png

I Installed sql server and ms sql server management studio about a month ago. The "Microsoft SQL Server" folder size is increasing day by day. at one point the folder size was 126gb. Therefore I deleted it. But it did not deleted all the files. An error message said another program is using this folder etc. But it did deleted most of the junk in the folder and reduced the size in to 6gb. But the file size is increasing again. now it's about 20gb large. I checked the folder with Kaspersky and the folder was virus free. I tried to delete again but this time the folder size is not decreasing. software is working btw. And I can't uninstall it because I need it for my university studies. I also had a really hard time installing it since I upgraded to windows 11. Please help me before I ran out of storage.

Azure SQL Database
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,791 questions
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,811 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,459 questions
SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,245 questions
{count} votes

Accepted answer
  1. Tom Phillips 17,716 Reputation points
    2022-06-01T20:10:33.5+00:00

    As a default, SQL Server uses "Full Recovery" mode for all databases. This will cause the .log file to grow until a backup is done. If you are not doing regular log backups, the .log file will continue to grow.

    If you do not need "point in time" recovery, you should change your database to "simple recovery mode".

    Once the file grows, SQL Server will NEVER shrink the physical size of the file. You must manually run a shrink to shrink the physical size of the file(s).

    See:

    https://learn.microsoft.com/en-us/sql/relational-databases/backup-restore/recovery-models-sql-server?view=sql-server-ver16

    https://learn.microsoft.com/en-us/sql/relational-databases/databases/shrink-a-database?view=sql-server-ver16

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Erland Sommarskog 101.6K Reputation points MVP
    2022-06-01T21:00:46.82+00:00

    I am going to shot from the hip and make these assumptions:

    • You have installed SQL 2019.
    • You selected the Polybase feature.
    • You did not apply any Cumulative Update after the install.

    To confirm my theory, go to"C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\Polybase". I would expect that you find some very big dump files. Or some - probably quite a few by now! Just delete them all.

    Action: download and install the most recent Cumulative Update of SQL 2019 to stop the dumps from occurring.

    Also, do you really plan to use the Polybase feature? If not, I would recommend that you uninstall it, because it adds some noise to your server.

    1 person found this answer helpful.
    0 comments No comments

  2. Seeya Xi-MSFT 16,441 Reputation points
    2022-06-02T03:17:12.737+00:00

    Hi @Poorna106-5935,

    Welcome to Microsoft Q&A!

    "Microsoft SQL Server" foldere size increasing day by day unnaturally.

    Given that your folders keep growing, it's most likely caused by the size of your data files or the size of your log files. They are stored by default in: C:\Program Files\Microsoft SQL Server\MSSQLXX.MSSQLSERVER\MSSQL\DATA
    Here is a related article including steps about Shrink SQL Server Database: https://www.mssqltips.com/sqlservertip/6888/shrink-database-sql-server/
    As for log file, if you use full backup mode, then you can create a maintenance schedule or manually back up the log files regularly so that you can prevent them from growing.
    If you don't need to use full backup mode, you can use simple backup mode like Tom said. In simple recovery mode, the logs are almost never managed. Each time CheckPoint may truncate the logs to reclaim inactive VLFs in order to reuse the space.

    Best regards,
    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  3. Olaf Helper 40,996 Reputation points
    2022-06-02T05:27:12.72+00:00

    The "Microsoft SQL Server" folder size is increasing day by day

    Then lookup all files in that folder by detail; we can't do that for you.

    0 comments No comments