Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Script to identify who is using which view and at what time? Expand / Collapse
Author
Message
Posted Tuesday, November 20, 2012 12:59 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, November 4, 2014 7:42 AM
Points: 117, Visits: 283
HI,

There is a requirement to create a script to identify who is using which view and at what time? Its for SQL Server 2000.
Can someone help me here?

Regards
sqldba4u
Post #1386714
Posted Tuesday, November 20, 2012 7:54 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:50 PM
Points: 13,325, Visits: 12,811
sqldba4u (11/20/2012)
HI,

There is a requirement to create a script to identify who is using which view and at what time? Its for SQL Server 2000.
Can someone help me here?

Regards
sqldba4u


You aren't going to be able to do this with a script. You will have to setup a trace. This is a rather strange requirement. What are you hoping to achieve with this?


_______________________________________________________________

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 Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1386926
Posted Tuesday, November 20, 2012 8:36 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, November 4, 2014 7:42 AM
Points: 117, Visits: 283
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
Post #1386956
Posted Tuesday, November 20, 2012 10:26 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:50 PM
Points: 13,325, Visits: 12,811
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 Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1387046
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse