Twitter

Thursday, April 11, 2013

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 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
 



2 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