Created
May 4, 2017 17:29
-
-
Save tkMageztik/ce2c40f93bfd85885a414b63aec05057 to your computer and use it in GitHub Desktop.
Renombrar base de datos, incluye restricción de base de datos, más potente que hacerlo por GUI
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
USE MASTER | |
ALTER DATABASE NOMBRE_ANTIGUO | |
SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE | |
GO | |
sp_rename 'NOMBRE_ANTIGUO', 'NUEVO_NOMBRE' ,'DATABASE'; | |
GO | |
ALTER DATABASE NUEVO_NOMBRE | |
SET MULTI_USER | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment