October 3, 2008 at 9:07 am
I know it doesn't exist, but that best describes what I need -
Basically I have a table that many sp's and ad hoc queries reference. However there are entities in the table that need to be cleaned out, and I need a way to figure out which ones get referenced by a where clause (i.e where rid = 382).
Anyone have any suggestions? Running a trace is not an option, because I need to collect data for at least a month.
October 5, 2008 at 12:15 pm
You just need to filter the trace correctly. Once you do that, the trace will produce no more data than a TRIGGER ON SELECT would.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
October 10, 2008 at 7:14 pm
You also can play with it (I would)
by making a copy of that table and than removing all the junk you suspect is redundant.
After that you'll see in the error messages from SP's and ad-hoc quaries wich are being referenced and bring them back.
October 14, 2008 at 2:21 am
I agree with Barry. Just create a trace, to only select the textdata of statements (SP and T-SQL). Filter this on the databasename and "%TabelName% %ColumnName%" and you only get the statements that actually access the specified table with the columname included.
Keep in mind that it also won't log a statement like "SELECT * FROM TableName WHERE ColumnName2 = 123".
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply