how to rename a sql server database code example
Example 1: sql server rename database
ALTER DATABASE MyTestDatabase MODIFY NAME = MyTestDatabaseCopy ;
Example 2: how to rename columns in sql server
EXEC sp_rename 'Sales.SalesTerritory.TerritoryID', 'TerrID', 'COLUMN';