recovery model of model database

Sam 1,476 Reputation points
2024-01-24T07:10:59.55+00:00

Hi All, Is it good to leave "model" database recovery model as "FULL:" or change it to simple? is it just to ensure the newly created user databases to have FULL recovery model or is there any other good reason ? I see log backup pending for model database that's why asking this question. recovery model

Regards, Sam

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,911 questions
0 comments No comments
{count} votes

Accepted answer
  1. Erland Sommarskog 112.2K Reputation points MVP
    2024-01-24T22:45:16.5533333+00:00

    For a dev server where no one cares about log backups, it is a very good idea to set model to simple recovery. For the same reason, it is a very bad idea to do on production server. As for the log backup, I guess someone has made changes to it. If there is a table, or a set of tables, you want in every database, you can add that to model. But not very many people do. The one update I would recommend to do in model is this:

    DROP SCHEMA db_owner
    DROP SCHEMA db_accessadmin
    DROP SCHEMA db_securityadmin
    DROP SCHEMA db_ddladmin
    DROP SCHEMA db_backupoperator
    DROP SCHEMA db_datareader
    DROP SCHEMA db_datawriter
    DROP SCHEMA db_denydatareader
    DROP SCHEMA db_denydatawriter
    

    This removes a bunch of schemas that exist for backwards compatibility with SQL 2000, but which, hopefully, few people use in practice.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Olaf Helper 44,916 Reputation points
    2024-01-24T07:13:25.9533333+00:00

    The "model" system database is used as template, when you create a new user database. So if you change th recovery mode, all future databases get the same and you may have to remind it for the user database. https://learn.microsoft.com/en-us/sql/relational-databases/databases/model-database?view=sql-server-ver16

    0 comments No comments

  2. ZoeHui-MSFT 36,831 Reputation points
    2024-01-25T03:26:33.23+00:00

    Hi @Samantha r, User's image

    Best practice:  We recommend that you create only full database backups of model, as required. Because model is small and rarely changes, backing up the log is unnecessary.

    As said here.

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.