Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Users login trackings

Author  Topic 

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2011-09-21 : 22:04:12
I have task of tracking the users on sqlserver..what is best way to do it..

Like:what tables have access and how much amount of time.

Thanks for your help in advance !

jhnegrao
Yak Posting Veteran

81 Posts

Posted - 2011-09-22 : 17:09:22
Hi,

There is many ways to do that, so you have to choose the best option that fit your needs. The strategy to be used will follow some requirements imposed by your business.
But, I will choose the easiest way in my opinion, but we can keep on debating about other possibilities.

The easiest way to track users on SQL Server is to enabled SQL Server Trace and save this information in a SQL Server Table or a File in File System.
But, this will cause a hardwork to be analyzed and probably you will spend too much time trying to analyzing and find the informations you want. But, that is the easiest way and you don't need a big know-how about T-SQL Development.

The second-way and "The Best" in my opinion, is to develop a trigger on System Tables and for each connection you can save the User, Date and Time, Tables and Commands executed. When this connection goes way, you update the row with the Time Stamp.


Go to Top of Page

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2011-09-23 : 12:26:30
Thanks jhnegrao

I like your idea of second way trigger.

Please share the trigger if you have ..
Go to Top of Page
   

- Advertisement -