(MSSQL)Reducing LDF file size
1. 查詢’DBNAME_log’實際名稱
1 | SELECT * FROM SYS.DATABASE_FILES |
2. 將資料庫改成簡單(simple)模式
1 | ALTER DATABASE DBNAME SET RECOVERY SIMPLE |
3. SHRINKFILE
1 | USE *DBNAME* |
SHRINKFILE語法
1 | DBCC SHRINKFILE |
4. 將資料庫改回完整(FULL) 模式
1 | ALTER DATABASE DBNAME SET RECOVERY FULL |