Skip to content

Instantly share code, notes, and snippets.

@ronascentes
Last active October 31, 2017 18:01
Show Gist options
  • Save ronascentes/b4a61f55e2b1503b2b31f4c7c9c18cdd to your computer and use it in GitHub Desktop.
Save ronascentes/b4a61f55e2b1503b2b31f4c7c9c18cdd to your computer and use it in GitHub Desktop.
Rename database
USE master
GO
ALTER DATABASE [ASPState] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE [ASPState] MODIFY NAME = ASPState_NEW
GO
ALTER DATABASE ASPState_NEW SET MULTI_USER
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment