database monitoring sql statement extraction count

  • I m new to database security monitoring. One of my challenge is to monitoring someone extracting information like 10000 account numbers stored on database.

    I can look at sql statements during monitoring but cannot get exact number of count that person is extracting from DB.

    how could i able to monitoring exact number of count that each record is extracted from logs available? this is for PCI compliance.

    could we create a SQL statement to find the count?

    any help in achieving this is appreciated.

  • I think you can use SQL Profiler to see the number of rows returned. And log that to directly to the file, filtering on table in question might be the quickest. Triggers might be another option?

    [font="Arial"]---

    Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
    Microsoft FTE - SQL Server PFE

    * Some time its the search that counts, not the finding...
    * I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]

    How to ask for help .. Read Best Practices here[/url].

  • Thanks for reply Mohit.

    I did came across some thing which was interesting I m going to test this out:

    http://www.mssqltips.com/tip.asp?tip=1044

  • That is a very nice article to take advantage of row count information in indexes tables. But I though you needed to know when someone is selecting information? And not what is there right now .. maybe I misunderstood sorry.

    In that article they are scanning the sysindexes "compatibility view" to determine the row count for each table. Which is based on statistics can can be out of sync. That is why they are executing "DBCC UPDATEUSAGE"; so that method is for not an exact answer of what is already there.

    Thanks.

    [font="Arial"]---

    Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
    Microsoft FTE - SQL Server PFE

    * Some time its the search that counts, not the finding...
    * I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]

    How to ask for help .. Read Best Practices here[/url].

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply