Linked Questions

7 votes
1 answer
7k views

SHRINKFILE best practices and experience [duplicate]

Preamble: In general it's a big no-no, but believe me that are rare cases when space is really needed. For example Express Edition is limited to 10GB. Imagine that you discovered that with a data type ...
Csaba Toth's user avatar
0 votes
2 answers
33k views

Reduce MDF file size [duplicate]

I am working with a 500 GB SQL Server database. I need to reduce the size of the database data file after removing a large amount (50%) of the data. I tried re indexing, it's good the database has de-...
kannadhasan G's user avatar
4 votes
3 answers
6k views

Releasing free space in mdf file to OS [duplicate]

We have a 120GB database. There was table with 60GB of data which is useless and we have truncated it. Now database size is 120GB with free space 60GB. The database will not grow up to 60GB in at ...
Pரதீப்'s user avatar
0 votes
2 answers
5k views

Are there any disadvantages to shrinking a database? [duplicate]

My production server's database grows unexpectedly and almost I am going to create a job for shrinking the database which runs once in a month. Is it a good idea? The backups was failed and the time ...
Parassharma1990's user avatar
7 votes
1 answer
5k views

Release unused space from SQL Server database [duplicate]

We have deleted a large part of the data from a two-digit terabyte sized database, and would now like to release some of the space back to the operating system. The database is currently about 80 % ...
user3021123's user avatar
1 vote
2 answers
5k views

Freeing space after deleting rows [duplicate]

I have a SQL Server 2008 instance and one table is quite large (log data) so I delete old logs. Now I start to read articles on this problem, here is one. As I see it there is no solution! If I ...
Bogdan Gorenak's user avatar
1 vote
1 answer
2k views

reusing space after deleting lots of rows [duplicate]

I have a database which is 20 GB and it has history information since year 2001. Now I started deleting data prior to year 2008. after completion of deletion how can i reuse the space that is cleared ...
Uma's user avatar
  • 11
4 votes
3 answers
561 views

Shrink database after removing extra data [duplicate]

We have a need to fit a database in 4GB in order to use SQL Server Express Edition. I started from a 7GB database, and found a lot of unneeded records, and deleted them. After shrinking, the database ...
st78's user avatar
  • 166
-2 votes
1 answer
113 views

Shrink of a big databases ? SQL Server [duplicate]

In this moment I have a very big database (almost 4 TB) and wanna shrink data files for a future migration Unused space : almost 3000 GB I have in mind shrink data files day per day with low amount of ...
SakZepelin's user avatar
1 vote
1 answer
99 views

1 time shrink of abused databse or restore from backup [duplicate]

I have a database that I have inherited which has been left for a long time to grow and grow. 95% of this growth is caused by 1 log table used by our application. The database is 120GB and in full ...
James Anderson's user avatar
0 votes
1 answer
108 views

Shrinking bigger databases [duplicate]

Hello masters of MS SQL I have a kind of a problem on my hands. We have quite big DB (5TB) and we've just "enabled" some software archiving which means that most of the data will migrate to other DB'...
Robert's user avatar
  • 1
0 votes
0 answers
53 views

Is a SQL Server DB worth shrinking? [duplicate]

I purged about 100 GB on 200 GB SQL Server v11 DB. The MDF file still show about 200 GB in the file explorer. Everything looks fine, first tests shows 50% time treatments increase and the backup's ...
Meoffrey's user avatar
299 votes
4 answers
355k views

Why Does the Transaction Log Keep Growing or Run Out of Space?

This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this: In SQL Server - What are some reasons the transaction log ...
Mike Walsh's user avatar
  • 18.2k
8 votes
3 answers
19k views

Get MS SQL Server to release disk space

A poorly managed database table has grown to be enormous. 48+gigs of orphan records. I am trying to clean it up and put my dangerously full hard drive back to a normal state. I will be deleting approx ...
jackncoke's user avatar
  • 183
3 votes
3 answers
11k views

Releasing Free Space

I am running a rather large database on SQL Server 2008 R2 Express. Recently I hit the 10GB limit, so the system would not allow me to create anymore objects, ect.. I have archived off a very large ...
Alec.'s user avatar
  • 175
2 votes
2 answers
4k views

Should I shrink this SQL Server data file?

I have read many articles describing how shrinking data files causes terrible things to happen floods, famine, fragmentation, and general mayhem. Here is the cliff notes of my situation: SSAS ...
DMikulaSr's user avatar
3 votes
3 answers
746 views

What steps should I perform to prepare a MDF for distribution as a (mostly) read-only database?

I am on a team that develops a product that uses several SQL Server databases. Some of them are mostly read-only. Tables do not get changed, but some views and stored procedures get changed as a way ...
Justin Dearing's user avatar
1 vote
2 answers
5k views

Reduce space used on C drive

I have installed SQL Server 2008 R2 on my laptop, under 32-bit Windows 7. The SQL Server installation is using approximately 30GB of space on my C: drive. Why is it using so much space, and how can I ...
vijay kumar sharma's user avatar
5 votes
3 answers
299 views

Shrinking database which is not having any insert/update

We have a process of archiving wherein we take the backup of current database and restore it as xxx archive database. Now this database contains previous data and will not have any insert/update/...
azim's user avatar
  • 177
4 votes
2 answers
3k views

What is the proper way to store a full table of data outside of a database? It needs to be able to be restored as well

I have a large SQL Server 2005 database that hasn't had the best maintenance over the years (I just took it over recently). There are around 100 tables that can be completely removed from the ...
Jamie T's user avatar
  • 45
5 votes
2 answers
351 views

How can I efficiently downsize some Unicode fields?

We have a SQL Server 2012 Enterprise live transactional database that is now growing over 1G per month and is becoming a size problem for us. It is currently at 23G. Character type fields are all ...
Dave's user avatar
  • 175
1 vote
1 answer
752 views

Shrinking mdf files - SQL Server 2012

I am in need to shrink a data file in SQL Server 2012. I am using shrink files option in tasks of the database and am using "Reorganize pages before releasing unused space" option. SQL Server says ...
Jack's user avatar
  • 59
1 vote
1 answer
1k views

How to restore a database, ignoring the free space within each file?

Using the following script I get all the disk space used by each file in my database: ;with radhe as ( SELECT DatabaseName = 'my Database', --DB_NAME(), a.FILEID, [FILE_SIZE_GB] = CONVERT(...
Marcello Miorelli's user avatar
0 votes
2 answers
136 views

What's the difference between "shrink" file vs simply reducing the initial size?

I'm totally new in DB Administration. So i got confused about the "file shrink" functionality offered on SQL Server Management Studio (SMSS) or via T-SQL. Why I would I need to use that &...
Plain_Dude_Sleeping_Alone's user avatar
3 votes
1 answer
443 views

Ways to Reduce Database Size and possibly improve performace. Untouched enviroment

I am new to an environment. The databases are virtually untouched by a seasoned DBA. I am looking for ways to reduce DB size and possibly improve performance. Unfortunately, I only have Web edition ...
whereisike's user avatar
0 votes
2 answers
232 views

Best Way to Migrate 100 tables To New Database

I need to migrate 100 out of 150 tables (data and structure) and everything else (sprocs, views etc.) to a new empty SQL Server database. I have been using the Import/Export wizard and it has been ...
user3099771's user avatar
0 votes
1 answer
365 views

How to restore SQL Server database to a specific day? [closed]

Suppose I have an SQL Server 2008 which is installed on windows 2008. There is a db MyDb under the instance. MyDb is have full backup every night. Because of storage space on hard driver, only 7 days ...
KentZhou's user avatar
  • 145
0 votes
1 answer
88 views

One time database shrink catch-22 solution?

I am developing a plan for SQL Server 2012 EE to properly downsize and type (nchar to char types) some needlessly Unicode nvarchar(max) fields and would like to optimize the database size as part of ...
Dave's user avatar
  • 175
0 votes
1 answer
108 views

Unable to shrink files

I am kind of new to SQL Server. I am trying to shrink my MDF files, however I am unable to do it. There is no error message. Any idea why this is the case ?
Ijaz's user avatar
  • 1