You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/relational-databases/errors-events/mssqlserver-912-database-engine-error.md
+23-9Lines changed: 23 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "MSSQLSERVER_912"
3
3
description: The database script level could not be upgraded to the latest required by the server.
4
4
ms.custom: ""
5
-
ms.date: "08/16/2021"
5
+
ms.date: "10/25/2022"
6
6
ms.prod: sql
7
7
ms.reviewer: ""
8
8
ms.technology: supportability
@@ -28,24 +28,38 @@ ms.author: jopilov
28
28
29
29
## Explanation
30
30
31
-
Error 912 indicates that the database script failed to 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.
31
+
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.
32
32
33
33
When [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] 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\.
34
34
35
35
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:
36
36
37
-
`Error: 1101, Severity: 17, State: 1.` </br>
38
-
`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.`
37
+
```output
38
+
Error: 1101, Severity: 17, State: 1.
39
+
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.
39
40
40
-
`Error: 912, Severity: 21, State: 2.` </br>
41
-
`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.`
41
+
Error: 912, Severity: 21, State: 2.
42
+
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.
42
43
43
-
`Error: 3417, Severity: 21, State: 3.` </br>
44
-
`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.`
44
+
Error: 3417, Severity: 21, State: 3.
45
+
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.
46
+
```
47
+
48
+
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.
49
+
50
+
```output
51
+
Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
52
+
```
53
+
54
+
:::image type="content" source="../media/upgrade-errors-check-errorlog.png" alt-text="upgrade failure in the GUI":::
45
55
46
56
## User action
47
57
48
-
To find the cause of the issue, you need to look at the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)][error log](../../tools/configuration-manager/viewing-the-sql-server-error-log.md). Examine the log for errors that occurred before error 912 and troubleshoot the error referenced in the messaging of Error 912. In some cases, as part of the process, you may need to start the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] service with [trace flag 902](../../t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql.md#tf902). This step allows the SQL service to skip the upgrade scripts execution during startup so that you get a chance to investigate and fix the issue. Be sure to remove the trace flag once you have resolved the issue so the setup process can restart the upgrade script execution.
58
+
To find the cause of the issue, follow these steps:
59
+
1. Locate and open the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)][Errorlog](../../tools/configuration-manager/viewing-the-sql-server-error-log.md).
60
+
1. Examine the log for errors that occurred immediately before error 912 and focus on troubleshooting the error referenced in the messaging of Error 912.
61
+
1. In some cases, as part of the process, you may need to start the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] service with [trace flag 902](../../t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql.md#tf902) (see steps below). Starting the service with T902 allows the service to skip execution of the upgrade scripts during startup. That way, you get a chance to investigate and fix the underlying issue.
62
+
1. Be sure to remove the trace flag once you have resolved the issue so the setup process can restart the upgrade script execution phase.
49
63
50
64
### Steps to start [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] with trace flag 902
0 commit comments