先確認資料庫的邏輯名稱  Select * from sys.database_files   後續以Northwind為例說明:  SET NOCOUNT ON      DECLARE @LogicalFileName sysname,             @MaxMinutes INT ,             @NewSize INT       -- *** MAKE SURE TO CHANGE THE NEXT 4 LINES WITH YOUR CRITERIA. ***      USE     Northwind               -- This is the name of the database                                    -- for which the log will be shrunk.      SELECT   @LogicalFileName = 'Northwind_Log' ,   -- Use sp_helpfile to        -- identify the logical file        -- name that you want to shrink.             @MaxMinutes = 10 ,       -- Limit on time allowed to wrap log.             @NewSize    =...