有效收缩数据库的方法:
1、select *from sysfiles(查看日志或者数据库文件的fileid)
2、backup log 数据库名 with truncate_only
dbcc shrinkfile(fileid,100)(压缩日志文件到100M)
3、backup database 数据库名 with truncate_only
dbcc shrinkfile(fileid,100)(压缩数据库文件到100M)
收缩数据库,使数据库文件可用空间为10%
DBCC SHRINKDATABASE (database name, 10)
GO