清除資料庫連線記錄 USE [master] DECLARE @return_value int EXEC @return_value = [dbo].[KillAllProcesses] @dbName = N'TOBACCO' SELECT 'Return Value' = @return_value 查詢資料庫連線記錄 use master exec sp_who 'tobacco'