如何将所有插入调用标识到表中
16lz
2021-01-22
I have a table that requires some schema changes which definitely will leave some impact behind especially during Insert. How can I find what are the clients/stored procedure/queries that doing insert into the table and also the related query?
我有一个表需要一些架构更改,这肯定会留下一些影响,特别是在插入期间。如何找到插入表中的客户端/存储过程/查询以及相关查询?
Is this possible to be achieved using SQL Profiler trace?
这可以使用SQL事件探查器跟踪来实现吗?
2 个解决方案
#1
0
This will give you the dependent Stored Procedures, Views, Triggers, Functions name on your table.
这将为您提供表格中依赖的存储过程,视图,触发器,函数名称。
You need to re-verify once you get the result, whether it is a insert statement or not.
一旦得到结果,无论是否为insert语句,都需要重新验证。
SELECT *
FROM SYS.objects
WHERE OBJECT_DEFINITION(object_id) LIKE '%INSERT%'
AND OBJECT_DEFINITION(object_id) LIKE '%YOUR_TABLE_NME%'
You can change terms in LIKE
Operator as per your requirement.
您可以根据您的要求更改LIKE运算符中的术语。
更多相关文章
- 抱SQL SERVER大腿之我爱用视图(对大数据量的管理)
- 创建视图时ORA-01031
- mysql更新触发器先插入另一张表然后删除该条数据
- oracle基础知识总结 part 3 : 三范式,PLSQL,存储过程,函数,触发器
- 自定义视图(组合控件)
- RecycleView的多视图Epoxy库
- android listview多视图嵌套多视图
- Android - Espresso -滚动到非列表视图项。
- 导航架构组件 - 具有CollapsingToolbar的详细信息视图