Nota
O acesso a esta página requer autorização. Podes tentar iniciar sessão ou mudar de diretório.
O acesso a esta página requer autorização. Podes tentar mudar de diretório.
Aplica-se a:SQL Server
Informações suplementares sobre o SQL Server Connector são fornecidas neste artigo. Para obter mais informações sobre o conector do SQL Server, consulte Extensible Key Management Using Azure Key Vault (SQL Server), Configurar o Gerenciamento Extensível de Chaves TDE do SQL Server usando o Azure Key Vaulte Usar o SQL Server Connector com Recursos de Criptografia SQL.
Observação
Embora o Microsoft Entra ID seja o novo nome para o Azure Ative Directory (Azure AD), para evitar a interrupção de ambientes existentes, o Azure AD ainda permanece em alguns elementos codificados, como campos de interface do usuário, provedores de conexão, códigos de erro e cmdlets. Neste artigo, os dois nomes são intercambiáveis.
Um. Instruções de manutenção para o SQL Server Connector
Rotação de chaves
O Azure Key Vault dá suporte à rotação de chaves, que é o processo de criação de uma nova chave e atualização dos aplicativos para usar a nova chave. A rotação de chaves é uma prática recomendada de segurança que ajuda a proteger os dados caso a chave seja comprometida. O SQL Server Connector dá suporte à rotação de chaves. As chaves antigas não devem ser excluídas, pois pode ser necessário restaurar um banco de dados usando uma chave antiga. Para girar uma chave, siga as etapas em Girar chave assimétrica com uma nova chave AKV ou uma nova versão de chave AKV.
Atualização do SQL Server Connector
As versões 1.0.0.440 e anteriores foram substituídas e não são mais suportadas em ambientes de produção. As versões 1.0.1.0 e mais recentes são suportadas em ambientes de produção. Use as instruções a seguir para atualizar para a versão mais recente disponível no Centro de Download da Microsoft.
Atualizar
- Pare o serviço do SQL Server usando SQL Server Configuration Manager.
- Desinstale a versão antiga usando Painel de Controle>Programas>Programas e Recursos.
- Nome do aplicativo: SQL Server Connector for Microsoft Azure Key Vault
- Versão: 15.0.300.96 (ou anterior)
- Data do arquivo DLL: 30 de janeiro de 2018 (ou anterior)
- Instale (atualize) o novo SQL Server Connector para Microsoft Azure Key Vault.
- Versão: 15.0.2000.440
- Data do arquivo DLL: 9 de novembro de 2024
- Inicie o serviço SQL Server.
- Bancos de dados criptografados de teste são acessíveis.
Se o banco de dados estiver em um RECOVERY PENDING estado, você precisará executar um ALTER comando no provedor de criptografia.
Substitua AzureKeyVault_EKM pelo nome do seu provedor criptográfico real, que você pode encontrar na visualização do sistema sys.cryptographic_providers.
ALTER CRYPTOGRAPHIC PROVIDER AzureKeyVault_EKM DISABLE;
ALTER CRYPTOGRAPHIC PROVIDER AzureKeyVault_EKM FROM FILE = 'C:\Program Files\SQL Server Connector for Microsoft Azure Key Vault\Microsoft.AzureKeyVaultService.EKM.dll';
ALTER CRYPTOGRAPHIC PROVIDER AzureKeyVault_EKM ENABLE;
Reinicie o serviço SQL Server depois de modificar o provedor de criptografia.
Reversão
Pare o serviço do SQL Server usando SQL Server Configuration Manager.
Desinstale a nova versão usando Painel de Controle>Programas>Programas e Recursos.
- Nome do aplicativo: SQL Server Connector for Microsoft Azure Key Vault
- Versão: 15.0.2000.440
- Data do arquivo DLL: 9 de novembro de 2024
Instale a versão antiga do SQL Server Connector para Microsoft Azure Key Vault.
- Versão: 15.0.300.96
- Data do arquivo DLL: 30 de janeiro de 2018
Inicie o serviço SQL Server.
Verifique se os bancos de dados que usam TDE estão acessíveis.
Depois de validar que a atualização funciona, você pode excluir a pasta antiga do SQL Server Connector (se optar por renomeá-la em vez de desinstalá-la na Etapa 3).
Versões mais antigas do SQL Server Connector
Links diretos para versões mais antigas do SQL Server Connector
- Atual: 1.0.5.0 (versão 15.0.2000.440) – Data do arquivo 09 de novembro de 2024
- 1.0.5.0 (versão 15.0.2000.440) – Data do arquivo 24 de novembro de 2020
- 1.0.5.0 (versão 15.0.300.96) – Data do arquivo 30 de janeiro de 2018
- 1.0.4.0: (versão 13.0.811.168)
Atualizando o principal de serviço do SQL Server
O SQL Server usa entidades de serviço criadas no Microsoft Entra ID (anteriormente Azure Ative Directory) como credenciais para aceder ao Cofre de Chaves. A entidade de serviço tem uma ID de Cliente e uma Chave de Autenticação. Uma credencial do SQL Server é configurada com o VaultName, ID do Clientee Chave de Autenticação. A Chave de Autenticação é válida por um determinado período de tempo (um ou dois anos). Antes de o período de tempo expirar, uma nova chave deve ser gerada no Microsoft Entra ID para o principal de serviço. Em seguida, a credencial deve ser alterada no SQL Server. O Management Studio mantém um cache para a credencial na sessão atual, portanto, quando uma credencial é alterada, o Management Studio deve ser reiniciado.
Suporte de identidade gerenciada para SQL Server na VM do Azure
A partir da Atualização Cumulativa 17 (CU17) do SQL Server 2022, as identidades gerenciadas do Microsoft Entra têm suporte para Gerenciamento Extensível de Chaves (EKM) com o Azure Key Vault (AKV) e HSM (Managed Hardware Security Modules) no SQL Server em VMs do Azure (somente Windows). Para obter mais informações, consulte suporte de identidade gerenciada para gerenciamento extensível de chaves com o Azure Key Vault. Para usar identidades gerenciadas com o SQL Server Connector, a versão do conector deve ser 1.0.5.0 de novembro de 2024 ou posterior. Transfira a versão mais recente no Centro de Download da Microsoft.
Backup e recuperação de chaves
O backup do cofre de chaves deve ser feito regularmente. Se uma chave assimétrica no cofre for perdida, ela poderá ser restaurada a partir de uma cópia de segurança. A chave deve ser restaurada usando o mesmo nome de antes, o que o comando Restaurar PowerShell faz (veja as etapas abaixo).
Se o cofre tiver sido perdido, recrie um cofre e restaure a chave assimétrica para o cofre usando o mesmo nome que antes. O nome do cofre pode ser diferente (ou igual ao anterior). Defina as permissões de acesso no novo cofre para conceder ao principal de serviço do SQL Server o acesso necessário para os cenários de criptografia do SQL Server e, em seguida, ajuste as credenciais do SQL Server para que o novo nome do cofre seja refletido.
Em resumo, aqui estão os passos:
- Faça backup da chave do vault (usando o cmdlet Backup-AzureKeyVaultKey PowerShell).
- Em caso de falha do cofre, crie um novo cofre na mesma região geográfica. O utilizador que cria o cofre deve estar no mesmo diretório padrão que a entidade de serviço configurada para o SQL Server.
- Restaure a chave para o novo vault usando o cmdlet do PowerShell Restore-AzureKeyVaultKey, que restaura a chave usando o mesmo nome de antes. Se já houver uma chave com o mesmo nome, a restauração falhará.
- Conceda permissões à entidade de serviço do SQL Server para usar esse novo cofre.
- Modifique a credencial do SQL Server usada pelo Mecanismo de Banco de Dados para refletir o novo nome do cofre (se necessário).
Os backups de chave podem ser restaurados em regiões do Azure, desde que permaneçam na mesma região geográfica ou nuvem nacional: EUA, Canadá, Japão, Austrália, Índia, APAC, Europa, Brasil, China, Governo dos EUA ou Alemanha.
B. Perguntas Frequentes
No Cofre da Chave do Azure
Como funcionam as operações de chave com o Azure Key Vault?
A chave assimétrica no cofre de chaves é usada para proteger chaves de criptografia do SQL Server. Apenas a componente pública da chave assimétrica alguma vez sai do cofre; a componente privada nunca é exportada pelo cofre. Todas as operações criptográficas usando a chave assimétrica são feitas dentro do serviço Cofre de Chaves do Azure e são protegidas pela segurança do serviço.
O que é um URI de chave?
Cada chave no Cofre de Chaves do Azure tem um URI (Uniform Resource Identifier), que você pode usar para fazer referência à chave em seu aplicativo. Use o formato https://ContosoKeyVault.vault.azure.net/keys/ContosoFirstKey para obter a versão atual e use o formato https://ContosoKeyVault.vault.azure.net/keys/ContosoFirstKey/cgacf4f763ar42ffb0a1gca546aygd87 para obter uma versão específica.
Sobre a configuração do SQL Server
Quais são os pontos de extremidade aos quais o SQL Server Connector precisa acessar?
O conector fala com dois pontos de extremidade, que devem ser autorizados. A única porta necessária para comunicação de saída para esses outros serviços é 443 para HTTPS:
login.microsoftonline.com/*:443*.vault.azure.net/*:443
Além disso, verificar a lista de revogação de certificados pode criar tráfego HTTP na porta 80.
Observação
Usar o SQL Server Connector para Azure Key Vault atrás de um firewall ou servidor proxy pode afetar o desempenho se o tráfego estiver atrasado ou bloqueado. Familiarize-se com Access Azure Key Vault atrás de um de firewall para garantir que as regras corretas estejam em vigor.
Como faço para me conectar ao Cofre de Chaves do Azure por meio de um Servidor Proxy HTTP(S)? O Conector usa as definições de configuração de Proxy do Internet Explorer. Essas configurações podem ser controladas por meio de Diretiva de Grupo ou pelo Registro, mas é importante observar que elas não são configurações de todo o sistema e precisarão ser direcionadas para a conta de serviço que executa a instância do SQL Server. Se um Administrador de Banco de Dados exibir ou editar as configurações no Internet Explorer, elas afetarão apenas a conta do Administrador de Banco de Dados e não o mecanismo do SQL Server. Fazer logon no servidor interativamente usando a conta de serviço não é recomendado e é bloqueado em muitos ambientes seguros. As alterações nas configurações de proxy definidas podem exigir a reinicialização da instância do SQL Server para entrar em vigor à medida que são armazenadas em cache quando o Conector tenta se conectar a um cofre de chaves pela primeira vez.
Quais tamanhos de chave no Cofre de Chaves do Azure são suportados pelo SQL Server Connector? A compilação mais recente do SQL Server Connector dá suporte a chaves do Azure Key Vault dos tamanhos 2048 e 3072.
Observação
A visualização do sistema sys.asymmetric_keys retorna o tamanho da chave como 2048, mesmo quando o tamanho da chave 3072 é usado.
Quais são os níveis mínimos de permissão necessários para cada etapa de configuração no SQL Server?
Embora você possa executar todas as etapas de configuração como membro da função de servidor fixa sysadmin, a Microsoft incentiva você a minimizar as permissões usadas. A lista a seguir define o nível mínimo de permissão para cada ação.
Para criar um provedor criptográfico, requer permissão
CONTROL SERVERou associação à função de servidor fixa sysadmin.Para alterar uma opção de configuração e executar a instrução
RECONFIGURE, você deve receber a permissão de nível de servidorALTER SETTINGS. A permissãoALTER SETTINGSé implicitamente mantida pela função sysadmin e pelas funções de servidor fixas serveradmin e.Para criar uma credencial, é necessária a permissão
ALTER ANY CREDENTIAL.Para adicionar uma credencial a um login, é necessária
ALTER ANY LOGINpermissão.Para criar uma chave assimétrica, requer
CREATE ASYMMETRIC KEYpermissão.
Como faço para alterar o meu diretório padrão do Microsoft Entra para que o meu cofre de chaves seja criado na mesma assinatura e diretório da entidade de serviço que criei para o SQL Server Connector?
Aceda ao portal do Azure.
No canto superior direito da página, selecione o ícone de configurações ou seu perfil de usuário.
Na página Diretórios + assinaturas, seleciona Todos os diretórios para ver todos os diretórios do Microsoft Entra aos quais pertences.
Você pode alterar o diretório de inicialização do ou alternar para um diretório diferente se tiver vários diretórios.
Observação
Talvez você não tenha permissões para realmente alterar o diretório padrão em sua assinatura do Azure. Nesse caso, crie a entidade de serviço do Microsoft Entra no seu diretório padrão, garantindo que ela esteja no mesmo diretório que o Azure Key Vault usado posteriormente.
Para saber mais sobre a ID do Microsoft Entra, leia Como as assinaturas do Azure estão relacionadas à ID do Microsoft Entra.
C. Explicações de código de erro para o SQL Server Connector
Observação
Embora o Microsoft Entra ID seja o novo nome para o Azure Ative Directory (Azure AD), para evitar a interrupção de ambientes existentes, o Azure AD ainda permanece em alguns elementos codificados, como campos de interface do usuário, provedores de conexão, códigos de erro e cmdlets. Neste artigo, os dois nomes são intercambiáveis.
Códigos de erro do provedor de :
| Código de erro | Símbolo | Descrição |
|---|---|---|
0 |
scp_err_Success |
The operation has succeeded. |
1 |
scp_err_Failure |
The operation has failed. |
2 |
scp_err_InsufficientBuffer |
This error tells engine to allocate more memory for the buffer. |
3 |
scp_err_NotSupported |
The operation is not supported. For example, the key type or algorithm specified isn't supported by the EKM provider. |
4 |
scp_err_NotFound |
The specified key or algorithm couldn't be found by the EKM provider. |
5 |
scp_err_AuthFailure |
The authentication has failed with EKM provider. |
6 |
scp_err_InvalidArgument |
The provided argument is invalid. |
7 |
scp_err_ProviderError |
There is an unspecified error happened in EKM provider that is caught by SQL engine. |
401 |
acquireToken |
Server responded 401 for the request. Make sure the client ID and secret are correct, and the credential string is a concatenation of AAD client ID and secret without hyphens. |
404 |
getKeyByName |
The server responded 404, because the key name was not found. Please make sure the key name exists in your vault. |
2049 |
scp_err_KeyNameDoesNotFitThumbprint |
The key name is too long to fit into SQL engine's thumbprint. The key name must not exceed 26 characters. |
2050 |
scp_err_PasswordTooShort |
The secret string that is the concatenation of AAD client ID and secret is shorter than 32 characters. |
2051 |
scp_err_OutOfMemory |
SQL engine has run out of memory and failed to allocate memory for EKM provider. |
2052 |
scp_err_ConvertKeyNameToThumbprint |
Failed to convert key name to thumbprint. |
2053 |
scp_err_ConvertThumbprintToKeyName| Failed to convert thumbprint to key name. |
|
2057 |
scp_err_ThumbprintExistedInRegistry |
The key thumbprint already exists in Windows registry mapped to a different key URI. |
2058 |
scp_err_FailureInRegistry| Failed to perform the operation in registry. SQL Server service account does not have permission to create the registry key. |
|
3000 |
ErrorSuccess |
The AKV operation has succeeded. |
3001 |
ErrorUnknown |
The AKV operation has failed with an unspecified error. |
3002 |
ErrorHttpCreateHttpClientOutOfMemory |
Cannot create an HttpClient for AKV operation due to out of memory. |
3003 |
ErrorHttpOpenSession |
Cannot open an Http session because of network error. |
3004 |
ErrorHttpConnectSession |
Cannot connect an Http session because of network error. |
3005 |
ErrorHttpAttemptConnect |
Cannot attempt a connect because of network error. |
3006 |
ErrorHttpOpenRequest |
Cannot open a request due to network error. |
3007 |
ErrorHttpAddRequestHeader |
Cannot add request header. |
3008 |
ErrorHttpSendRequest |
Cannot send a request due to network error. |
3009 |
ErrorHttpGetResponseCode |
Cannot get a response code due to network error. |
3010 |
ErrorHttpResponseCodeUnauthorized |
Server responded 401 for the request. |
3011 |
ErrorHttpResponseCodeThrottled |
Server has throttled the request. |
3012 |
ErrorHttpResponseCodeClientError |
The request sent from the connector is invalid. This usually means the key name is invalid or contains invalid characters. |
3013 |
ErrorHttpResponseCodeServerError |
Server responded a response code between 500 and 600. |
3014 |
ErrorHttpQueryHeader |
Cannot query for response header. |
3015 |
ErrorHttpQueryHeaderOutOfMemoryCopyHeader |
Cannot copy the response header due to out of memory. |
3016 |
ErrorHttpQueryHeaderOutOfMemoryReallocBuffer |
Cannot query the response header due to out of memory when reallocating a buffer. |
3017 |
ErrorHttpQueryHeaderNotFound |
Cannot find the query header in the response. |
3018 |
ErrorHttpQueryHeaderUpdateBufferLength |
Cannot update the buffer length when querying the response header. |
3019 |
ErrorHttpReadData |
Cannot read response data due to network error. |
3076 |
ErrorHttpResourceNotFound |
The server responded 404, because the key name was not found. Make sure the key name exists in your vault. |
3077 |
ErrorHttpOperationForbidden |
The server responded 403, because the user doesn't have proper permission to perform the action. Make sure you have the permission for the specified operation. At minimum, the connector requires 'get, list, wrapKey, unwrapKey' permissions to function properly. |
3100 |
ErrorHttpCreateHttpClientOutOfMemory |
Cannot create a HttpClient for AKV operation due to out of memory. |
3101 |
ErrorHttpOpenSession |
Cannot open a Http session due to network error. |
3102 |
ErrorHttpConnectSession |
Cannot connect a Http session due to network error. |
3103 |
ErrorHttpAttemptConnect |
Cannot attempt a connect due to network error. |
3104 |
ErrorHttpOpenRequest |
Cannot open a request due to network error. |
3105 |
ErrorHttpAddRequestHeader |
Cannot add request header. |
3106 |
ErrorHttpSendRequest |
Cannot send a request due to network error. |
3107 |
ErrorHttpGetResponseCode |
Cannot get a response code due to network error. |
3108 |
ErrorHttpResponseCodeUnauthorized |
Server responded 401 for the request. Make sure the client Id and secret are correct, and the credential string is a concatenation of AAD client Id and secret without hyphens. |
3109 |
ErrorHttpResponseCodeThrottled |
Server has throttled the request. |
3110 |
ErrorHttpResponseCodeClientError |
The request is invalid. This usually means the key name is invalid or contains invalid characters. |
3111 |
ErrorHttpResponseCodeServerError |
Server responded a response code between 500 and 600. |
3112 |
ErrorHttpResourceNotFound |
The server responded 404, because the key name was not found. Please make sure the key name exists in your vault. |
3113 |
ErrorHttpOperationForbidden |
The server responded 403, because the user does not have proper permission to perform the action. Please make sure you have the permission for the specified operation. At minimum,'get, wrapKey, unwrapKey' permissions are required. |
3114 |
ErrorHttpQueryHeader |
Cannot query for response header. |
3115 |
ErrorHttpQueryHeaderOutOfMemoryCopyHeader |
Cannot copy the response header due to out of memory. |
3116 |
ErrorHttpQueryHeaderOutOfMemoryReallocBuffer |
Cannot query the response header due to out of memory when reallocating a buffer. |
3117 |
ErrorHttpQueryHeaderNotFound |
Cannot find the query header in the response. |
3118 |
ErrorHttpQueryHeaderUpdateBufferLength |
Cannot update the buffer length when querying the response header. |
3119 |
ErrorHttpReadData |
Cannot read response data due to network error. |
3120 |
ErrorHttpGetResponseOutOfMemoryCreateTempBuffer |
Cannot get response body due to out of memory when creating a temp buffer. |
3121 |
ErrorHttpGetResponseOutOfMemoryGetResultString |
Cannot get response body due to out of memory when get result string. |
3122 |
ErrorHttpGetResponseOutOfMemoryAppendResponse |
Cannot get response body due to out of memory when appending response. |
3128 |
ErrorHttpBadRequest |
The secret and client id are correct but in the wrong format. |
3200 |
ErrorGetAADValuesOutOfMemoryConcatPath |
Cannot get Azure Active Directory challenge header values due to out of memory when concatenating the path. |
3201 |
ErrorGetAADDomainUrlStartPosition |
Cannot find the starting position for Azure Active Directory domain Url in malformatted response challenge header. |
3202 |
ErrorGetAADDomainUrlStopPosition |
Cannot find the ending position for Azure Active Directory domain Url in malformatted response challenge header. |
3203 |
ErrorGetAADDomainUrlMalformatted |
The Azure Active Directory response challenge header is malformatted and doesn't contain the AAD domain Url. |
3204 |
ErrorGetAADDomainUrlOutOfMemoryAlloc |
Out of memory when allocating buffer for Azure Active Directory domain Url. |
3205 |
ErrorGetAADTenantIdOutOfMemoryAlloc |
Out of memory when allocating buffer for Azure Active Directory tenantId. |
3206 |
ErrorGetAKVResourceUrlStartPosition |
Cannot find the starting position for Azure Key Vault resource Url in malformatted response challenge header. |
3207 |
ErrorGetAKVResourceUrlStopPosition |
Cannot find the ending position for Azure Key Vault resource Url in malformatted response challenge header. |
3208 |
ErrorGetAKVResourceUrlOutOfMemoryAlloc |
Out of memory when allocating buffer for Azure Key Vault resource Url. |
3300 |
ErrorGetTokenOutOfMemoryConcatPath |
Cannot get token due to out of memory when concatenating the request path. |
3301 |
ErrorGetTokenOutOfMemoryConcatBody |
Cannot get token due to out of memory when concatenating the response body. |
3302 |
ErrorGetTokenOutOfMemoryConvertResponseString |
Cannot get token due to out of memory when converting the response string. |
3303 |
ErrorGetTokenBadCredentials |
Cannot get token due to incorrect credentials. Make sure the credential string or certificate is valid. |
3304 |
ErrorGetTokenFailedToGetToken |
While the credentials are correct, the operation still failed to get a valid token. |
3305 |
ErrorGetTokenRejected |
The token is valid but is rejected by server. |
3306 |
ErrorGetTokenNotFound |
Cannot find the token in response. |
3307 |
ErrorGetTokenJsonParser |
Cannot parse the JSON response of server. |
3308 |
ErrorGetTokenExtractToken |
Cannot extract the token from the JSON response. |
3400 |
ErrorGetKeyByNameOutOfMemoryConvertResponseString |
Cannot get the key by name due to out of memory converting the response string. |
3401 |
ErrorGetKeyByNameOutOfMemoryConcatPath |
Cannot get the key by name due to out of memory when concatenating the path. |
3402 |
ErrorGetKeyByNameOutOfMemoryConcatHeader |
Cannot get the key by name due to out of memory when concatenating the header. |
3403 |
ErrorGetKeyByNameNoResponse |
Cannot get the key by name due to no response from server. |
3404 |
ErrorGetKeyByNameJsonParser |
Cannot get the key by name due to failed to parse the JSON response. |
3405 |
ErrorGetKeyByNameExtractKeyNode |
Cannot get the key by name due to failed to extract the key node from the response. |
3406 |
ErrorGetKeyByNameExtractKeyId |
Cannot get the key by name due to failed to extract the key Id from the response. |
3407 |
ErrorGetKeyByNameExtractKeyType |
Cannot get the key by name due to failed to extract the key type from the response. |
3408 |
ErrorGetKeyByNameExtractKeyN |
Cannot get the key by name due to failed to extract the key N from the response. |
3409 |
ErrorGetKeyByNameBase64DecodeN |
Cannot get the key by name due to failed to Base64 decode the N. |
3410 |
ErrorGetKeyByNameExtractKeyE |
Cannot get the key by name due to failed to extract the key E from the response. |
3411 |
ErrorGetKeyByNameBase64DecodeE |
Cannot get the key by name due to failed to Base64 decode the E. |
3412 |
ErrorGetKeyByNameExtractKeyUri |
Cannot extract the key Uri from the response. |
3500 |
ErrorBackupKeyOutOfMemoryConvertResponseString |
Cannot back up key due to out of memory when converting the response string. |
3501 |
ErrorBackupKeyOutOfMemoryConcatPath |
Cannot back up key due to out of memory when concatenating the path. |
3502 |
ErrorBackupKeyOutOfMemoryConcatHeader |
Cannot back up key due to out of memory when concatenating the request header. |
3503 |
ErrorBackupKeyNoResponse |
Cannot back up key due to no response from server. |
3504 |
ErrorBackupKeyJsonParser |
Cannot back up key due to failed to parse the JSON response. |
3505 |
ErrorBackupKeyExtractValue |
Cannot back up key due to failed to extract the value from JSON response. |
3506 |
ErrorBackupKeyBase64DecodeValue |
Cannot back up key due to failed to Base64 decode the value field. |
3600 |
ErrorWrapKeyOutOfMemoryConvertResponseString |
Cannot wrap key due to out of memory when converting response string. |
3601 |
ErrorWrapKeyOutOfMemoryConcatPath |
Cannot wrap key due to out of memory when concatenating the path. |
3602 |
ErrorWrapKeyOutOfMemoryConcatHeader |
Cannot wrap key due to out of memory when concatenating the header. |
3603 |
ErrorWrapKeyOutOfMemoryConcatBody |
Cannot wrap key due to out of memory when concatenating the body. |
3604 |
ErrorWrapKeyOutOfMemoryConvertEncodedBody |
Cannot wrap key due to out of memory when converting the encoded body. |
3605 |
ErrorWrapKeyBase64EncodeKey |
Cannot wrap key due to failed to Base64 encode the key. |
3606 |
ErrorWrapKeyBase64DecodeValue |
Cannot wrap key due to failed to Base64 decode the response value. |
3607 |
ErrorWrapKeyJsonParser |
Cannot wrap key due to failed to parse the JSON response. |
3608 |
ErrorWrapKeyExtractValue |
Cannot wrap key due to failed to extract value from response. |
3609 |
ErrorWrapKeyNoResponse |
Cannot wrap key due to no response from server. |
3700 |
ErrorUnwrapKeyOutOfMemoryConvertResponseString |
Cannot unwrap key due to out of memory when converting response string. |
3701 |
ErrorUnwrapKeyOutOfMemoryConcatPath |
Cannot unwrap key due to out of memory when concatenating the path. |
3702 |
ErrorUnwrapKeyOutOfMemoryConcatHeader |
Cannot unwrap key due to out of memory when concatenating the header. |
3703 |
ErrorUnwrapKeyOutOfMemoryConcatBody |
Cannot unwrap key due to out of memory when concatenating the body. |
3704 |
ErrorUnwrapKeyOutOfMemoryConvertEncodedBody |
Cannot unwrap key due to out of memory when converting the encoded body. |
3705 |
ErrorUnwrapKeyBase64EncodeKey |
Cannot unwrap key due to failed to Base64 encode the key. |
3706 |
ErrorUnwrapKeyBase64DecodeValue |
Cannot unwrap key due to failed to Base64 decode the response value. |
3707 |
ErrorUnwrapKeyJsonParser |
Cannot unwrap key due to failed to extract value from response. |
3708 |
ErrorUnwrapKeyExtractValue |
Cannot unwrap key due to failed to extract value from response. |
3709 |
ErrorUnwrapKeyNoResponse |
Cannot unwrap key due to no response from server. |
3800 |
ErrorSecretAuthParamsGetRequestBody |
Error creating request body using AAD clientId and secret. |
3801 |
ErrorJWTTokenCreateHeader |
Error creating JWT token header for authentication with AAD. |
3802 |
ErrorJWTTokenCreatePayloadGUID |
Error creating GUID for JWT token payload for authentication with AAD. |
3803 |
ErrorJWTTokenCreatePayload |
Error creating JWT token payload for authentication with AAD. |
3804 |
ErrorJWTTokenCreateSignature |
Error creating JWT token signature for authentication with AAD. |
3805 |
ErrorJWTTokenSignatureHashAlg |
Error getting SHA256 hash algorithm for authentication with AAD. |
3806 |
ErrorJWTTokenSignatureHash |
Error creating SHA256 hash for JWT token authentication with AAD. |
3807 |
ErrorJWTTokenSignatureSignHash |
Error signing JWT token hash for authentication with AAD. |
3808 |
ErrorJWTTokenCreateToken |
Error creating JWT token for authentication with AAD. |
3809 |
ErrorPfxCertAuthParamsImportPfx |
Error importing Pfx certificate for authentication with AAD. |
3810 |
ErrorPfxCertAuthParamsGetThumbprint |
Error getting thumbprint from Pfx certificate for authentication with AAD. |
3811 |
ErrorPfxCertAuthParamsGetPrivateKey |
Error getting private key from Pfx certificate for authentication with AAD. |
3812 |
ErrorPfxCertAuthParamsSignAlg |
Error getting RSA signing algorithm for Pfx certificate authentication with AAD. |
3813 |
ErrorPfxCertAuthParamsImportForSign |
Error importing Pfx private key for RSA signing for authentication with AAD. |
3814 |
ErrorPfxCertAuthParamsCreateRequestBody |
Error creating request body from Pfx certificate for authentication with AAD. |
3815 |
ErrorPEMCertAuthParamsGetThumbprint |
Error Base64 decoding Thumbprint for authentication with AAD. |
3816 |
ErrorPEMCertAuthParamsGetPrivateKey |
Error getting RSA private key from PEM for authentication with AAD. |
3817 |
ErrorPEMCertAuthParamsSignAlg |
Error getting RSA signing algorithm for PEM private key authentication with AAD. |
3818 |
ErrorPEMCertAuthParamsImportForSign |
Error importing PEM private key for RSA signing for authentication with AAD. |
3819 |
ErrorPEMCertAuthParamsCreateRequestBody |
Error creating request body from PEM private key for authentication with AAD. |
3820 |
ErrorLegacyPrivateKeyAuthParamsSignAlg |
Error getting RSA signing algorithm for Legacy private key authentication with AAD. |
3821 |
ErrorLegacyPrivateKeyAuthParamsImportForSign |
Error importing Legacy private key for RSA signing for authentication with AAD. |
3822 |
ErrorLegacyPrivateKeyAuthParamsCreateRequestBody |
Error creating request body from Legacy private key for authentication with AAD. |
3900 |
ErrorAKVDoesNotExist |
Error internet name not resolved. This typically indicates the Azure Key Vault is deleted. |
4000 |
ErrorCreateKeyVaultRetryManagerOutOfMemory |
Cannot create a RetryManager for AKV operation due to out of memory. |
Se você não vir seu código de erro nesta tabela, aqui estão alguns outros motivos pelos quais o erro pode acontecer:
Talvez você não tenha acesso à Internet e não possa acessar seu Cofre da Chave do Azure. Verifique a sua ligação à Internet.
O serviço Azure Key Vault pode estar inativo. Análise azure.status.microsoft. Tente novamente em outro momento.
Você pode ter descartado a chave assimétrica do Cofre da Chave do Azure ou do SQL Server. Restaure a chave.
Se você receber um erro "Não é possível carregar biblioteca", certifique-se de ter a versão apropriada do Visual Studio C++ redistribuível instalado com base na versão do SQL Server que você está executando. A tabela a seguir especifica qual versão instalar a partir do Centro de Download da Microsoft.
O log de eventos do Windows também registra erros associados ao SQL Server Connector, o que pode ajudar com contexto adicional sobre por que o erro está realmente acontecendo. A origem no log de eventos do aplicativo do Windows será "SQL Server Connector for Microsoft Azure Key Vault".
Bibliotecas de tempo de execução C++ para SQL Server Connector 1.0.5.0
| Versão do SQL Server | Link de instalação redistribuível se estiver usando o SQL Server Connector 1.0.5.0 |
|---|---|
| 2008, 2008 R2, 2012, 2014 | Pacotes redistribuíveis do Visual C++ para Visual Studio 2013 |
| 2016, 2017, 2019 | Visual C++ Redistributable para Visual Studio 2015 |
Bibliotecas de tempo de execução C++ para SQL Server Connector 1.0.4.0
| Versão do SQL Server | Link de instalação redistribuível se estiver usando o SQL Server Connector 1.0.4.0 |
|---|---|
| 2008, 2008 R2, 2012, 2014, 2016, 2017, 2019 | Pacotes redistribuíveis do Visual C++ para Visual Studio 2013 |
Referências Adicionais
Mais sobre o gerenciamento extensível de chaves:
Criptografias SQL com suporte a EKM:
Comandos Transact-SQL relacionados:
Documentação do Azure Key Vault:
Referência cmdlets do PowerShell Azure Key Vault
Conteúdo relacionado
- Gerenciamento extensível de chaves usando o Azure Key Vault (SQL Server)
- Usar o SQL Server Connector com recursos de criptografia SQL
- provedor de EKM habilitado (opção de configuração do servidor)
- Configurar o Gerenciamento Extensível de Chaves TDE do SQL Server usando o Azure Key Vault
- Para obter scripts de exemplo adicionais, consulte o blog em SQL Server Transparent Data Encryption and Extensible Key Management with Azure Key Vault