Solved

database trace

Posted on 2011-03-24
4
349 Views
Last Modified: 2012-05-11
Is there a way to trace all columns that get referenced by a particular application?
0
Comment
Question by:HLRosenberger
  • 2
  • 2
4 Comments
 
LVL 39

Expert Comment

by:lcohan
ID: 35207865
You can use SQL 2008 Profiler and filter the trace by your column list and the application name. Just don't start Profiler Default against a production SQL server AS IS because it may bring down your server - you must select only columns you need and filter the output by data you only need like the app name and column list under textdata SQL profiler column. And please do not start SQL profiler on the server but from a client computer on the same network.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 35208731
Ok.  So I could select all columns in a particular table, start the profiler, run my app, stop the  profiler, and then filter by application name?
0
 
LVL 39

Accepted Solution

by:
lcohan earned 500 total points
ID: 35209176
Here is how I would do it:

Start profiler, connect to server, new default trace and customize that trace definition by leaving only columns relevant to you, and customize filters as well where under textdata column you can add all columns you need to trace on - they should be added under LIKE %column1%
%column2% etc, and also your exact application name under the app name column filter.
Save AS that trace definition and give it a particular name so you can open it/reuse it later on then run it.
With both filters enabled and app not running you should get nothing in the trace but when you start your APP you should see all queries hitting those table.columns you put in the filter. The only issue may be if you have a column like %language% where it is obvious you will get in the trace output ANY string that contains %language% but you can tune your trace definition to get filter the results and eventualy get only what you want.
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 35210272
Thanks
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now