Solved

database trace

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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 …
     When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

776 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