执行以下语句,在执行前将dbname修改为需要瘦身的数据库名称,执行后数据库日志文件将变为1M大小。 代码如下: backup log dbName with NO_LOG; backup log dbName with TRUNCATE_ONLY; DBCC SHRINKDATABASE(dbName);
backup log dbName with NO_LOG; backup log dbName with TRUNCATE_ONLY; DBCC SHRINKDATABASE(dbName);