Other core administration tasks include renaming, dropping, detaching, copying, and moving databases. These tasks are examined in this section.
You can rename user databases in SQL Server Management Studio and with the ALTER DATABASE MODIFY NAME statement. With the database in single-user or offline mode, right-click the database name in SQL Server Management Studio and select Rename from the shortcut menu. Then type the database name and press Tab.
To use T-SQL to put the database in single-user mode and change the name, complete the following steps:
Ask all users to disconnect from the database. Make sure that all SQL Server Management Studio connections to the database are closed. If necessary, kill the ...