Changing a SQL database name

 

USE master;
alter database DB1_DEV set SINGLE_USER with rollback immediate
go

ALTER DATABASE DB1_DEV
Modify Name = DB1;
GO

 

 

alter database DB1 set MULTI_USER
go

1 Comment

  1. Pingback: learnSQL.99hosting.info » Blog Archive » Changing a SQL database name | Tech Tips

Leave a Comment

Your email address will not be published. Required fields are marked *