第一步 將資料庫轉換成 ****** 模式
use master
goalter database 所要刪除日誌的資料庫名 set recovery ****** with no_wait
go第二步 收縮資料庫
use 所要刪除日誌的資料庫名
godbcc shrinkdatabase(n'所要刪除日誌的資料庫名')
go第三步 將資料庫轉換成原來的模式
use master
goalter database 所要刪除日誌的資料庫名 set recovery full with no_wait
go
SqlServer清理資料庫日誌
在sqlserver資料庫資料量提公升和大量的運算元據庫,不免產生很多的資料庫日誌,可以通過sqlserver自帶的作業進行定期的資料庫日誌清理,如下 清空所有資料庫日誌 declare exec sql nvarchar 1200 sql nvarchar 1200 full sql nvarch...
sql server 資料庫日誌清理
sql server 資料庫日誌清理 use master goalter database 資料庫名 set recovery with no wait goalter database 資料庫名 set recovery gouse 資料庫名 godbcc shrinkfile n 資料庫日誌檔...
sql server收縮資料庫日誌
alter database testdbname set recovery 將 恢復模式 設定為 簡單 gouse testdbname godbcc shrinkfile n testdbname log 1 truncateonly 收縮日誌檔案大小到1m gouse testdbname g...