Easwaran Paramasivam
asked on
How to identify particular table's particular column refer in which SPs and UDFs
In my DB I have a table called tAuditLog which has column TranID. I would like to get list of StoredProcedures/ Functons which refer this column.
How to achive this? Please assist.
How to achive this? Please assist.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Referencing entities is a good approach and Pinal Dave does a good job explaining usually; therefore, without reading in detail, I suspect I agree. *smile* Good addition, @jogos!
ASKER
Thanks.
This one may get tricky because you have other tables with TranID.
Here is a basic example, using either sys.syscomments or sys.sql_modules:
Open in new window
Open in new window
If you are consistent with use of columns that you have tAuditLog.TranID in procedural usage, you can replace the find text below with the fully qualified name and it should work out. Otherwise, you can try to search out both the table and column at same time.
Open in new window
I hope that helps!
Respectfully yours,
Kevin