how to rename database for Azure SQL Database code example
Example: rename azure database
USE master;
GO
ALTER DATABASE MyTestDatabase SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE MyTestDatabase MODIFY NAME = MyTestDatabaseCopy ;
GO
ALTER DATABASE MyTestDatabaseCopy SET MULTI_USER
GO