获取有关SQL数据项目的更新项 [英] Getting updated items on SQL data project

查看:76
本文介绍了获取有关SQL数据项目的更新项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用数据库项目时,我们进行发布,然后在sql server上执行它以获取数据库定义

但是当我们对数据库项目进行更新时

我们怎么能只将更新或添加的项目移动到数据库(我的意思是项目

存储过程,函数,密钥.................我在发布后在sql项目中创建的)

i意味着有没有办法让脚本有这些更新的项目



我尝试过:



i试图部署数据库

解决方案

你看过使用触发器了吗?我将一个数据库称为定义数据库,另一个称为工作数据库。




$创建一个单独的触发器b $ b

更新表中更新定义数据库商店

添加到定义数据库商店添加表



那么这些结果可以应用于'工作'数据库 - 批量导入添加,逐行应用事务中的更新


触发器是您应用程序的更好解决方案。

when using a data base project we make a publish and then execute it on sql server in order to get the database definition
but when we make an update to data base project
how can we move only updated or added items to database(i mean by items
stored procedures,functions,keys.................. which i have created in sql project after publish)
i mean is there any way to get a script having those updated items

What I have tried:

i have tried to deploy the data base

解决方案

Have you looked at using triggers ? I'll call one database the 'definition database' and the other that you wish to update the 'working database'

create a separate trigger for

on update of definition database store in updates table
on add to definition database store in adds table

then those results can be applied against the 'working' database - bulk import for adds, apply updates in a transaction row by row


Triggers is better solution for your application.


这篇关于获取有关SQL数据项目的更新项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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