Solved

database trace

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

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

Title # Comments Views Activity
SQL Pivot Rows To Columns 10 66
SQL Server - Sum Decimal Columns 11 45
convert null in sql server 12 48
SQL Database Restore 2008 R2 1 13
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

821 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