Model Database in SQL Server

SQL Server

When you create a new database, SQL Server creates a copy of the Model database and gives it the name of your new database. When you issue the create command:

CREATE Database NewDB 
GO

SQL Server makes a copy of the already existing Model database. This can be helpful to understand, because you can make changes to the Model database, knowing that as you create a new database it will be a copy of the Model. If you have stored procedures or functions that you always want in a new database, put them in the Model database.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s