Home Forums SQL Server 7,2000 T-SQL Script to identify who is using which view and at what time? RE: Script to identify who is using which view and at what time?

  • sqldba4u (11/20/2012)


    There is requirement to track who is accessing which view and at what time. There are numerous views in databases in SQL 2000 instance which fetches confidential data. DB Owner wants to keep track of it.

    Thanks

    Again that is very bizarre requirement. This is like asking what users look at tables and at what time. As I said previously, there is no way to do that in a script. You can't capture this data in the past. You will have to setup a trace and capture this information going forward. I don't know how you would capture which user it is though.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/