Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm a SQL Server 2008 user. I have access to some tables. I need to request few columns from table as I usually do. But I need to do it once (for example) in 5 seconds and system administrators shouldn't see (feel:) my activity.

Result of request - table with approximately 100 lines. My query contains only select and where clause by index. (it is light and it is executing very fast)

As I know, SELECT operations don't write to transaction log. I mean, if I only read database, where is log of my select actions SQL Server keep? Can administrator see my select queries?

C2 audit, as I can see in properties, is disabled.

Is there any other ways to see my activity?

Thanks.

share|improve this question
12  
"Is there any other ways to see my activity?" Who cares? Are you trying to keep your activity a secret from the sysadmins? –  Mike Sherrill 'Cat Recall' Apr 12 '13 at 9:47
    
Every transaction / connection is logged and tracable... you cannot hide from us! ;-) –  RoKa Apr 12 '13 at 9:51
6  
For sure they can, and they can eve see this post! –  Remus Rusanu Apr 12 '13 at 10:22
3  
Someones trying to get himself fired... –  Wes Crockett Apr 12 '13 at 18:45
3  
Why would a dba answer this question? –  HLGEM Apr 12 '13 at 19:29

3 Answers 3

up vote 4 down vote accepted

Auditing has been more improved in SQL Server 2008 and up. There are many ways to trace a SELECT .... (make sure you are not doing it against an HR database :-))

Option 1: Through SQL trace, where in depending on what trace events have been selected, you can get logged/audited.

Option 2: Under database --> Security --> Database Audit Specifications .

Here and here are 2 articles that have explained Option 2 in detail.

share|improve this answer
    
Thanks:) If I understand you correct, there isn't select recording by default. You can configure it, if you need. –  Alexalex12 Apr 12 '13 at 14:20
    
Yes you have to configure it. –  Kin Apr 12 '13 at 14:22
    
Could you answer on the same question it relation to MS SQL 2005?:) –  Alexalex12 Apr 12 '13 at 14:23
    
In sql 2005 ,except using SQL Profiler there is no way to track SELECT statements. If the answer is helpful, please vote it up :-) –  Kin Apr 12 '13 at 15:14
    
My reputation don't allow me vote up. –  Alexalex12 Apr 12 '13 at 15:35

Short answer: no. Sysadmins are gods.

Long answer:

Database administrators can use one or more of Server Audit (some editions of SQL Server 2008 and later), Change Data Capture (some editions of SQL Server 2008 and later, very limited information captures), Profiler (almost all editions and versions of SQL Server, including Analysis Services as well), SQL Trace (SQL Server 2008 and later, I think), DML Triggers (only for some operations) and DDL triggers (for SQL Server 2005 and later, and only for some operations).

Also Extended Events, as mentioned by Stray Cat below.

System administrators can use network sniffing to see everything you do on the network or remote control software to see everything you do on your workstation.

All of these can be completely invisible to you.

Modern operating systems almost all run on the assumption that you can't hide from sysadmins. If that were not the case then they would be unable to do their jobs.

share|improve this answer
    
don't for get about Extended Events. –  StrayCatDBA Jun 5 '13 at 13:18

Tracking who-saw-what can be done through specially developed stored procedures and functions. In order to use this auditing method, access to the database must be limited through use of stored procedures (allowing EXEC statements only, while prohibiting all queries and DML operations). The result from a query is returned by a stored procedure, while at the same time the stored procedure logs the access in an appropriate auditing repository table along with additional information of interest (e.g. the time of the execution)

Also, SQL Server provides monitoring of selected events via the trace technology. It’s available through Application Programmer Interface (API), SQL Server Profiler as a GUI for viewing traces in real time, or by accessing saved trace files

The audited information contains the relevant information required for this type of auditing (e.g. the database and login name, the time of execution and the exact executed SELECT statement).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.