数据库中表被哪些东东所操作过的记录
数据库中表被哪些东东所操作过的记录:
SELECT sm.object_id, OBJECT_NAME(sm.object_id) AS object_name,
o.type,
o.type_desc,
sm.definition
FROM sys.sql_modules AS sm
JOIN sys.objects AS o ON sm.object_id = o.object_id
where definition like '%表名%'
ORDER BY o.type;
GO
o.type,
o.type_desc,
sm.definition
FROM sys.sql_modules AS sm
JOIN sys.objects AS o ON sm.object_id = o.object_id
where definition like '%表名%'
ORDER BY o.type;
GO
作者:Bober Song
出处:http://bober.cnblogs.com/
CARE健康网: http://www.aicareyou.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
出处:http://bober.cnblogs.com/
CARE健康网: http://www.aicareyou.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。