3/20/2013 12:00:22 AM

SQL

How to take a db offline and back on again with SQL.

-- Take Offline ALTER DATABASE [MyDatabase] SET OFFLINE WITH ROLLBACK IMMEDIATE GO -- Put Online ALTER DATABASE [MyDatabase] SET ONLINE GO