简体   繁体   English

无法将数据库从VS2008部署到SQL2005

[英]Trouble deploying database from VS2008 to SQL2005

We are using VS2008 deployment for our databases [database solutions in VS where each one has their own schema.] The script it produces does not work quite well. 我们正在对数据库使用VS2008部署[VS中的数据库解决方案,其中每个数据库都有各自的架构。]它生成的脚本不能很好地运行。 "Before deployment it compares the server objects and then creates the script" is the way msdn is telling, but obviously it tries to create objects those exist, or tries to drop the xml schema before dropping the dependent sprocs/tables. msdn告诉我们“部署前先比较服务器对象,然后创建脚本”,但显然,它会尝试创建存在的对象,或者尝试在删除依赖的sprocs / tables之前删除xml模式。 Am I doing something wrong with deployment options, or is this a know bug I am not aware. 我在部署选项上做错了吗,还是我不知道的已知错误? Any comments? 任何意见?

1) The VS deployment tool always tries to create all objects that exist in the [model] database. 1)VS部署工具始终尝试创建[模型]数据库中存在的所有对象。 It would never tell you that, but it does. 它永远不会告诉你,但确实如此。 I spent a lot of time trying to figure out why it was trying to create a login that I specifically removed from the DB project. 我花了很多时间试图弄清为什么它试图创建我特别从数据库项目中删除的登录名。 2) Like you said, it sometimes tries to create/drop objects in the wrong order. 2)如您所说,它有时会尝试以错误的顺序创建/删除对象。 I usually have it generate the deploy script, but not deploy, and review it by hand. 我通常让它生成部署脚本,但不进行部署,并手动对其进行检查。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM