Install-CsDatabase Error (The CREATE DATABASE statement failed. The primary file must be at least %MB to accommodate a copy of the model database.)

If you are installing the Central Management Database (XDS) for a new Skype for Business/ Lync Deplyoment, you might run into an issue if the the SQL Server was installed much earlier than Lync will be.

Over the time the Model Database was increased to some new values.
It is necessary adjusting the Model Database in SQL back to 2MB, which is requried for initiating a new Database with the Lync integrated script.

Therefor you need to login to SQL Server and navigate to the System Databases and right cklick the MODEL DB and SHRINK it back (Database and File) to 2MB
The model database is an empty hull for each new database that should be created. If the size is not matching, you run into this common error.

In Lync deployment log, you will find the following error:

Feature: CentralMgmtStore   11.04.2013 10:18:10    
     └    SQL Instance: sql01.customer.com   11.04.2013 10:18:10    
     └    Collocated: False   11.04.2013 10:18:10    
     └    Found "RTCUniversalServerAdmins": True   11.04.2013 10:18:10    
     └    Found "RTCUniversalConfigReplicator": True   11.04.2013 10:18:10    
     └    Found "RTCUniversalReadOnlyAdmins": True   11.04.2013 10:18:10    
     └    InstallDatabaseInternalFailure: An internal error has occurred while trying to create or update the database.   11.04.2013 10:18:10   Error
     └   
Error: The CREATE DATABASE statement failed. The primary file must be at least 50 MB to accommodate a copy of the model database.

▼ Details
 


└ Type: SqlException
└ ► Stack Trace
 


The Technet Link supporting the task can be found here:
https://technet.microsoft.com/en-us/library/ms189080(v=sql.105).aspx



Comments

  1. This doesn't work.
    I've reset as far as model will allow me to set it. (currenty 300MB)
    The error now is "...must be at least 200MB..."
    Something just isn't right here

    ReplyDelete
  2. Hi,
    the Model DB can be set to any size 2MB and higher.
    Did you choose the System DB instead. Please check again let let me know
    Thomas

    ReplyDelete

Post a Comment

Popular posts from this blog

How to hide users from GAL if they are AD Connect synchronized

Cannot join external Lync Meeting: Lync Edge Server Single IP Address (Lync Edge Server Single IP Web Conferenceing Problem)

MFA with Guest Access and different tenants settings