减少SQL Server中的DB文件大小 [英] Reduce DB file size in SQL server

查看:132
本文介绍了减少SQL Server中的DB文件大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好团队,



我想知道如何减少数据库大小,我的情况在我的表中我有一个varchar列。一些表我将60天的旧记录值更新为null。但数据库大小尚未减少。如果我尝试缩小然后我可以感觉到日志文件中的大小差异,但.mdf文件没有看到任何重大差异。我不能放下专栏。是否有更好的方法来回收柱空间。



我尝试过:



我试过以下方法来减少空格

Hi Team,

I want to know How to reduce the DB Size, my case in my tables i've an varchar column. some tables im updating 60 days older record value as null. but the Database size is not yet reduced. if i tried shrink then i can feel the size difference in the log file but the .mdf file don't seen any major difference. I cant drop the column. is there is a better way to reclaim the column space.

What I have tried:

i've tried below methods to reduce spaces

01) DBCC CLEANTABLE (Test,"Testfreespace")




02) Shrink Database

推荐答案

从文档开始,在这里:DBCC SHRINKDATABASE(Transact-SQL)| Microsoft Docs [ ^ ]
Start with the documentation, here : DBCC SHRINKDATABASE (Transact-SQL) | Microsoft Docs[^]


这篇关于减少SQL Server中的DB文件大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆