Using Web Deploy (msdeploy) to publish a WebMatrix site

ε祈祈猫儿з 提交于 2019-12-04 14:59:52

This is related to your side comment on merging the database...

Currently Web Deploy does not have any provider that supports database merges - the dbFullSql provider uses SQL Server Management Objects ("SMO") to script out the db contents and we then apply it on the other side. Effectively Web Deploy thus will only overwrite the destination db with the source db.

If you are okay with that as a "merge" you can get around that table already exists error by using SMO scripting options - this is what WebMatrix does to make the db publishing/downloading work. To your source just add: ,scriptDropsFirst=true (this scripts out drops for all the objects in your source database so that if they exist on the destination they will get dropped and won't block you) You might also need: ,copyAllUsers=false (if you aren't a sysadmin on the remote SQL database, chances are you won't be able to create logins, which are a server-level action. Typically if you don't use this setting, you'll get an error about creating a login, or login doesn't exist, because SMO scripts our your database user as "for LOGIN " and that login doesn't exist on the server)

Hope that helps! Kristina

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!