question

NickDiaz-9048 avatar image
0 Votes"
NickDiaz-9048 asked AlbertoMorillo edited

Full Disk Capacity

Is it possible to shrink the used space without (or minimal impact) to the database performance.

My SQL managed instance is nearing its disk capacity .

I know that the disk can. be shrunk so please let me know what would be the best approach on proceeding with it.

Many Thanks

azure-sql-database
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AlbertoMorillo avatar image
0 Votes"
AlbertoMorillo answered AlbertoMorillo edited

Fragmentation of indexes can consume a lot of storage space as explained here. Rebuild highly fragmented indexes. Use the ONLINE option, and use PAUSE and RESUME to avoid impacting end users. Shrink databases after rebuild indexes during maintenance hours, after rebuilding indexes you will have a good amount of reserved space (free space) you can recover with a shrink operation.

Run sp_helpfile to verify the log is not consuming storage space also. If the log is big run the following statement to recover space.

 DBCC SHRINKFILE (log, 0)

Please run the following special store procedure to know which database file has a big size.

 sp_helpfile




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.