Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am trying to avoid trace my sql query in SQL profiler.Some queries I run contain sensitive information: passwords, credit card numbers, etc so I want to know that, If SQL Profiler is runing then my sql query not run in VB.net

Thanks
Posted

I entered the following into a Google search textbox:
Is SQL Server trace running?

The first result was this:
SQL Server: Determining Running Traces[^]
 
Share this answer
 
Comments
Pablo Aliskevicius 17-Dec-13 8:10am    
I get one record even when SQL Profiler is not running.
Mike Meinz 17-Dec-13 8:25am    
Yes, Trace ID=1. That seems to run all of the time.

If the OP has sensitive data, it would be a best practice to encrypt it. Attempting to restrict access by exotic means (like checking for an SQL Trace) will not protect the data as well as encryption.
You assume that SQL Profiler is your only risk.
This assumption is wrong.
What about Wireshark, or Fiddler? They can see queries on the wire.
Also, if the credit card information is stored unencrypted in a database, a malicious DBA can export it using Management Studio, and sell it to his favorite criminal.

Never, ever store unencrypted sensitive information in the database.
Never, ever store passwords in the database. Not even encrypted. Store a salted hash instead (salted: different users with the same password should get different hashes).

Hope this helps,
Pablo.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900