When using SQL Server, if you want to change the name of a database, you can do this by using a GUI (like SSMS) or by using Transact-SQL.
If using a GUI, you can right-click on the database name and click Rename to rename the database (you might need to set the database to single-user mode first).
If you’re doing this using T-SQL, the examples on this page should help you out.