我在 Azure 数据工厂中设置 Mongo DB 链接服务时遇到问题。我们已经在本地平台上使用 Mongo DB 连接来从客户端提取一些数据。
现在,我们正在将所有本地流程迁移到 Azure。因此,这种连接是我们正在迁移的许多其他事物的一部分。我正在使用下面的连接字符串。
同一字符串在我们的本地环境中工作得非常好,但由于某种原因,在 Azure 中无法工作。有人可以帮忙吗
ConnectionString="mongodb://username:<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c4b4a5b7b7b3abb6a084aeb4b6aba0b1a7b0e9aca1afb6a8eaa3b2b0eaa9abaaa3aba0a6eaaaa1b0" rel="noreferrer noopener nofollow">[email protected]</a>:20007/management-core?ssl=true&replicaSet=Product-shard-0&serverSelectionTimeoutMS=10000&connectTimeoutMS=10000&authSource=admin&authMechanism=SCRAM-SHA-1"
最佳答案
在不知道实际错误消息的情况下很难回答,但我会尝试:
您是否按照向我们展示的方式粘贴连接字符串?包括最初的单词?
连接字符串应采用以下格式:
mongodb://[username:password]@host[:port][/[database][?options]]
正如您所看到的,开头没有 ConnectionString=
,所以在您的情况下,它似乎应该如下所示:
mongodb://username:<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="82f2e3f1f1f5edf0e6c2e8f2f0ede6f7e1f6afeae7e9f0eeace5f4f6acefedece5ede6e0acece7f6" rel="noreferrer noopener nofollow">[email protected]</a>:20007/management-core?ssl=true&replicaSet=Product-shard-0&serverSelectionTimeoutMS=10000&connectTimeoutMS=10000&authSource=admin&authMechanism=SCRAM-SHA-1
只需从开头删除ConnectionString="
更多信息here
关于mongodb - 在 Azure 数据工厂中创建 MongoDB 链接服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61144119/