【问题标题】:Scape character in Azure passwordAzure 密码中的转义字符
【发布时间】:2020-04-06 18:41:51
【问题描述】:

我正在尝试使用 ADF GUI 在 Azure 数据工厂 (ADF) 中配置链接服务,当我输入要连接的数据库的密码时,我收到以下错误消息:

Connection failed
Expecting connection string of format "key1=value1; key2=value2"

如果我将其配置为从 Keyvault 获取此密码,则会收到以下错误消息:

The value of the property '' is invalid: 'Format of the initialization string does not conform to specification starting at index 105

我尝试使用 DBeaver 连接到这个数据库,我可以毫无问题地连接,因此 URL、密码和用户是正确的,我认为问题出在密码字符串中,因为它包含分号 (;),我的密码是这样的:

pass(GdA;+pass

所以我认为问题在于我必须转义分号才能配置该链接服务(如果我删除这个分号,我会收到登录错误)。我已经尝试过其他帖子所说的:12 但我仍然无法配置此链接服务。

也许我必须尝试使用​​ Azure CLI 创建此链接服务,但您还有其他建议吗?

提前致谢。

编辑:添加匿名链接服务 JSON:

{
"name": "LS_P_Oracle_BAS",
"type": "Microsoft.DataFactory/factories/linkedservices",
"properties": {
    "description": "Test",
    "annotations": [],
    "type": "Oracle",
    "typeProperties": {
        "connectionString": "host=zzz.net;port=1521;servicename=yyy.com;user id=USER",
        "encryptedCredential": "eyJDcmVkZW50aWFsSWQiOiJmZTI3NDU4MS1iNWYyLTQ0YmItYTcwYS0wNzQxZTFkOWY5NTkiLCJWZXJzaW9uIjoiMi4wIiwiQ2xhc3NUeXBlIjoiTWljcm9zb2Z0LkRhdGFQcm94eS5Db3JlLkludGVyU2VydmljZURhdGFDb250cmFjdC5DcmVkZW50aWFsU1UwNkNZMTQifQ=="
    },
    "connectVia": {
        "referenceName": "INTEGRATIONRUNTIME",
        "type": "IntegrationRuntimeReference"
    }
}
}

EDIT2:使用 Keyvault 的连接配置:

{
"name": "LS_P_Oracle_BAS",
"type": "Microsoft.DataFactory/factories/linkedservices",
"properties": {
    "description": "Test",
    "annotations": [],
    "type": "Oracle",
    "typeProperties": {
        "connectionString": "host=yyy.net;port=1521;ServiceName=zzz.com;user id=USER_READER",
        "password": {
            "type": "AzureKeyVaultSecret",
            "store": {
                "referenceName": "LS_P_KeyVault_yyy",
                "type": "LinkedServiceReference"
            },
            "secretName": "BAS-reader-password"
        }
    },
    "connectVia": {
        "referenceName": "INTEGRATIONRUNTIME",
        "type": "IntegrationRuntimeReference"
    }
}
}

我在使用第二个链接服务 JSON 时遇到的错误:

The value of the property '' is invalid: 'Format of the initialization string does not conform to specification starting at index 105.'. Format of the initialization string does not conform to specification starting at index 105.

【问题讨论】:

  • 我尝试按照您提到的那样创建 Azure SQL 服务器密码(其中包含半列 ;),并且能够毫无问题地创建并连接到 Azure SQL 链接服务。您尝试创建的数据库链接服务是什么?请检查您的端口号是否正确?如果可能,请使用虚拟用户名和密码共享连接字符串(或完整的链接服务 JSON 代码)。还可以尝试使用测试客户端应用程序验证连接字符串,以确保您的连接字符串格式正确。
  • 您好,感谢您的回答。我已将链接服务 JSON 代码添加到我的答案中。我尝试使用具有相同凭据、主机名、服务主体、端口号的 Dbeaver 连接到该数据库,并且连接成功。

标签: azure azure-data-factory


【解决方案1】:

经过对该问题的进一步调查,确定为 ADF Oracle 连接器中的错误,无法处理包含分号的属性。错误修复部署的当前预计到达时间是 6 月底(注意:这是暂定日期)

不幸的是,目前除了更改密码(避免连接属性中的分号)之外没有其他解决方法,直到部署修复程序。

一旦我有关于此修复的进一步更新,我将在 MSDN 线程下方保持更新。

MSDN 线程:https://social.msdn.microsoft.com/Forums/en-US/10a3454f-69b8-41bb-9af3-8846f44f6dfe/scape-character-in-azure-password?forum=AzureDataFactory

感谢您的耐心等待,并对由此造成的所有不便深表歉意。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-01-19
    • 2011-09-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-06
    相关资源
    最近更新 更多