Solved

database trace

Posted on 2011-03-24
4
354 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Audit has been really one of the more interesting, most useful, yet difficult to maintain topics in the history of SQL Server. In earlier versions of SQL people had very few options for auditing in SQL Server. It typically meant using SQL Trace …
After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

895 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

16 Experts available now in Live!

Get 1:1 Help Now