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
Expected behaviour: The cmdlet should run without any error.
Actual Behaviour: The Invoke-SqlCmd cmdlet errors out saying the following:
"Method not found: 'Void Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.SqlColumnEncryptionAzureKeyVaultProvider..ctor(Azure.Core.TokenCredential)'."
Stack trace:
at Microsoft.SqlServer.Management.AlwaysEncrypted.Management.SqlAKVProviderWithDisposableCache..ctor(TokenCredential tokenCredential)
at Microsoft.SqlServer.Management.AlwaysEncrypted.Management.AlwaysEncryptedManagement.SetCustomProvidersWithDisposableCache(Boolean useGlobalCredential)
at Microsoft.SqlServer.Management.PowerShell.Shared.AzureKeyVaultUtilities.RegisterCustomKeyStoreProviders(String keyVaultAccessToken, String managedHsmAccessToken, SqlConnection conn)
at Microsoft.SqlServer.Management.PowerShell.GetScriptCommand.ProcessRecord()
The text was updated successfully, but these errors were encountered:
Repro steps:
Open PS5 and run the following snippet to get the error. The issue occurs with the specified version of the SqlServer PS module.
Import-Module SqlServer -RequiredVersion 22.0.59
Import-Module Az.Accounts
$connStr = "<connection_string_to_a_database.>"
$q = "a_simple_query_to_the_db"
Invoke-SqlCmd -ConnectionString $connStr -Query $q -QueryTimeout 60
Expected behaviour: The cmdlet should run without any error.
Actual Behaviour: The Invoke-SqlCmd cmdlet errors out saying the following:
"Method not found: 'Void Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.SqlColumnEncryptionAzureKeyVaultProvider..ctor(Azure.Core.TokenCredential)'."
Stack trace:
at Microsoft.SqlServer.Management.AlwaysEncrypted.Management.SqlAKVProviderWithDisposableCache..ctor(TokenCredential tokenCredential)
at Microsoft.SqlServer.Management.AlwaysEncrypted.Management.AlwaysEncryptedManagement.SetCustomProvidersWithDisposableCache(Boolean useGlobalCredential)
at Microsoft.SqlServer.Management.PowerShell.Shared.AzureKeyVaultUtilities.RegisterCustomKeyStoreProviders(String keyVaultAccessToken, String managedHsmAccessToken, SqlConnection conn)
at Microsoft.SqlServer.Management.PowerShell.GetScriptCommand.ProcessRecord()
The text was updated successfully, but these errors were encountered: