如何找到填充表格的内容? [英] How Do I find what is populating a table?

查看:17
本文介绍了如何找到填充表格的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常遇到这个问题.我在数据仓库中工作,但无法找出填充表的内容.通常,每天都会从仓库中的其他表或 Oracle 数据库填充该表.我已经尝试了以下查询并可以确认更新,但我看不到它在做什么.我搜索了已知的 SSIS 包和具有相似名称和 SQL 作业的存储过程,但我什么也没找到.

I constantly run into this problem. I am working in a data warehouse and I cannot find out what is populating a table. Typically the table is being populated on a daily basis from either other table in the warehouse or from an Oracle database. I have tried the below query and can confirm the updates, but i cannot see what is doing it. I searched to the known SSIS package and stored procedure with similar names and SQL jobs but I can find nothing.

select object_name(object_id) as DatabaseName, last_user_update, *
from sys.dm_db_index_usage_stats
where database_id = DB_ID('Warehouse')
and object_id=object_id('PAYMENTS_DAILY')

我只有最基本的 SQL Server 工具可用,所以没有花哨的搜索工具:(

I only have the most basic SQL Server tools available so no fancy search tools :(

推荐答案

在数据插入数据后,如果没有某种日志记录,就无法知道数据来自哪里.

There is no way to tell, after data has been inserted into a data, where the data came from without having some sort of logging.

SSIS 具有日志记录功能,您可以在表上使用触发器、更改数据捕获、审计列等,有很多方法可以做到这一点.

SSIS has logging, you can use triggers on the tables, change data capture, audit columns, etc. are the many ways to do this.

这篇关于如何找到填充表格的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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