如何自动生成模式比较脚本并进行部署 [英] How to generate schema comparison script automatically and deploy

查看:94
本文介绍了如何自动生成模式比较脚本并进行部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



我正在视觉工作室点击发布的东西。我想要包含Publish SQL。这是为了部署模式更改而不删除并再次创建表和过程以将数据保存在生产服务器上。当您要从头创建所有内容时,打包/发布SQL选项卡中的自动脚本模式仅支持初始部署。要将更改部署到模式,我需要创建一个自定义脚本。



Visual Studio有比较工具,我们可以比较两个数据库并导出脚本。有没有办法让它自动刷新架构比较并更改我可以在Package / Publish SQL选项卡中使用的脚本。



或者如果有人知道更好的话自动创建自定义架构比较脚本的方法。



任何帮助都是适当的。我需要紧急开发。



谢谢



我尝试了什么:



解决方案

这是一个比较数据库模式的脚本: [ ApexSQL ]

这也许是有趣的:将表格模式和数据从一个数据库复制到SQL Server中的另一个数据库 [< a href =https://www.codeproject.com/Tips/664327/Copy-Table-Schema-and-Data-From-One-Database-to-Antarget =_ blanktitle =New Window> ^ ]

Hi there,

I am working on one click publish thing in visual studio. In that I want to include Publish SQL as well. This is for deploying changes of schema without droping and creating tables and procedures again to save the data on production server.Auto script schema in Package/Publish SQL tab supports only initial deployment when you want to create everything from the scratch . To deploy changes to the schema I need to create a custom script.

Visual studio has got comparision tool in which we can compare two databases and export the script . Is there any way so that it will automatic refresh the schema comparison and changes the script which I can use in Package/Publish SQL tab.

Or if anyone knows a better way to create a custom schema comparison script automatically.

Any help would be appriciated. I need to develop this urgently.

Thanks

What I have tried:

.

解决方案

Here is a script to compare database schema's: [ApexSQL]
This might be of interest too: Copy Table Schema and Data From One Database to Another Database in SQL Server[^]


这篇关于如何自动生成模式比较脚本并进行部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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