Skip to content

Instantly share code, notes, and snippets.

@PCfromDCSnippets
Last active January 5, 2016 18:15
Show Gist options
  • Save PCfromDCSnippets/1d322b9c99a15e3be36b to your computer and use it in GitHub Desktop.
Save PCfromDCSnippets/1d322b9c99a15e3be36b to your computer and use it in GitHub Desktop.
Bring DB Back Online
#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