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-17892-database-engine-error.md
+46-12Lines changed: 46 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,8 @@ description: "MSSQLSERVER_17892"
4
4
author: suresh-kandoth
5
5
ms.author: sureshka
6
6
ms.reviewer: jopilov, mathoma
7
-
ms.date: 08/20/2020
7
+
ms.date: 02/06/2026
8
+
ai-usage: ai-assisted
8
9
ms.service: sql
9
10
ms.subservice: supportability
10
11
ms.topic: "reference"
@@ -27,7 +28,7 @@ helpviewer_keywords:
27
28
28
29
## Explanation
29
30
30
-
Error 17892 is raised when a logon trigger code cannot execute successfully. [Logon Triggers](../triggers/logon-triggers.md) fire stored procedures in response to a LOGON event. This event is raised when a user session is established with an instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. An error message like the following is reported to the user:
31
+
Error 17892 is raised when a logon trigger code cannot execute successfully. [Logon Triggers](../triggers/logon-triggers.md) fire stored procedures in response to a LOGON event. This event is raised when a user session is established with an instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. The following error message is reported to the user:
31
32
32
33
> Msg 17892, Level 14, State 1, Server \<Server Name>, Line 1
33
34
Logon failed for login \<Login Name> due to trigger execution.
@@ -41,7 +42,7 @@ The problem could occur if there is an error when executing trigger code for tha
41
42
42
43
## User action
43
44
44
-
You can use one of the resolutions below depending on the scenario you are in.
45
+
You can use one of the following resolutions depending on your scenario:
45
46
46
47
-**Scenario 1**: You currently have access to an open session to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] under an admin account
47
48
@@ -51,32 +52,56 @@ You can use one of the resolutions below depending on the scenario you are in.
51
52
52
53
- Example 2: If an object referred to by the trigger code does exist but users do not have permissions, grant them the necessary privileges to access the object.
53
54
54
-
Alternatively, you can just drop or disable the login trigger so that users can continue to log in to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
55
+
Alternatively, you can just drop or disable the login trigger so that users can continue to log in to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
Disable a logon trigger temporarily without deleting it:
68
+
69
+
```sql
70
+
DISABLE TRIGGER trigger_name ON ALL SERVER;
71
+
```
72
+
73
+
Drop (delete) a logon trigger permanently:
74
+
75
+
```sql
76
+
DROPTRIGGER trigger_name ON ALL SERVER;
77
+
```
78
+
79
+
For more information, see [Manage trigger security](../triggers/manage-trigger-security.md#trigger-security-best-practices).
55
80
56
81
-**Scenario 2**: You do not have any current session that is open under admin privileges, but Dedicated Administrator Connection (DAC) is enabled on the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
57
82
58
-
In this case, you can use the DAC connection to take the same steps as discussed in Case 1 since DAC connections are not affected by Login triggers. For more information on DAC connection, see:
83
+
In this case, you can use the DAC connection to take the same steps described in Scenario 1. Logon triggers don't affect DAC connections. For more information on DAC connection, see:
59
84
[Diagnostic Connection for Database Administrators](../../database-engine/configure-windows/diagnostic-connection-for-database-administrators.md).
60
85
61
-
To check whether DAC is enabled on your [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], you can check [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] error logfor a message that is similar to the following:
86
+
To check whether DAC is enabled, review the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] error log. Look for a message similar to this example:
62
87
63
88
> 2020-02-09 16:17:44.150 Server Dedicated admin connection support was established for listening locally on port 1434.
64
89
65
-
-**Scenario 3**: You neither have DAC enabled on your server nor have an existing admin session to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
90
+
-**Scenario 3**: DAC isn't enabled on your server, and you don't have an existing admin session to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
66
91
67
92
In this scenario, the only way to remediate the problem would be to take the following steps:
68
93
69
94
1. Stop [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] and related services.
70
-
2. Start [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] from the [command prompt](/previous-versions/sql/sql-server-2008-r2/ms180965(v=sql.105)) using the startup parameters `-c`, `-m`, and `-f`. Doing this disables the login trigger and lets you perform the same remedial measures that are discussed under **Case 1** above.
95
+
2. Start [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] from the [command prompt](/previous-versions/sql/sql-server-2008-r2/ms180965(v=sql.105)) using the startup parameters `-c`, `-m`, and `-f`. This action disables the login trigger and lets you perform the same remedial measures described in Scenario 1.
71
96
72
97
> [!NOTE]
73
-
> The above procedure requires a *SA* or an equivalent administrator account.
98
+
> This procedure requires a system administrator (SA) or equivalent administrator account.
74
99
75
100
For more information about these and other startup options, see: [Database Engine Service Startup Options](../../database-engine/configure-windows/database-engine-service-startup-options.md).
76
101
77
102
## More information
78
103
79
-
Another situation where log on triggers fail is when using the `EVENTDATA` function. This function returns XML, and its casesensitive. So, you create the following logon trigger, intending to block access based on IP address, you can ran into the issue:
104
+
Logon triggers can also fail when using the `EVENTDATA` function incorrectly. The `EVENTDATA`function returns XML and is case-sensitive. For example, if you create the following logon triggerto block access based on IP address, you might encounter error 17892 if the XML path uses incorrect casing:
80
105
81
106
```sql
82
107
CREATETRIGGERtr_logon_CheckIP
@@ -95,10 +120,19 @@ Another situation where log on triggers fail is when using the `EVENTDATA` funct
95
120
GO
96
121
```
97
122
98
-
User didn't maintain case when copying this script from the internet on this part of the trigger:
123
+
If you don't maintain proper case-sensitivity when copying this script, specifically in this part of the trigger, the trigger fails:
99
124
100
125
```sql
126
+
-- Incorrect: lowercase 'event_instance' and 'clienthost' will cause EVENTDATA to return NULL
As a consequence, `EVENTDATA` always returned **NULL**, and all their SA equivalent logins were denied access. In this case, the DAC connection was not enabled, so we had no choice but to restart the server with the startup parameters listed above to drop the trigger.
130
+
As a consequence, `EVENTDATA` always returns **NULL**, and all SA equivalent logins are denied access. In this case, if the DAC connection isn't enabled, you need to restart the server with the startup parameters described earlier to drop the trigger.
|[Microsoft Purview: Govern using DevOps and data owner policies](/azure/purview/tutorial-register-scan-on-premises-sql-server)| Yes | Yes | Yes | Yes |
55
-
|[Automated backups to local storage (preview)](../backup-local.md)| Yes | Yes | Yes | Yes |
|[Microsoft Purview: Govern using DevOps and data owner policies](/azure/purview/tutorial-register-scan-on-premises-sql-server)| Yes | Yes | Yes | Yes | Yes |
55
+
|[Automated backups to local storage (preview)](../backup-local.md)| Yes | Yes | Yes | Yes | Yes |
|[Operate with least privilege](../configure-least-privilege.md)| Yes | Yes | Yes | Yes | Yes |
63
63
64
-
<sup>1</sup> SQL Server 2025 (17.x) introduces separate Enterprise Developer and Standard Developer editions of SQL Server. Enterprise Developer has the same features as Enterprise edition, and Standard Developer has the same features as Standard edition.
Copy file name to clipboardExpand all lines: docs/tools/sql-database-projects/get-started.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: "Get Started with SQL Database Projects"
3
-
description: "[Article description]."
2
+
title: Get Started with SQL Database Projects
3
+
description: A SQL database project is a local representation of SQL objects that comprise the schema for a single database, such as tables, stored procedures, or functions.
0 commit comments