What is the SQL Server Master Database used for?
The master database is used by SQL Server to contain all of the system level information:
- Linked servers
- Configuration settings
- Information about the other databases on this instance and the location of their files
If the master database is not present, SQL Server cannot start.
This is way you should always take regular backups of the master database.
as if SQL Server suffers a failure, those changes will be lost and you’ll be in a lot of trouble.
So the master database is needed for SQL Server to work. Logic and objects needed to enable your application should not be tangled up in there so you should always avoid creating objects in the master database. Use a user database instead.
In saying that everyone has made the mistake of not specifying the database they want to USE in a script and by default objects get written to the Master database. Or you might have inherited the responsibility for an application which did not conform to best practices and it uses objects created in Master.
To gain visibility of these objects just run the script below.