Later I got the following message when I tried to query the user DBs.
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Invalid object name 'master.dbo.spt_values'. (Microsoft SQL Server, Error: 208)
There is one more table that I had dropped which needed to be recreated and that was 'spt_monitor'. Fortunately, I was doing this on in my test environment and did have a backup of the master database. But I still wanted to find out about these tables. So after some quick googling I found some information regarding this tables. I also found out that we can recreate these tables using some scripts that are located in 'Your SQL Server Install Dir/MSSQL/Install' directory. The script is called 'u_tables.sql' and once you use that to create these two tables the error went away. In case the scripts are missing from the directory that I mentioned please send me an email and I will reply back with the scripts.
Things learned today.
- Always have backups of all DBs.
- Never delete without taking backups.
- If you accidentally delete something then do not panic. GoogleMan will come to your rescue.