BugZero found this defect 1308 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
7/24/2023
SQL Server 2017 on Windows (all editions)
SQL Server 2016 Enterprise Core - duplicate (do not use)
SQL Server 2016 Standard - duplicate (do not use)
SQL Server 2016 Developer - duplicate (do not use)
SQL Server 2016 Enterprise - duplicate (do not use)
build lower than 14.0.3006.16
14.0.3006.16
Consider the following scenario: You have a SQL CLR function in SQL Server 2016 and 2017. The CLR function invokes Transact-SQL statements through impersonation calls, such as by calling the EXECUTE AS statement. In this scenario, the execution fails, and you receive the following error message: Msg 6522, Level 16, State 1, Procedure PrcedureName, Line 0 [Batch Start Line LineNumber] A .NET Framework error occurred during execution of user-defined routine or aggregate "ProcedureName": System.Data.SqlClient.SqlException: The server principal "LoginName" is not able to access the database "DatabaseName" under the current security context.
This fix is included in Cumulative Update 1 for SQL Server 2017. Service pack information for SQL Server 2016 This issue is fixed in the following service pack for SQL Server: Service Pack 2 for SQL Server 2016
Each new build for SQL Server 2017 contains all the hotfixes and security fixes that were in the previous build. We recommend that you install the latest build for SQL Server 2017.