有没有办法检查表从哪个SP获取数据? [英] Is there any way to check from which SP the table is getting data ?

查看:58
本文介绍了有没有办法检查表从哪个SP获取数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表必须从数据库中的一个SP获取数据。从几天开始,表格没有得到任何数据,现在它是空的。不幸的是,负责此SP和表的用户不可用。

I have a table which has to get the data from one of the SP in database. From few days table is not getting any data and it is empty now. Unfortunately, the user who is responsible for this SP and table is not available.

现在,有没有办法检查表从哪个SP获取数据或从哪个SP获取数据?

Now, Is there any way to check from which SP the table is getting data or from which SP the table has to get the data?

谢谢,

推荐答案

你可以将审核放在桌面上。 

You can put auditing on the table. 

我对

VisitV2_20171220

table。我有一个名为myProc的proc,它从这个表中选择。这是审计记录。

table. I have a proc called myProc which selects from this table. This is the audit record.

< tsql_stack>< frame nest_level ='1'database_name ='visits'mode_name ='dbo'object_name =' myproc '/>< / tsql_stack>

<tsql_stack><frame nest_level = '1' database_name = 'visits' schema_name = 'dbo' object_name = 'myproc'/></tsql_stack>

这是我的审计结果:



This is what my audit looks like:

CREATE DATABASE AUDIT SPECIFICATION [DatabaseAuditSpecification-20190329-101010]
FOR SERVER AUDIT [Audit-20180421-071146]
ADD (SELECT ON OBJECT::[dbo].[VisitV2_20171220] BY [db_owner])
WITH (STATE = ON)
GO


这篇关于有没有办法检查表从哪个SP获取数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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