- 23 Apr 2024
- 2 Minutes to read
- Print
- DarkLight
- PDF
Pharos Blueprint installation fails to complete, with logged message "Error creating database: The CREATE DATABASE statement failed. The primary file must be at least "X" MB to accommodate a copy of the model database."
- Updated on 23 Apr 2024
- 2 Minutes to read
- Print
- DarkLight
- PDF
Problem
When installing the Pharos Analyst software, installation progresses well, but I get an "Assembly install Error" dialog (see "AssemblyInstallError.jpg" below) just when the install wizard is in the "Updating data" status.
When I go to the C:\ProgramData\PharosSystems\Blueprint\Logs directory, the CreateAnalystDatabase.sql.log file shows this error:
"Msg 50000, Level 16, State 127, Server BPE50, Line 206
Error creating database: The CREATE DATABASE statement failed. The primary file must be at least "X" MB to accommodate a copy of the model database." ("X" is any number, and indicates file size, in megabytes).
And the installation rolls back. Why? And how can I fix it?
Cause
The "initial size" of the databases created during installation are less than the initial size required by the SQL Server hosting the database.
Background
Blueprint Analyst installer utilizes information collected during the wizard and from within the license file to determine the "initial size" of the various databases that are created during installation. From a SQL Server standpoint, the initial size of any database is usually equal to the minimum hard disk space required to support the database and its application without requiring immediate growth.
Resolution
The minimum initial size of any newly-created database is controlled by the initial size of the SQL Server-built "model" database's data file. In SQL Server 2005, 2008, and 2008 R2, the initial size of the "model" database is around 1.3MB, which usually ends up rounding to 2MB. However, this can be changed very easily to a higher (although not lower) number, and can cause our installation to fail with the error message above. The value for "MB" in the message will reflect the initial size of the "model" database file.
The problem can be resolved by temporarily (or permanently, depending on the site's requirements) reducing the initial size of the "model" data file to something smaller, like 10 MB. To do this:
Launch the Microsoft SQL Server Management Studio application, connect to the database server, and log in as an account that has SYSADMIN permissions.
Expand Databases > System Databases.
Right-click the "model" database and choose Properties (see "InitSizeStep1.jpg" below).
Click the "Files" page. Note that the Initial Size specified for the "modeldev" file will equal the value shown in the Create Analyst error message (see "InitSizeStep2.jpg" below).
Click inside the Initial Size field and change it to 10 (see "InitSizeStep3.jpg" below).
Click the OK button.
After a brief pause, the main Microsoft SQL Server Management Studio interface will be returned. At this point, it is safe to exit this application and re-install Pharos Blueprint Analyst. In most cases, the initial size of the Blueprint databases is 100 MB, which will exceed the 10 specified for the "model" database.