Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server 2019 (15.x) and later - Windows only
Attribute | Value |
---|---|
Product Name | SQL Server |
Event ID | 912 |
Event Source | MSSQLSERVER |
Component | SQLEngine |
Symbolic Name | DB_RUNSCRIPTUPGRADE_STEP_FAILED |
Message Text | Script level upgrade for database '%.*ls' failed because upgrade step '%.*ls' encountered error %d, state %d, severity %d. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion. |
Error 912 indicates that the database script failed to be executed and to upgrade the database(s) to the latest level required by the server. It is a general error message that contains a reference to the upgrade script that failed and what error the failed script encountered.
When SQL Server is upgraded or a Cumulative Update is applied, only the binaries are upgraded initially. The database and its objects remain unmodified. Once the binaries are replaced with new versions and the service restarts for the first time, a database upgrade is started. The upgrade scripts to be executed are located under C:\Program Files\Microsoft SQL Server\MSSQLXX.YYYY\MSSQL\Install.
If the upgrade process encounters script-level upgrade errors (Error 912), other errors may be raised. For example, these errors may accompany error 912 and help further explain the failure:
Error: 1101, Severity: 17, State: 1.
Could not allocate a new page for database 'tempdb' because of insufficient disk space in filegroup 'PRIMARY'. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
Error: 912, Severity: 21, State: 2.
Script level upgrade for database 'master' failed because upgrade step 'xxx.sql' encountered error <Error Number>, state <Error State>, severity <Error Severity>. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.
Error: 3417, Severity: 21, State: 3.
Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.
Commonly when the installation process fails, the user may see the following error in the GUI, assuming the installation is done manually using the Wizard. Keep in mind that this error may be raised with a wide variety of installation issues. But in all cases it directs you to check the SQL Server error log for more information.
Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
To find the cause of the issue, follow these steps:
For more information on how to configure startup-options, see SQL Configuration Manager Services - Configure Server Startup Options
Note
Be sure to remove -T902 from the configuration once you have resolved the issue.
Open a command prompt with administrative privileges and change directory to the SQL Server Binn directory, for example, C:\Program Files\Microsoft SQL Server\MSSQLXX.YYYY\MSSQL\Binn.
Execute the sqlservr.exe -s <instance> -T902
Default Instance:
cd \Program Files\Microsoft SQL Server\MSSQL<version>\MSSQL\Binn
sqlservr.exe -s MSSQLSERVER -T902
Named Instance, where "sql2016" is an example of an instance name:
cd \Program Files\Microsoft SQL Server\MSSQL<version>.<instance name>\MSSQL\Binn
sqlservr.exe -s sql2016 -T902
To stop the instance when you finished, press CTRL+C
, then Y
Default Instance:
NET START MSSQLSERVER /T902
Named Instance:
NET START MSSQL$INSTANCENAME /T902
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today