T-SQL Script: Set a Database Offline T-SQL Script: Set a Database Offline ALTER DATABASE [DBName] SET OFFLINE WITH NO_WAIT;