11

我有 VS2010 Premium,最近从 SQL Server 2008R2 升级到 2012 Developer Edition。现在,当我尝试部署现有数据库项目(使用 2008Rs 时创建)时,我收到以下错误。

错误 {name}:无法确定目标数据库架构提供程序

此外,我没有看到用于从 VS 中的可用项目模板创建 2012 年新数据库项目的选项,SQL Server Data Tools 应该可用(作为 2012 年升级的一部分成功安装)。

4

2 回答 2

4

With the help of the MS site, I was able to get this resolved.

I (re)installed SSDT from http://msdn.microsoft.com/en-us/data/gg427686, and rebooted. Then opened SSDT up to create a new sql project. I didn't find the new project template for "Sql Server Database Project" at first - for me it appears under Installed Templates/Other Languages/Sql Server. Since I'm not sure if I looked there prior to this test (not an intuitive location), I can't say whether the re-install did the trick. But this got me going.

于 2012-04-02T15:19:50.600 回答
0

在使用 vsdbcmd 部署数据库更新时,我遇到了与上述类似的错误。

无法确定目标数据库架构提供程序。部署无法继续。{路径和名称} .dbschema

无法解析来自名为 {yourschema} .dbschema 的源对外部元素的引用,因为没有加载此类源。


我的命令示例:

/cs:"Data Source=DbServer; Integrated Security=True; Initial Catalog=Database"


故障排除:

  1. 确认您已复制部署程序的所有必要文件 => \Microsoft Visual Studio 10.0\VSTSDB\Deploy
  2. 确保您可以使用sqlcmd以与使用 vsdbcmd => 集成安全性与用户名/密码完全相同的方式连接到数据库服务器
  3. 如果您要指定Initial Catalog,请从连接字符串中删除并使用 /p:YourDatabase


一些帮助测试连接性的 SQL 命令:

sqlcmd.exe -S tcp:<server>,<port> -Q "select getdate()"
sqlcmd.exe -S tcp:<server>\<instance> -Q "select getdate()"


参考资料:
vsdbcmd 命令行参考 (MSDN)
sqlcmd 命令行参考 (MSDN)
http://sadomovalex.blogspot.co.uk/2011/10/vsdbcmd-fix-possible-reason-for-target.html (2011)

于 2012-08-23T11:03:17.620 回答