Home > Miscellaneous > The use of MODEL and MSDB database in MS SQL Server

The use of MODEL and MSDB database in MS SQL Server

The Model database is also called as the template database.

 As the name suggests, it is the model to any database that is created in the database server. i.e. Every time one creates a new database in the server, a copy of model database is created. 

 If you modify the model database, all databases created afterward will inherit those changes. For example, you could set permissions or database options, or add objects such as tables, functions, or stored procedures to the model database to be inherited by every new database.

 The MSDB database is a system database and it is used mainly by the SQL Server Agent to store system activities like sql jobs, database mail, service broker, maintenance plans, user and system database backup history, etc..

 Just like the other user databases, we have to maintain and backup this database for the proper functioning of SQL Server Agent components.

 DDL and DML commands should be avoided on this database as it may cause database to malfunction and cause system failure. This database should not be altered or dropped and it should always be up and running for critical database related operations.

 

Post comments if this helps

This Article is TAGGED in , , , , , . BOOKMARK THE permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">