Very recently I was working on a data archival module. Project was almost 10+ years old and it kept very sensitive, huge data set. While testing this, accidentally I have deleted some required records from a shared development database which is not awesome at all. Only option that I had was restoring backup files. But developers who worked with me requested to keep the damage database, since they were not sync schema with the source controller. Only possibility that came to my mind was rename the damaged database and restore backup database with the original name. As all ways I googled it "how to rename a SQL server database", many articles were listed down in my search result but couldn't find a good all in one article. therefore thought of sharing what I learned. Understanding what we are going to do with the rename is important.Mainly this process can divided into three parts, Rename Database Rename Mappings Rename Files Following the order of above thre...