Skip to content

Commit 08fac81

Browse files
authored
Merge pull request #17711 from cobibi/sql-docs-pr-cobibi2
Add 2 sqlserver errors-events articles on 10/28
2 parents 8b7d588 + 4089851 commit 08fac81

4 files changed

Lines changed: 135 additions & 2 deletions

File tree

docs/relational-databases/errors-events/database-engine-events-and-errors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3988,7 +3988,7 @@ ORDER BY message_id
39883988
| 8628 | 17 | Yes | A time out occurred while waiting to optimize the query. Rerun the query. |
39893989
| [8630](mssqlserver-8630-database-engine-error.md) | 17 | No | Internal Query Processor Error: The query processor encountered an unexpected error during execution. |
39903990
| 8631 | 17 | No | Internal error: Server stack limit has been reached. Please look for potentially deep nesting in your query, and try to simplify it. |
3991-
| 8632 | 17 | No | Internal error: An expression services limit has been reached. Please look for potentially complex expressions in your query, and try to simplify them. |
3991+
| [8632](mssqlserver-8632-database-engine-error.md) | 17 | No | Internal error: An expression services limit has been reached. Please look for potentially complex expressions in your query, and try to simplify them. |
39923992
| 8633 | 16 | No | The query processor could not produce a query plan because distributed query does not support materializing intermediate results with default in DML queries over remote sources. Try to use actual default values instead of default or split the update into multiple statements, one only containing the DEFAULT assignment, the other with the rest. |
39933993
| 8634 | 17 | No | The query processor received an error from a cluster communication layer. |
39943994
| 8635 | 16 | No | The query processor could not produce a query plan for a query with a spatial index hint. Reason: %S_MSG. Try removing the index hints or removing SET FORCEPLAN. |
@@ -6399,7 +6399,7 @@ ORDER BY message_id
63996399
| 15578 | 16 | No | There is already a master key in the database. Please drop it before performing this statement. |
64006400
| 15579 | 16 | No | Adding an encryption to the symmetric key failed. An encryption by the same %S_MSG '%.*s' may already exist. |
64016401
| 15580 | 16 | No | Cannot drop %S_MSG because %S_MSG '%.*s' is encrypted by it. |
6402-
| 15581 | 16 | No | Please create a master key in the database or open the master key in the session before performing this operation. |
6402+
| [15581](mssqlserver-15581-database-engine-error.md) | 16 | No | Please create a master key in the database or open the master key in the session before performing this operation. |
64036403
| 15583 | 10 | No | The module being signed is marked to execute as owner. If the owner changes the signature will not be valid. |
64046404
| 15584 | 10 | No | An error occurred while decrypting %S_MSG '%.*ls' that was encrypted by the old master key. The error was ignored because the FORCE option was specified. |
64056405
| 15585 | 10 | No | The current master key cannot be decrypted. The error was ignored because the FORCE option was specified. |
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
description: "MSSQLSERVER_15581"
3+
title: MSSQLSERVER_15581
4+
ms.custom: ""
5+
ms.date: 09/03/2020
6+
ms.prod: sql
7+
ms.reviewer: ramakoni1, pijocoder, suresh-kandoth, Masha, VenCher
8+
ms.technology: supportability
9+
ms.topic: "language-reference"
10+
helpviewer_keywords:
11+
- "15581 (Database Engine error)"
12+
ms.assetid:
13+
author: suresh-kandoth
14+
ms.author: ramakoni
15+
---
16+
# MSSQLSERVER_15581
17+
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
18+
19+
## Details
20+
21+
|Attribute|Value|
22+
|---|---|
23+
|Product Name|SQL Server|
24+
|Event ID|15581|
25+
|Event Source|MSSQLSERVER|
26+
|Component|SQLEngine|
27+
|Symbolic Name|SEC_NODBMASTERKEYERR|
28+
|Message Text|Please create a master key in the database or open the master key in the session before performing this operation.|
29+
||
30+
31+
## Explanation
32+
33+
Error 15581 is raised when [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] is not able to recover a database that is enabled for transparent data encryption (TDE). An error message like the following is logged in the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] error log
34+
35+
> 2020-01-14 22:16:26.47 spid20s Error: 15581, Severity: 16, State: 3.
36+
2020-01-14 22:16:26.47 spid20s Please create a master key in the database or open the master key in the session before performing this operation.
37+
38+
## Possible cause
39+
40+
This issue occurs when service master key encryption for the database master key in the master database is removed when the following command is run:
41+
42+
```sql
43+
Use master
44+
go
45+
alter master key drop encryption by service master key
46+
```
47+
48+
The service master key is used to encrypt the certificate that is used by the database master key. Any attempt to use the TDE-enabled database requires access to the database master key in the master database. A master key that is not encrypted by the service master key must be opened by using the [OPEN MASTER KEY (Transact-SQL)](/sql/t-sql/statements/open-master-key-transact-sql) statement together with a password on each session that requires access to the master key. Because this command cannot be run on system sessions, recovery cannot be completed on TDE-enabled databases.
49+
50+
## User action
51+
52+
To resolve the issue, enable automatic decryption of the master key. To do this, run the following commands:
53+
54+
```sql
55+
Use master
56+
go
57+
open master key DECRYPTION BY PASSWORD = 'password'
58+
alter master key add encryption by service master key
59+
```
60+
61+
Use the following query to determine whether automatic decryption of the master key by the service master key was disabled for the master database:
62+
63+
```sql
64+
select is_master_key_encrypted_by_server from sys.databases where name = 'master'
65+
```
66+
67+
If this query returns a value of 0, automatic decryption of the master key by the service master key was disabled.
68+
69+
## More information
70+
71+
In some cases, the instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] may appear unresponsive. If you query `sys.dm_exec_requests` dynamic management view, you notice that the `LogWriter` thread and other threads that are performing DML operations are waiting indefinitely with WRITELOG wait_type. Other sessions may also be waiting while they try to obtain locks.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
description: "MSSQLSERVER_8632"
3+
title: MSSQLSERVER_8632
4+
ms.custom: ""
5+
ms.date: 10/27/2020
6+
ms.prod: sql
7+
ms.reviewer: ramakoni1, pijocoder, suresh-kandoth, vencher, tejasaks, docast
8+
ms.technology: supportability
9+
ms.topic: "language-reference"
10+
helpviewer_keywords:
11+
- "8632 (Database Engine error)"
12+
ms.assetid:
13+
author: suresh-kandoth
14+
ms.author: ramakoni
15+
---
16+
# MSSQLSERVER_8632
17+
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
18+
19+
## Details
20+
21+
|Attribute|Value|
22+
|---|---|
23+
|Product Name|SQL Server|
24+
|Event ID|8632|
25+
|Event Source|MSSQLSERVER|
26+
|Component|SQLEngine|
27+
|Symbolic Name|QUERY_EXPRESSION_TOO_COMPLEX|
28+
|Message Text|Internal error: An expression services limit has been reached. Please look for potentially complex expressions in your query, and try to simplify them.|
29+
||
30+
31+
## Explanation
32+
33+
Error 8632 is raised when you run a query in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] that contains a large number of identifiers and constants in a single expression. An error message like the following is reported to the user:
34+
35+
> Server: Msg 8632, Level 17, State 2, Line 1
36+
Internal error: An expression services limit has been reached. Please look for potentially complex expressions in your query, and try to simplify them.
37+
38+
## Cause
39+
40+
This issue occurs because [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] limits the number of identifiers and constants that can be contained in a single expression of a query. This limit is 65,535. For example, the following query only has one expression:
41+
42+
```sql
43+
select a, b + c, d + e
44+
```
45+
46+
This expression retrieves all five columns, calculates the addition operators, and sends three projected results to the client.
47+
48+
The test for the number of identifiers and constants is performed after [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] expands all referenced identifiers and constants. For example, the following items may be expanded:
49+
50+
- The asterisk (*) in the select list
51+
- A view
52+
- A computed column definition
53+
54+
If the number after the expansion exceeds the limit, the query cannot run.
55+
56+
## User action
57+
58+
To work around this issue, rewrite your query. Reference fewer identifiers and constants in the largest expression in the query. You must make sure that the number of identifiers and constants in each expression of the query does not exceed the limit. To do this, you may have to break down a query into more than one single query. Then, create a temporary intermediate result.

docs/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10637,6 +10637,8 @@
1063710637
href: relational-databases/errors-events/mssqlserver-8621-database-engine-error.md
1063810638
- name: 8630
1063910639
href: relational-databases/errors-events/mssqlserver-8630-database-engine-error.md
10640+
- name: 8632
10641+
href: relational-databases/errors-events/mssqlserver-8632-database-engine-error.md
1064010642
- name: 8642
1064110643
href: relational-databases/errors-events/mssqlserver-8642-database-engine-error.md
1064210644
- name: 8645
@@ -10775,6 +10777,8 @@
1077510777
href: relational-databases/errors-events/mssqlserver-15404-database-engine-error.md
1077610778
- name: 15517
1077710779
href: relational-databases/errors-events/mssqlserver-15517-database-engine-error.md
10780+
- name: 15581
10781+
href: relational-databases/errors-events/mssqlserver-15581-database-engine-error.md
1077810782
- name: 15599
1077910783
href: relational-databases/errors-events/mssqlserver-15599-database-engine-error.md
1078010784
- name: 15661

0 commit comments

Comments
 (0)