Bug in SSMS v19 Preview 4.0

Leo Mrozek 11 Reputation points
2023-01-07T19:13:48.41+00:00

Cannot connect to ANY database on my development machine with version 19.0 Preview 4.0. Will need to roll back in order just to WORK.

Please tell me if there is a work around. Below is the error message reported by SSMS.

Thanks
Leo Mrozek

===================================

Cannot connect to .\SQL2019.

===================================

Unable to load DLL 'Microsoft.Data.SqlClient.SNI.x86.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) (Microsoft.Data.SqlClient)


Program Location:

at Microsoft.Data.SqlClient.SNINativeManagedWrapperX86.UnmanagedIsTokenRestricted(IntPtr token, Boolean& isRestricted)
at Microsoft.Data.SqlClient.SNINativeMethodWrapper.UnmanagedIsTokenRestricted(IntPtr token, Boolean& isRestricted)
at Microsoft.Data.Win32NativeMethods.IsTokenRestrictedWrapper(IntPtr token)
at Microsoft.Data.ProviderBase.DbConnectionPoolIdentity.GetCurrent()
at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at Microsoft.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry)
at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry, SqlConnectionOverrides overrides)
at Microsoft.Data.SqlClient.SqlConnection.Open(SqlConnectionOverrides overrides)
at Microsoft.Data.SqlClient.SqlConnection.Open()
at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

SQL Server | Other
{count} votes

7 answers

Sort by: Most helpful
  1. Erland Sommarskog 121.9K Reputation points MVP Volunteer Moderator
    2023-01-07T19:32:30.163+00:00

    This is what happens when you don't read the documentation. No, please don't feel bad about it. I did the same mistake and ran into the same issue.

    I assume that you had SSMS 19 preview 3 installed. You need to uninstall and re-install for preview 4 to work. And this is clearly spelled out in the documentation.

    But as you and I agree, reading documentation? That's for whimps!

    6 people found this answer helpful.

  2. Rich McGee 5 Reputation points
    2023-01-25T00:12:52.56+00:00

    I had this exact same error goday when I upgraded to SSMS 19.4. My solution was to upgrade my V17 ODBC SQL Driver to the currently released version, which is V18 (Quick, only 7.5 mb) and then uninstall ODBC SQL Driver V17 from the Control panel.

    Restarted SMSS V19.4, and all is well for me.

    Good luck!

    1 person found this answer helpful.

  3. Yitzhak Khabinsky 26,586 Reputation points
    2023-02-01T16:18:33.3333333+00:00

    Hi @Leo Mrozek,

    It is a two-step process:

    1. Uninstall any SSMS 19 preview version.
    2. Install SSMS 19 (GA) version.

    SSMS 19.0 is the latest general availability (GA) version. Release date: January 26, 2023

    1 person found this answer helpful.
    0 comments No comments

  4. Ahmed Hamdy 50 Reputation points
    2023-02-20T13:40:35.0466667+00:00
    This method had worked with me 👉 if this file "Microsoft.Data.SqlClient.SNI.x86.dll"
    is not exists in this path:
    "C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Common7\IDE"
    Steps:
        1.Download the file "link in attached text document 👇"
    Unable to load DLL 'Microsoft.Data.SqlClient.SNI.x86.dll.txt
        2.Copy and Past it to "C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Common7\IDE"
        3.Run the SQL Server Management Studio Management Studio 19 (Worked with me ✔)
    
    1 person found this answer helpful.

  5. LiHongMSFT-4306 31,571 Reputation points
    2023-01-09T07:37:52.473+00:00

    Hi @Leo Mrozek
    There are several known issues with 19.0 Preview 4. See: Release notes for SQL Server Management Studio (SSMS) 19 (Preview)
    As Viorel commented, try install the latest general availability (GA) release of SSMS 18.12.1 which is more reliable.

    Best regards,
    Li Hong


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.