截断大表后如何缩小庞大的数据库 [英] How do I shrink a huge database after truncating big table

查看:39
本文介绍了截断大表后如何缩小庞大的数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近截断了一个包含1.5亿条记录的表格。数据库文件没有缩小一点,备份文件现在是8GB(即使删除了一个巨大的表,数据库大小仍然是250GB)。当我尝试恢复SQL想要分配相同的250GB,即使没有用它。

如何使数据库变小。

提前谢谢。

I recently truncated a table which contained 150 million records. The database files didnt shrink a little and the backup file now is 8gb (database size is 250GB even after deletion of a huge table). When I try to restore SQL wants to assign back the same 250GB even if there is no use for it.
How can I make the database smaller.
Thanks in advance.

推荐答案

MSDN 参考 [ ^ ] - 介绍如何通过SQL或SSMS。



您可能还想整理事务日志 [ ^ ]
MSDN reference[^] - gives ways of doing it via SQL or SSMS.

You might also want to tidy up the transaction logs[^]


这篇关于截断大表后如何缩小庞大的数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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