SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Log users with their System Name who run Select, D
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bsethi24
Starting Member

India
18 Posts

Posted - 05/16/2012 :  11:00:16  Show Profile  Reply with Quote
Dear All,

I am in need to make a log file for all the users with their System Name (same as Hostname of SP_Who2) who have logged in SQL either by SSMS or by any application or by any other way & run SELECT, INSERT, UPDATE, DELETE operations on list of given table names.

How can we achieve this? Please guide.

Bustaz Kool
Flowing Fount of Yak Knowledge

USA
1430 Posts

Posted - 05/16/2012 :  16:10:38  Show Profile  Reply with Quote
My initial reaction is to ask, "What are you actually trying to achieve here?" Perhaps if you could eleborate on that, we could offer better feedback. Based on what you have said so far, using Profiler or Extended Events to capture, filter and write to a table or file would be direction to consider.

=================================================
There is a foolish corner in the brain of the wisest man. -Aristotle, philosopher (384-322 BCE)
Go to Top of Page

bsethi24
Starting Member

India
18 Posts

Posted - 05/17/2012 :  04:01:43  Show Profile  Reply with Quote
Dear Bustaz Kool,

I need to achieve system name & users name those are accessing a particular table or list of tables. We don't have separate login for each & individual user & everyone accessing DBs by one login.

So, how do we make a log file which has "system name", "time of access", "user name", "Operation Type or Full Query executed by user" for a particular table or list of tables.
Go to Top of Page

Sachin.Nand
Flowing Fount of Yak Knowledge

2937 Posts

Posted - 05/17/2012 :  04:13:44  Show Profile  Reply with Quote
Set up database auditing.

After Monday and Tuesday even the calendar says W T F ....
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000