如何在SQL SERVER中创建一个在Oracle数据库中插入记录的触发器 [英] How do I make a trigger in SQL SERVER which insert a record in Oracle Database

查看:316
本文介绍了如何在SQL SERVER中创建一个在Oracle数据库中插入记录的触发器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在SQL SERVER中创建一个在Oracle数据库中插入记录的触发器?

我想在Insert上的SQL SERVER数据库表中创建一个触发器,它将在Oracle表中创建相同的记录数据库。

How do I make a trigger in SQL SERVER which insert a record in Oracle Database?
I want to make a trigger in SQL SERVER Database Table on Insert which will Create the same record in Oracle table Database.

推荐答案

您能解释为什么在将记录插入SQL Server时需要将记录插入Oracle中吗?



我不建议通过触发器执行此操作。我会通过您的业务层或SSIS包来处理它。您需要在SQL和Oragle之间设置链接服务器。执行使用链接服务器的SQL本身就存在很多性能问题。在触发器内执行链接服务器查询时,绝对会破坏服务器的性能。触发器需要成功完成才能完成insert语句。根据网络和系统性能,您插入可能需要三到五秒才能运行。这根本不能很好地扩展。
Can you explain why you need to insert a record into Oracle when you insert a record into SQL Server?

I don't recommend doing this through a trigger. I would handle it through your business layer or an SSIS package. You would need to get into setting up linked servers between SQL and Oragle. Executing SQL that uses link servers has a lot of performance issues in itself. When doing a linked server query inside a trigger, you will absolutely kill the performance of your server. The trigger needs to successfully complete for your insert statement to complete. Depending on networking and system performance, you insert could easily take three to five seconds to run. This does not scale well at all.


这篇关于如何在SQL SERVER中创建一个在Oracle数据库中插入记录的触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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