Skip to main content

Questions tagged [shrink]

Pretty much the worst thing you could do to a SQL Server database. In short: It sacrifices performance to gain space.

4 votes
1 answer
695 views

In Microsoft SQL Server I can go into Database Properties > Files and change the Size of a file to a lower number. If there's space available, it will actually reduce the file's size, and never ...
tedcodes's user avatar
1 vote
1 answer
91 views

Problem: I am working on a SQL Server 2019 database where I deleted a large amount of user data (~500 GB). After deletion, I attempted to shrink the data file using: DBCC SHRINKFILE (N'web_Data', ...
Shehzad Malik's user avatar
0 votes
1 answer
49 views

some of our databases have excessive VLF's in their log files and I plan to shrink and then grow them to an appropriate size. I'm going to use the Tiger Team script https://github.com/microsoft/...
AlexP012's user avatar
4 votes
1 answer
452 views

Introduction I have been reading many articles about deleting from a databases, and the perils of using the shrink command. However, I have an opportunity to move a database to a new server with a big ...
ErikEV's user avatar
  • 77
0 votes
2 answers
171 views

I have a table of almost one million rows with two columns of datatype varbinary. These two columns store binary data that causes the database to grow to 1 TB. As this database is also restored in ...
dennis's user avatar
  • 1
1 vote
1 answer
110 views

I recently updated a table in my database by saving small thumbnail images as a byte[] to a varbinary(max) column. This significantly improved the speed of loading thumbnails (previously I was loading ...
M_Lyons10's user avatar
4 votes
1 answer
573 views

I’m working with a 2.3TB primary data file and currently have about 1TB of unused space. Recently, I performed row-level compression on the largest table in the database, which reduced the table’s ...
c_tames1998's user avatar
0 votes
2 answers
557 views

My Azure Sql Database transaction log file is about 1 TB in size, but only 1 GB is in use: SELECT file_id, name, type_desc, CAST(FILEPROPERTY(name, 'SpaceUsed') AS decimal(19,4)) * 8 / 1024. AS ...
Greg's user avatar
  • 582
1 vote
1 answer
58 views

After shrinking of datafile there is around 180Gb of free space on hard drive (prior to operation shrink file dialog also shows that it is possible to free up around 180Gb of space). After 1-2 days ...
Andrew B's user avatar
  • 113
-5 votes
1 answer
172 views

When I try to make shrink data file like this: DBCC SHRINKFILE (N'DataFileName' , 1500) WITH WAIT_AT_LOW_PRIORITY I get the error: 'WAIT_AT_LOW_PRIORITY' is not a recognized option. What can be the ...
Maria's user avatar
  • 1
0 votes
0 answers
34 views

In an AG always on configuration (primary) I have a database with 10TB datafile, 50% of the datafile is a free space. Then, I want to reduce this DATAFILE from 10TB to 8TB. How to proceed for that ...
user avatar
0 votes
1 answer
192 views

After 5 years of work on our Sql Server database, I plan to carry out a maintenance on, and we plan to eliminate more than 170 GB of useless data by truncating some tables, and after that a Shrink ...
Mohammed Amine BENAMARA's user avatar
1 vote
2 answers
1k views

If I have an index with a default fill factor of 100%, and modifications result in a large amount of internal fragmentation (page splits, free space, etc.) so that many pages end up around 60% full ...
Marcus's user avatar
  • 89
-1 votes
1 answer
170 views

For couple of our SQL server databases on version SQL2017 APP team did purge to change retention on these partitioned tables which has released quite good amount of space. Some background- Before ...
Newbie-DBA's user avatar
0 votes
1 answer
55 views

My database has an MDF file of 56 GB and an LDF file of 263 GB, recovery model is setting to Full. So, I would like to shrink the LDF file because we are out of space. What specific size should I ...
luis.huallpa's user avatar

15 30 50 per page
1
2 3 4 5
16