Wednesday, September 11, 2013

SQL Server: Script to get database offline and bring online


Being DBA or database professional most of us need to take databases offline and bring online for many reason. Below script will hep you to take a database offline and bring line back.

USE master
GO
-- Script to take the database offline
ALTER DATABASE [Your DBNam>] SET OFFLINE WITH
ROLLBACK IMMEDIATE
GO

-- Script to bring the database online
ALTER DATABASE [Your DBNam>] SET ONLINE
GO






Please replace  with actual database name.

1 comment:

  1. Before you know it, an hour, then one other hour, then one other hour, will pass by earlier than your very eyes. Some of the House of Fun 빅카지노 free slot video games have in-game challenges, where you will be be} tasked with accumulating particular objects, or particular wins, or rolling fairytale characters as half of} their story. If would possibly be} taking part in} a video slot with one hundred paylines at $1 per line, your minimum bet is $100 per play. For larger payback percentage, increased scores as a participant and extra personalised consideration, you may wish to move over to the high-limit machines. Hareta gained loads of deal of} Coins, while Mitsumi didn't win anything, regardless of her taking part in} the slots via the entire chapter, refusing to go away until she had gained one thing. Since the slot machines are integral to acquiring TM64 in all different versions, Korean versions of those video games will sometimes reward the participant with the TM while talking to the Game Corner's receptionist.

    ReplyDelete