Last active
January 5, 2016 18:15
-
-
Save PCfromDCSnippets/1d322b9c99a15e3be36b to your computer and use it in GitHub Desktop.
Bring DB Back Online
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Bring DBs Online | |
$query5 = "ALTER DATABASE [" + $dbName + "] SET ONLINE;" | |
Write-Output "Bring $dbName ONLINE..." | |
Invoke-Sqlcmd -Query $query5 | |
#endregion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment