📜  在 sql server 中收缩数据库文件 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:04.511000             🧑  作者: Mango

代码示例1
USE SampleDataBase;
GO
-- Shrink the mdf file
DBCC SHRINKFILE(N'SampleDataBase', 0);
GO
-- Shrink the log.ldf file
DBCC SHRINKFILE(N'SampleDataBase_log', 0);
GO