Solved

database trace

Posted on 2011-03-24
4
357 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 40

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 40

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
query optimization 6 31
how to restore or keep sql2000  backups useful... 2 37
Linked Server - SP with Param to VIew 7 29
Trying to understand why my Index is so large 12 52
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 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