Results 1 to 3 of 3

Thread: Transaction Log with sql server 2008

  1. #1

    Thread Starter
    Fanatic Member bharanidharanit's Avatar
    Join Date
    Oct 2008
    Location
    India
    Posts
    673

    Transaction Log with sql server 2008

    hi,
    I have several number of user login with my sql server 2008.
    Can i able to track what are all the users transacting with sql server like selecting,inserting,deleting,updating etc. with corresponding date,user, database, tables ?
    Is there any inbuilt functions for taking logs ?
    I tried DBCC logs('db_name'). I am not sure whether i am getting correctly the one i need.

  2. #2
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Transaction Log with sql server 2008

    I don't really understand your question.... If you want to know what user changed what data (inserts,updates and deletes) that is definitly stored in the log file. It is not something that is easly read. If you want to do that I would look for a third party tool (check on Red Gate). The select statements will definitly not be in the log file. The log only records changes to data not just reads.

    The other option is to set up a profile trace on the database (this should be a server side trace). This should not be done and left running from the SQL Profiler utility as it will serverly impact the perfromance of the database. If you go this route make your trace as light as possible and save the results to a file. You can then load the trace into Profiler and look at what is going on.
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  3. #3
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Re: Transaction Log with sql server 2008

    What is your intention to log user actions? If it is identifying performance bottlenecks, you should follow Mazz's suggestion.

    If you intend to audit users' actions, you should look into building auditing capabilities in your application.

    These could be built at the application (front-end) level or built using triggers on tables. A very basic auditing functionality is the use of footprint triggers to identify who changed the record in the table.
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width