HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

SQL Server mdf file too large

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
mdffilesqltoolargeserver

Problem

I have a .mdf file that is 10gb. This is the max file size. How can I reduce the file size? I do not need the data, I just need to be able to write new data to the database.

I have deleted a ton of rows, but the file size has not changed at all.

Any help would be appreciated!

Also, my log file grew by about 50gb when I deleted the rows from the .mdf. How do I make that smaller as well?

Solution

You have to shrink database so the deleting the data takes place
Right Click on your database , Tasks => Shrink => Files
In shrink action choose the second Option and enter your file ideal size
You're done
:)

Context

StackExchange Database Administrators Q#144386, answer score: 4

Revisions (0)

No revisions yet.