SSDT 中的数据库范围凭据问题 (Visual Studio 2017) [英] Issue with Database Scoped Credential in SSDT (Visual Studio 2017)

查看:37
本文介绍了SSDT 中的数据库范围凭据问题 (Visual Studio 2017)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在将数据库范围凭据导入 SSDT 时遇到问题.

Having an issue importing a Database Scoped Credential into SSDT.

在 Azure SQL 数据库上使用 SSMS 我创建了一个数据库范围凭据,我用它来创建外部数据源以连接到外部表.所有这些在 SSMS 中都运行良好,我可以看到我在 sys.database_scoped_credentials、sys.external_data_sources、sys.external_tables 中创建的所有内容,并且我可以正常访问外部表.

Using SSMS on an Azure SQL Database I created a Database Scoped Credential which I used to create an External Data Source to connect to External Tables. All that works fine in SSMS and I can see everything I created in sys.database_scoped_credentials, sys.external_data_sources, sys.external_tables, and I can access the external tables fine.

我将数据库导入到 Visual Studio 2017(SSDT 版本 15.1)中的数据库项目中.数据库范围凭据未导入,因此外部数据源无法找到它并且构建失败.

I imported the database into a Database Project in Visual Studio 2017 (SSDT version 15.1). The Database Scoped Credential didn't import, so the External Data Source can't find it and the build fails.

错误代码:SQL71501:SQLExternalDataSource:[myExternalDataSource] 有一个未解析的对 SqlDatabaseCredential [myCredential] 的引用.

Error Code: SQL71501: SQLExternalDataSource: [myExternalDataSource] has an unresolved reference to SqlDatabaseCredential [myCredential].

有人知道如何解决这个问题吗?提前致谢.

Anyone know how to fix this? Thanks in advance.

推荐答案

在导入操作期间没有自动创建的任何对象都可以手动创建.对于数据库范围的凭据,它类似于:

Any object that doesn't get created automatically during the import operation can be manually created. For a DB-scoped credential, it'd be something like:

  • 在解决方案资源管理器中右键单击数据库项目,然后单击添加新项
  • 搜索并选择脚本(构建)并以您的数据库范围凭据命名
  • 在 SQL Server 对象资源管理器窗口中,右键单击数据库范围的凭据并选择查看代码
  • 将数据库范围凭据的定义从查看代码"选项卡复制并粘贴到数据库项目"选项卡中.

这篇关于SSDT 中的数据库范围凭据问题 (Visual Studio 2017)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆