Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikerodionov/85e61d01e2d4698841082cceb98fea51 to your computer and use it in GitHub Desktop.
Save mikerodionov/85e61d01e2d4698841082cceb98fea51 to your computer and use it in GitHub Desktop.
SELECT CONCAT('ALTER DATABASE [', name, '] SET READ_WRITE WITH NO_WAIT')
FROM sys.databases where is_read_only=1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment