开发者

SQL Server Database Size Reduction Query

开发者 https://www.devze.com 2023-04-03 16:21 出处:网络
I have a SQL Server 2008 Express Database which is 7.8 GB in size DataFile 1.2 GB LogFile6.6 GB Recovery Model = Full

I have a SQL Server 2008 Express Database which is 7.8 GB in size

DataFile 1.2 GB

LogFile 6.6 GB

Recovery Model = Full

Auto Shrink = False

On a Live database, what is the best way to reduce the siz开发者_如何学编程e of this database?


Before you can shrink a database running in full recovery model, you must backup the transaction log. So the procedure is to run a transaction log backup, and then shrink the log file.

If you have never performed a transaction log backup then you will continue to suffer from run-away log files and shrinking it will only be a band-aid solution.


  • You can also identify unused tables and remove those tables(if there is)
  • you can create Archive database that will stored some old unused data
  • you can normalize your database more to reduce table size.

hope this information helps you.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号