清理历史记录

BACKUP LOG DateBaseName WITH TRUNCATE_ONLY
DBCC ShrinkDatabase(DateBaseName)

设定数据库自动缩小, 默认值为OFF

ALTER DATABASE DateBaseName SET AUTO_SHRINK ON