Solved

SQL logs to check what a specific user does

Posted on 2014-10-17
14
69 Views
Last Modified: 2014-10-20
So we have an external consultant that has created a new application for our scanners.
He is updating things in our database and I'm not a 100% sure he's updating the right things.
I'd like to be able to check what he is doing in our SQL server but I have no idea how to do that.
This way I can prove that he is or isn't doing the things and we can check elsewhere or not for the problems.
0
Comment
Question by:vanroybel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
  • 2
14 Comments
 
LVL 50

Expert Comment

by:Vitor Montalvão
ID: 40386523
You can use SQL Audit but what you really want to audit?
Schema changes or data changes?
SQL Server configuration changes?
Database configuration changes?
What kind of permissions he has?
0
 

Author Comment

by:vanroybel
ID: 40386537
I need to check data changes. What updates a specific field in a specific table and which user does it.
0
 
LVL 50

Expert Comment

by:Vitor Montalvão
ID: 40386554
Are you familiar with the SQL Server Audit feature?
Isn't hard to understand. Brad McGehee wrote a good article about how to work with it. Give a look on it and check if it's this you are looking for.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Expert Comment

by:OriNetworks
ID: 40386566
I'm sure Auditing would be a better way to log and archive activity. In case your server does support auditing, you can also use SQL Profile to monitor and track all activity. Keep in mind you may want to filter activity to look for only the LoginNames he would be using and of course test any filters and templates beforehand.
0
 

Author Comment

by:vanroybel
ID: 40386597
Well I tried using auditing but it doesn't work because it is not available for the standard edition.
I'll check SQL profile then.
0
 
LVL 50

Expert Comment

by:Vitor Montalvão
ID: 40386609
It's only available in Standard Edition for SQL Server 2012 and 2014.
0
 
LVL 17

Expert Comment

by:OriNetworks
ID: 40386621
Sorry I misspelled. The correct term is SQL Profiler and you can access is from the start menu or if you already have SQL Server Management Studio open you can access profiler from the Tools menu.
0
 

Author Comment

by:vanroybel
ID: 40391363
Ok so with SQL profiler I can start a trace activity happening at the moment. I won't be able  to check the data from before I suppose?
0
 
LVL 50

Expert Comment

by:Vitor Montalvão
ID: 40391387
No, you can't go backwards. You need to create an alert mechanism but that's only works from present and forward.
0
 

Author Comment

by:vanroybel
ID: 40391395
So with standard edition I don't have any way of analyzing the data from the previous days? Is there any tool I could use to analyze this data?
0
 

Author Comment

by:vanroybel
ID: 40391415
Ok, what I really need is a way to save the user who does the update on a specific field. I don't know if our ERP is doing the update or if it is coming from somewhere else.

I read that I can do that with a trigger but I don't understand the codes I'm finding. Also it seems as if I will have to use the trigger to update the value which is not possible with our ERP, since it doesn't let me choose how it will update the values.

Otherwise if I could create a trace that does this specifically it would be good too.
0
 
LVL 50

Expert Comment

by:Vitor Montalvão
ID: 40391419
Not even in Enterprise Edition you will be able to read data from past.
There are some 3rd tools that can read SQL Server Transaction Log files (*.LDF) or Transaction Log Backups. Check this one from Apex. I think you can download a trial version so you don't need to pay.
0
 
LVL 50

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 40391423
A trigger it's also a good solution. You can create a new table where you'll record all changes made in the database.
0
 

Author Closing Comment

by:vanroybel
ID: 40393689
I created a Trigger that saves every changes in the database. Thanks for your help.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
I had a question today where the user wanted to know how to delete an SSL Certificate, so I thought that I would quickly add this How to! Article for your reference. WHY WOULD YOU WANT TO DELETE A CERTIFICATE? 1. If an incorrect certificate was …
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question