Is it possible to rename a database? If so, how would you rename the database?

Technology CommunityCategory: T-SQLIs it possible to rename a database? If so, how would you rename the database?
VietMX Staff asked 3 years ago
  • Yes – Databases can be renamed in similar manners as other relational database objects.
    • It is possible to rename a database by one of these options:
      • Issue the sp_renamedb system stored procedure.
      • Issue the sp_rename system stored procedure and specify ‘database’ as the parameter.
      • Use Management Studio by right clicking on the database and selecting the ‘Rename’ option.