Questions tagged [shrink]

42 questions
47
votes
6 answers

How to check progress of DBCC SHRINKFILE?

Is there a way to find out the progress of DBCC SHRINKFILE statement? Here is how I was running it dbcc shrinkfile('main_data', 250000) I am running above statement on both SQL Server 2005 and 2008. [UPDATE] Here is the query I ran to check the…
dance2die
  • 1,961
  • 7
  • 31
  • 40
12
votes
3 answers

How to restore a SQL Server database and shrink its files at the same time?

Let's say I have a SQL Server database whose data files have been created with an initial size of 100 GB, but it only contains 10 GB of data. A database backup will then be only 10 GB in size. I want to restore this backup to a different server (or…
Massimo
  • 68,714
  • 56
  • 196
  • 319
10
votes
3 answers

How do I shrink the size of a SQL Server log file

I can't figure out how to shrink the size of the databases ldf file. The DBA says I should use backup log dbname with truncate_only And while that looks like it executed correctly in SQL Query Analyzer the ldf file is still over 2…
Ron Tuffin
  • 495
  • 2
  • 9
  • 12
7
votes
2 answers

VMplayer Virtual Disk Shrinking/Compacting/Defragmenting

I am using VMplayer on Windows 7 and 2008 R2. Inside the guest OS, in VMware tools, there is a "Prepare to shrink" option on the "Shrink" tab. In the host VMplayer menu there is "Defragment" and "Compact" options (available when the VM is shut…
fupsduck
  • 173
  • 1
  • 1
  • 5
6
votes
5 answers

Which version of ZFS allows shrinking of a pool?

I found a list of versions and their Solaris release numbers http://download.oracle.com/docs/cd/E19253-01/819-5461/appendixa-1/index.html I know that you can grow a pool by replacing drives with larger ones or adding new drives or mirrors to the…
700 Software
  • 2,163
  • 9
  • 47
  • 77
5
votes
1 answer

Google compute engine - shrinking disks

I have a 5TB HD and I want to shrink it to 2TB. I use Google Compute Engine PaaS. How can I do that? Can you suggest any tools to perform this manually if this cannot be solved by Google's tools?
Eran Betzalel
  • 347
  • 1
  • 3
  • 10
4
votes
2 answers

SQL Server: How to shrink FileStream files?

For a project, I'm using a SQL Server 2008 R2. One table has a filestream column. I've made some load tests, and now the database has ~20GB used. I've empty tables, except several(configuration tables). But my database was still using a lot of…
J4N
  • 167
  • 1
  • 2
  • 8
4
votes
3 answers

Shrink SQL Server data file, but not all at once?

I have a database file that's currently 150GB, but only 75GB is being used - it's because I moved all the indexes (the other 75GB) to a new data file. I'd like to reclaim at least part of the space from this data file, but when I attempt to shrink…
SqlRyan
  • 906
  • 5
  • 13
  • 22
3
votes
3 answers

Ways of estimating the time to perform a database shrink on SQL Server

Is there a way to approximate how long a shrink will take on a SQL Server database? Are there tools available that could provide some guesstimate? We have very large databases, so it would be good to know how long the database would be unavailable…
3
votes
3 answers

Shrink Sql Server database

My SQL Server 2008 database file (.mdf) file is nearly 24 MB but the log file grown upto 15 GB. If I want to shrink database what are the important points to take into consideration? Will shrink causes any index fragmentation and does it affect my…
hani
3
votes
2 answers

Do we have a ratio between DB data and log file?

OK we all know that a big log file crumbles DB performance. Today we were analyzing a client's server and saw some log files about 3900% bigger than the data file. And that made me curious if is there any best ratio between the two of them?
Paulo Santos
  • 173
  • 6
2
votes
1 answer

Keeping SQL Express below 4gb?

What would the recommended best practices to keep a SQL Express 2005 database below the 4gb limit? I am willing to export and archive content out of the data tables, but am not sure this will help once they have expanded. From what I read, it…
datatoo
  • 351
  • 3
  • 12
2
votes
1 answer

Hyper-V VHDx Compacting & SIzing Issue - No Minimum Size, Unable to Shrink

Trying to recover ~450GB unallocated space from a VHDx total filesize. Thanks for taking a look at this issue: Hyper-V Server 2012. Dynamic VHDx (we'll call it disk2.vhdx) with a file size of 1.5TB out of a maximum 2TB, does not contain Operating…
TSga
  • 21
  • 3
2
votes
3 answers

Resize RAID partition with GPT partition layout, without LVM

OK so I am a freelance sysadmin. I was asked to resize root partion (/) because it was 20Gb and /home was 3Tb. What I wasn't told is that the server is using RAID and GPT, so I can't use fdisk but will have to use parted, and I don't know if RAID…
thms0
  • 71
  • 9
2
votes
2 answers

SQL Server Transaction Log maximum file size

I have several databases, all in Simple recovery mode. There have been previous concerns about the log file sizes and I have shrunk them all using Management Studio's Shrink task. I have also placed a setting for the logs autogrowth to be a maximum…
Mike Richards
  • 123
  • 1
  • 1
  • 4
1
2 3